private void FrmSign_FormClosed(object sender, FormClosedEventArgs e) { if (this.Tag.ToString() == WinTag.frmDetail.ToString()) { //WinTag.frmDetail //详情页(委托传值) uInfo = uInfoRepository.UserInfoes.FirstOrDefault(p => p.personIDNum == FillPersonIDNum); var frmDetail = NinjectControllerFactory.Resolve <FrmDetail>(); //使用委托把该记录的ID传送到详情窗口 sendUser_Event += new SendUserInfoToFrmDetail(frmDetail.ToShowGetUserInfo); //触发委托 sendUser_Event.Invoke(uInfo.ID); //LoadController——加载窗口控制类,在这里调用Show方法 //然后在将要显示的窗口 load事件里,设置它的setter——State及加载成功后隐藏该窗口 LoadController.Show(typeof(FrmLoading)); DialogHelper.ShowNextDlg(new Thread(delegate() { frmDetail.ShowDialog(); })); } else { //WinTag.Main //主窗口 DialogHelper.ShowNextDlg(new Thread(delegate() { NinjectControllerFactory.Resolve <FrmMain>().ShowDialog(); })); } }
//系统提供的事件——关闭窗口时做相应的跳转 private void FrmManage_FormClosed(object sender, FormClosedEventArgs e) { if (this.Tag.ToString() == WinTag.frmLogin.ToString()) { //跳转到登录界面 DialogHelper.ShowNextDlg(new Thread(delegate() { NinjectControllerFactory.Resolve <FrmLogin>().ShowDialog(); })); //DialogHelper.ShowNextDlg(new Thread(delegate() { new FrmLogin(uAdminRepository, uInfoRepository).ShowDialog(); })); } else { //跳转到形式统计界面 LoadController.Show(typeof(FrmLoading)); DialogHelper.ShowNextDlg(new Thread(delegate() { NinjectControllerFactory.Resolve <FrmModality>().ShowDialog(); })); } }
private void FrmLogin_FormClosed(object sender, FormClosedEventArgs e) { if (this.Tag.ToString() == WinTag.frmMain.ToString()) { //主窗口 DialogHelper.ShowNextDlg(new Thread(delegate() { NinjectControllerFactory.Resolve <FrmMain>().ShowDialog(); })); } else { //管理员窗口 LoadController.Show(typeof(FrmLoading)); DialogHelper.ShowNextDlg(new Thread(delegate() { NinjectControllerFactory.Resolve <FrmManage>().ShowDialog(); })); } }
private void FrmModality_FormClosed(object sender, FormClosedEventArgs e) { LoadController.Show(typeof(FrmLoading)); DialogHelper.ShowNextDlg(new Thread(delegate() { NinjectControllerFactory.Resolve <FrmManage>().ShowDialog(); })); }