Commercial & open source. Find your way forward.Compare editions
OCS NETWORKS INC / OSS

IntelliDispatch OSS MIT License

The open-source edition. An MIT-licensed core, with optional paid, licensed plugins.

Code About this workspace LicenseRead-only source browser
Public files
Program.cs
2.3 KB · 79 linesModified Nov 6, 2026 UTC
1using System;2using System.Collections.Generic;3using System.Linq;4using System.Windows.Forms;5using MySql.Data.MySqlClient;6using System.Diagnostics;7using System.Windows.Forms.VisualStyles;89namespace IntelliDispatch10{11    static class Program12    {13        /// <summary>14        /// The main entry point for the application.15        /// </summary>16        [STAThread]17        static void Main()18        {19            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);2021            Application.EnableVisualStyles();22            Application.SetCompatibleTextRenderingDefault(false);23            Application.VisualStyleState = VisualStyleState.NonClientAreaEnabled;2425            //Application.VisualStyleState = VisualStyleState.ClientAndNonClientAreasEnabled;2627            string MyConString = IntelliDispatch.Global.MyConString;2829            MySqlConnection connection = new MySqlConnection(MyConString);30            MySqlCommand command = connection.CreateCommand();31            connection.Open();32            MySqlDataReader Reader;3334            command.CommandText = "SELECT * FROM appinfo";35            Reader = command.ExecuteReader();3637            bool current = true;3839            while (Reader.Read())40            {41                if ((string)Reader["appversion"] == "1.0c")42                {43                    current = true;44                }45                else46                {47                    current = false;4849                }50            }5152            if (current == false)53            {54                DialogResult dialogResult = MessageBox.Show("IntelliDispatch is outdated. Would you like to update?", "Update Available!", MessageBoxButtons.YesNo);55                if (dialogResult == DialogResult.Yes)56                {57                    Process.Start("http://www.intellidispatch.com/download");58                }59                else if (dialogResult == DialogResult.No)60                {61                }62            }6364            connection.Close();656667            Login objLogin = new Login();68            if (objLogin.ShowDialog() == DialogResult.OK)69            {70                Application.Run(new frmMain());71            }72            else73            {7475            }76        }7778    }79}