FolderWidget/Program.cs
/// <summary>
/// The main entry point for the application.
/// </summary>
The main entry point for the application.
The main entry point for the application .
[STAThread]
        static void Main()
        {
            bool appNotRunning;
            try
            {
                Mutex mtx = new Mutex(false, "FolderWidget", out appNotRunning);
                if (appNotRunning)
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.ThreadException += Application_ThreadException;
                    AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
                    clsManageComunication.GetServerWorker.RunWorkerAsync();
                    Application.Run(new frmMain());
                }
                else
                {
                    clsManageComunication.TransmitDataToServer(string.Empty);
                    return;
                }
            }
            catch (Exception ex)
            {
                clsFileManager.WriteError("program, Error:" + ex.Message, ex.StackTrace);
                MessageBox.Show("Fatal Error Occurred");
                Application.Exit();
            }
        }
[ STAThread ] static void Main ( ) { bool appNotRunning ; try { Mutex mtx = new Mutex ( false , " " , out appNotRunning ) ; if ( appNotRunning ) { Application . EnableVisualStyles ( ) ; Application . SetCompatibleTextRenderingDefault ( false ) ; Application . ThreadException += Application_ThreadException ; AppDomain . CurrentDomain . UnhandledException += CurrentDomain_UnhandledException ; clsManageComunication . GetServerWorker . RunWorkerAsync ( ) ; Application . Run ( new frmMain ( ) ) ; } else { clsManageComunication . TransmitDataToServer ( string . Empty ) ; return ; } } catch ( Exception ex ) { clsFileManager . WriteError ( " " + ex . Message , ex . StackTrace ) ; MessageBox . Show ( " " ) ; Application . Exit ( ) ; } }
The main entry point for the application.
The main entry point for the application .