/// <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 }; }
public NotificationViewModel() { OKCommand = new CloseDialogCommand { Title = "OK", DialogResult = true, IsDefault = true }; }
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); }
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); }
public void Close(object result) { CloseDialogCommand?.Execute(result, this); }
public void Close() { CloseDialogCommand?.Execute(DialogCanceled.Default, this); }
public InputViewModel() { SaveCommand = new SaveCommand(this); CloseDialogCommand = new CloseDialogCommand(this); User = new User(); }