Пример #1
0
        public void ShowDialog(DialogViewModelBase dialog)
        {
            if (VisibleDialogContent != null)
            {
                return;
            }

            VisibleDialogContent = dialog;
        }
Пример #2
0
        public void ShowDialog(DialogViewModelBase dialog)
        {
            if (VisibleDialogContent != null)
            {
                return;
            }

            VisibleDialogContent = dialog;
        }
Пример #3
0
        public void HideDialog()
        {
            var dialog = VisibleDialogContent;

            if (dialog == null)
            {
                return;
            }

            if (dialog is INotifyCompletion)
            {
                var tcs = ((INotifyCompletion)dialog).NotifyCompletionSource;
                tcs.SetResult(null);
            }

            VisibleDialogContent = null;
        }
Пример #4
0
        public void ShowDialog(DialogViewModelBase dialog)
        {
            if (VisibleDialogContent != null)
            {
                // Do not allow multiple dialogs.  Keep the current one.
                return;
            }

            VisibleDialogContent = dialog;

            if (dialog is IActivity)
            {
                var activity = (IActivity)dialog;
                Task.Run(activity.RunActivityAsync).ContinueWith(t =>
                {
                    if (t.Exception != null)
                    {
                        var ex = t.Exception.InnerException;
                        MessageBox.Show(ex.Message, "Loading dialog failed");
                    }
                });
            }
        }
Пример #5
0
 public void HideDialog()
 {
     VisibleDialogContent = null;
 }
Пример #6
0
 public void HideDialog()
 {
     VisibleDialogContent = null;
 }