protected void Login() { this.Hide(); FormLogin form = new FormLogin(); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.Location = new Point(0, 0); this.WindowState = FormWindowState.Maximized; this.Show(); this.BringToFront(); for (int i = 0; i < this.Controls.Count; i++) { MdiClient client = this.Controls[i] as MdiClient; if (client == null) { continue; } _mdiClient = client; _mdiClient.BackColor = Color.White; break; } //判断页面 GetUserRoles(); LoadTreeMenu(); ShowMenuByRoles(); tSSLUser.Text = FishEntity.Variable.User == null ? string.Empty : FishEntity.Variable.User.realname + "(" + FishEntity.Variable.User.roletype + ")"; DrawMdiClientBackground(); ShowPushMessageForm(); StartBackThread(); //MessageBox.Show(GetMacString().ToString()); proDic = ProgramManager.setDicItem( ); System.Timers.Timer t = new System.Timers.Timer(1000); t.Elapsed += new System.Timers.ElapsedEventHandler(checkWarn); t.AutoReset = true; t.Enabled = true; } else { this.Close(); } }
protected void Login() { this.Hide(); FormLogin form = new FormLogin(); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.Location = new Point(0, 0); this.WindowState = FormWindowState.Maximized; this.Show(); this.BringToFront(); for (int i = 0; i < this.Controls.Count; i++) { MdiClient client = this.Controls[i] as MdiClient; if (client == null) { continue; } _mdiClient = client; _mdiClient.BackColor = Color.White; break; } //判断页面 GetUserRoles(); LoadTreeMenu(); ShowMenuByRoles(); tSSLUser.Text = FishEntity.Variable.User == null ? string.Empty : FishEntity.Variable.User.realname + "(" + FishEntity.Variable.User.roletype + ")"; DrawMdiClientBackground(); ShowPushMessageForm(); StartBackThread(); } else { this.Close(); } }