static public bool MOGGlobalRepositoryLogin(MogMainForm main, bool forceRestart) { SelectValidRepository: MogForm_RepositoryBrowser_Client browser = new MogForm_RepositoryBrowser_Client(forceRestart); DialogResult rc = DialogResult.Cancel; if (!MOG_Main.IsShutdown()) { rc = browser.ShowDialog(); } if (rc == DialogResult.OK) { if (forceRestart) { main.Close(); } return(true); } else if (rc == DialogResult.Retry) { goto SelectValidRepository; } return(false); }
private void MogProcess() { // Loop until we shutdown while (!MOG_Main.IsShutdown()) { // Only process while we are not shutting down? if (!MOG_Main.IsShutdownInProgress()) { try { MOG_Main.Process(); } catch (Exception ex) { MOG_Report.ReportSilent("MogProcess", ex.Message, ex.StackTrace, MOG_ALERT_LEVEL.CRITICAL); } } Thread.Sleep(1); } // Inform our parent thread that we have exited mMogProcess = null; // Gracefully wait a while to see if our parent thread will terminate the application for us? Thread.Sleep(500); // At this point, let's take the inititive and shut ourselves down Application.Exit(); }