Example #1
0
        public System.Windows.MessageBoxResult ShowMessageBox(string sCaption, string sMessage, MessageBoxButton msgButtons)
        {
            BoxModel = MessageBoxModel;
            MessageBoxResult result = MessageBoxModel.Show(sCaption, sMessage, msgButtons);

            return(result);
        }
Example #2
0
        private void OnClosing(CancelEventArgs args)
        {
#if !DEBUG
            var dlg = new MessageBoxViewModel
            {
                Caption = "Exit",
                Message = "Save changes and quit?",
                Buttons = System.Windows.MessageBoxButton.YesNo,
                Image   = System.Windows.MessageBoxImage.Question
            };
            args.Cancel = (dlg.Show(this.Dialogs) == System.Windows.MessageBoxResult.No);
#endif
        }