public static void ShowConfig() { dlgLogin login = new dlgLogin(_Config.MISPassword); login.ValidateEntry(); if (login.IsValid) { new Argix.Support.dlgConfig(_Config).ShowDialog(); } }
internal static void ShowTrace() { dlgLogin login = new dlgLogin(_Config.MISPassword); login.ValidateEntry(); if (login.IsValid) { _Trace.Show(); } }
internal static void ShowDiagnostics() { dlgLogin login = new dlgLogin("argix" + DateTime.Today.DayOfYear); login.StartPosition = FormStartPosition.CenterScreen; login.ValidateEntry(); if (login.IsValid) { dlgData dlg = new dlgData(Assembly.GetExecutingAssembly(), App.Product); dlg.ShowDialog(); } }
private void OnMenuClick(object sender, System.EventArgs e) { //Event handler for menu selection try { ToolStripDropDownItem menu = (ToolStripDropDownItem)sender; switch (menu.Text) { case MNU_FILE_NEW_PALLET: this.mPallet = null; this.userProcess = "NewPallet"; break; case MNU_FILE_REMOVECARTON: this.userProcess = "RemoveCarton"; break; case MNU_FILE_EXIT: this.Close(); Application.Exit(); break; case MNU_VIEW_TOOLBAR: this.tlbMain.Visible = (this.mnuViewToolbar.Checked = (!this.mnuViewToolbar.Checked)); break; case MNU_VIEW_STATUSBAR: this.stbMain.Visible = (this.mnuViewStatusBar.Checked = (!this.mnuViewStatusBar.Checked)); break; case MNU_TOOLS_CONFIG: App.ShowConfig(); break; case MNU_TOOLS_DIAGNOSTICS: App.ShowDiagnostics(); break; case MNU_TOOLS_TRACE: App.ShowTrace(); break; case MNU_TOOLS_USEWEBSVC: dlgLogin login = new dlgLogin(App.Config.MISPassword); login.ValidateEntry(); if (login.IsValid) { this.Cursor = Cursors.WaitCursor; this.mMessageMgr.AddMessage("Resetting the application configuration..."); Application.DoEvents(); App.UseWebSvc = this.mnuToolsUseWebSvc.Checked = (!this.mnuToolsUseWebSvc.Checked); configApplication(); // this.mnuViewRefresh.PerformClick(); this.setUserServices(); //MK not sure if this is needed, have one in finally } break; case MNU_HELP_ABOUT: new dlgAbout(App.Product + " Application", App.Version, App.Copyright, App.Configuration).ShowDialog(this); break; } } catch (Exception ex) { App.ReportError(ex, true, LogLevel.Error); } finally { setUserServices(); this.Cursor = Cursors.Default; } }