Ejemplo n.º 1
0
        static void Main()
        {
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            Mutex mutex = null;

            AppDomain.CurrentDomain.ProcessExit += new EventHandler((sender, e) => { if (mutex != null)
                                                                                     {
                                                                                         mutex.Dispose();
                                                                                     }
                                                                    });
            bool createdNew = true;

            mutex = new Mutex(true, "Fonlow.SyncMLClientOpenContacts", out createdNew);

            if (!createdNew)
            {
                MessageBox.Show("Another instance of SyncML Client for Open Contacts is running.", "SyncML Client for Open Contacts");
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            OcSyncSettings settings = OcSyncSettings.Default;

            Application.Run(UcMultiSyncMain.CreateMainForm(settings));
        }
Ejemplo n.º 2
0
 void LoadSyncForm()
 {
     if (syncForm == null)
     {
         syncForm             = UcMultiSyncMain.CreateMainForm(OutlookSyncSettings.Default);
         syncForm.FormClosed += new System.Windows.Forms.FormClosedEventHandler(syncForm_FormClosed);
     }
 }