用户管理:登录窗体通过ShowDialog()方法实现切换
/// <summary> /// 成功登录后的主窗体MainForm.cs的OnShown方法 /// </summary> /// <param name="e"></param> protected override void OnShown(EventArgs e) { base.OnShown(e); #region 登录框 btnProject.Enabled = false; DialogResult result = DialogResult.No; LoginForm login = new LoginForm(); result = login.ShowDialog(); btnProject.Enabled = true; #endregion #region 权限设置 if (!BaseClass.CheckRolePower(UserAccessLeve.TestProject)) btnProject.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; #endregion SetLoadString("Initing ...");//登录成功后,进入主界面过程中加载等待框 }
清清软件园 http://sillysoft.taobao.com