public MainPanel() { InitializeComponent(); this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true); //timerShowMovie.Start(); Console.WriteLine("MainPanel_Load开始隐藏小键盘"); GlobalTools.HideAllKeyBoard(); GlobalTools.RegistUpdateUnOperationTime(null); GlobalTools.StopUnOperationCounter(); if (GlobalTools.loginUser == null) { this.lbWelcome1.Visible = false; this.lbWelcomeName.Visible = false; this.lbWelcome3.Visible = false; this.btnQuit.Visible = false; this.panelFlashCardHint.Visible = true; this.panelFlashCardHint.BringToFront(); this.timerReadCard.Start(); } else { this.panelFlashCardHint.Visible = false; this.timerReadCard.Stop(); // this.panelFlashCardHint.BringToFront(); this.lbWelcome1.Visible = true; this.lbWelcomeName.Visible = true; this.lbWelcomeName.Text = GlobalTools.loginUser.Name; this.lbWelcome3.Visible = true; this.btnQuit.Visible = true; this.lbWelcomeName.Location = new Point(this.lbWelcome3.Location.X - this.lbWelcomeName.Width, this.lbWelcome3.Location.Y); this.lbWelcome1.Location = new Point(this.lbWelcomeName.Location.X - this.lbWelcome1.Width, this.lbWelcome3.Location.Y); //FT.Commons.Tools.WinFormHelper.LocationAfter(this.lbWelcomeName, this.lbWelcome3); } GlobalTools.CloseAllPopForms(); try { if (this.DesignMode) { Cursor = Cursors.Default; } else { GlobalTools.SetCursor(); } } catch (Exception ex) { } }
/// <summary> /// 返回主界面 /// </summary> public static void ReturnMain() { GlobalTools.CloseAllPopForms(); GoPanel(new MainPanel()); }