Esempio n. 1
0
 public bool ShowDialogWarningMsg(string text)
 {
     if (_msgBox != null)
     {
         bool ret = false;
         SystemContext.Instance.AsyncOperation.SynchronizationContext.Post(
             state => { ret = _msgBox.ShowDialogWarningMsg(text); }, null);
         return(ret);
     }
     else
     {
         MessageBoxResult result = MessageBox.Show(text, "提示");
         return(result == MessageBoxResult.OK);
     }
 }
Esempio n. 2
0
        private void ShutdownProgramCallback(SysCommonMsgArgs <string> args)
        {
            IMessageBox _msgBox = IocManagerSingle.Instance.GetPart <IMessageBox>();

            if (!string.IsNullOrWhiteSpace(args.Parameters))
            {
                if (_msgBox.ShowDialogWarningMsg(args.Parameters))
                {
                    Application.Current.Shutdown();
                }
            }
            else
            {
                Application.Current.Shutdown();
            }
        }