private void frmMain_Load(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; try { if (AppService.Instance.ExistingApps.Count > 0) { Debug.WriteLine("已经加载了定义的应用系统"); } this.tabControl1.Visible = false; this.WindowState = FormWindowState.Maximized; m_formShowSrv = new SingleWinShowAppFormService(this, this.menuAppLogs); this.menuSingleWin.Checked = true; InitServiceInterface(); } catch (Exception ex) { MessageBox.Show("主窗口加载过程失败,错误消息为:" + ex.Message); } finally { if (frmSplash.SplashScreen != null) { frmSplash.SplashScreen.Dispose(); } this.Cursor = Cursors.Default; } }
private void menuOnlyWin_Click(object sender, EventArgs e) { if (menuOnlyWin.Checked) { return; } m_formShowSrv = new CentralizedTPShowAppFormService(this, this.tabControl1); this.menuOnlyWin.Checked = true; this.menuSingleWin.Checked = false; this.menuAppLogs.Visible = false; menuAppLogs_DropDownOpening(null, null); }
private void menuSingleWin_Click(object sender, EventArgs e) { if (menuSingleWin.Checked) { return; } m_formShowSrv = new SingleWinShowAppFormService(this, this.menuAppLogs); this.menuSingleWin.Checked = true; this.menuOnlyWin.Checked = false; this.menuAppLogs.Visible = true; this.tabControl1.Visible = false; this.tabControl1.TabPages.Clear(); GC.Collect(); }