private void btnmanage_Click(object sender, EventArgs e) { if (GlobeVal.mysys.safe == true) { if (GlobeVal.mysys.AppUserLevel < 2) { if (GlobeVal.mysys.language == 0) { MessageBox.Show("您的当前权限不够,请使用管理员权限登录"); } else { MessageBox.Show("Insufficient permissio to login system."); } return; } } TabControl b = ((TabControl)Application.OpenForms["FormMainLab"].Controls["tabcontrol1"]); UserControlMain c = GlobeVal.FormmainLab.umain; ((SplitContainer)b.TabPages[1].Controls[0]).Panel2Collapsed = true; c.OpenAdmin(); b.SelectedIndex = 1; }
private void btnmanage_Click(object sender, EventArgs e) { if (GlobeVal.myglobefile.safe == true) { if (GlobeVal.myglobefile.AppUserLevel < 2) { MessageBox.Show("您的当前权限不够,请使用管理员权限登录"); return; } } TabControl b = ((TabControl)Application.OpenForms["FormMainLab"].Controls["tabcontrol1"]); UserControlMain c = GlobeVal.FormmainLab.umain; c.OpenAdmin(); b.SelectedIndex = 1; }