/// <summary>
        /// Forces to re-evaluate CanExecute on the Prism commands
        /// </summary>
        public override void RaiseCanExecuteChanges()
        {
            base.RaiseCanExecuteChanges();

            SubmitCommand.RaiseCanExecuteChanged();
            CloseDialogCommand.RaiseCanExecuteChanged();
        }
 public ConfirmationViewModel()
 {
     CancelCommand = new CloseDialogCommand
     {
         Title        = "Cancel",
         DialogResult = true,
         IsDefault    = true
     };
 }
Beispiel #3
0
 public NotificationViewModel()
 {
     OKCommand = new CloseDialogCommand
     {
         Title        = "OK",
         DialogResult = true,
         IsDefault    = true
     };
 }
Beispiel #4
0
 private async Task NewProject(ProjectWizardViewModel project)
 {
     if (project == null)
     {
         CloseDialogCommand.Execute(null);
         return;
     }
     CloseModalCommand.Execute(null);
     await Task.Run(() => NewProjectTask(project)).ContinueWith((result) =>
     {
     });
 }
        public async void OnDialogOpened(IDialogParameters parameters)
        {
            var progress = new Progress <int>(value =>
            {
                EvaluationProgress = value;

                if (value >= 100)
                {
                    EvaluationCompleted = true;
                    CloseDialogCommand.RaiseCanExecuteChanged();
                }
            });

            await _evaluationManager.EvaluateAsync(progress);
        }
Beispiel #6
0
        public IEnumerator CloseDialogCommand(string buttonCloseId, ResultData <SimpleCommandResult> result)
        {
            var starTime = DateTime.UtcNow;
            var command  = new CloseDialogCommand(_context, buttonCloseId);

            yield return(command.Run());

            result.SetData(command.GetResult());
            var endTime = DateTime.UtcNow;
            var comp    = new Dictionary <string, string>();

            comp["arg"]    = $"<{buttonCloseId}>";
            comp["result"] = $"<{result.GetData().IsDone.ToString()}>";
            _context.SendCommandLog(CommandsId.CloseDialog, starTime, endTime, comp);
        }
Beispiel #7
0
 public void Close(object result)
 {
     CloseDialogCommand?.Execute(result, this);
 }
Beispiel #8
0
 public void Close()
 {
     CloseDialogCommand?.Execute(DialogCanceled.Default, this);
 }
 public InputViewModel()
 {
     SaveCommand        = new SaveCommand(this);
     CloseDialogCommand = new CloseDialogCommand(this);
     User = new User();
 }