Пример #1
0
 void vm_GetResult(BPMS.Model.Result rlt)
 {
     this.Dispatcher.Invoke(new Action(() =>
     {
         if (rlt.IsSuccess)
         {
             if (User.Current.IsMultiRole)
             {
                 LoginSelectRoleWindow selRole = new LoginSelectRoleWindow();
                 selRole.ShowDialog();
             }
             else
             {
                 MainWindow main = new MainWindow();
                 main.Show();
             }
             this.Close();
         }
         else
         {
             MessageDxUtil.ShowWarning(rlt.Message);
         }
     }));
 }
Пример #2
0
        void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            DialogResult rlt = MessageDxUtil.ShowYesNoAndTips("确定退出么?");

            e.Cancel = rlt != System.Windows.Forms.DialogResult.Yes;
        }