Example #1
0
 private void Finish()
 {
     if (FinishCommand != null && FinishCommand.CanExecute(null))
     {
         FinishCommand.Execute(null);
     }
 }
Example #2
0
 public void SubmitPIN(object sender, TextChangedEventArgs e)
 {
     if (FinishCommand != null && !String.IsNullOrEmpty(e.NewTextValue))
     {
         if (FinishCommand.CanExecute(FinishCommandParameter))
         {
             FinishCommand.Execute(FinishCommandParameter);
         }
     }
 }
Example #3
0
 public void SubmitWithReturn([CanBeNull] object sender, EventArgs e)
 {
     if (FinishCommand != null)
     {
         if (FinishCommand.CanExecute(FinishCommandParameter))
         {
             FinishCommand.Execute(FinishCommandParameter);
         }
     }
 }
Example #4
0
 public void SubmitPIN(object sender, TextChangedEventArgs e)
 {
     if (FinishCommand != null)
     {
         if (FinishCommand.CanExecute(FinishCommandParameter))
         {
             FinishCommand.Execute(FinishCommandParameter);
         }
     }
 }
Example #5
0
        private void ExecuteFinishWizard()
        {
            if (FinishCommand?.CanExecute(CanFinish) == true)
            {
                FinishCommand?.Execute(CanFinish);
            }

            var eventArgs = new RoutedEventArgs(Wizard.FinishEvent);

            this.RaiseEvent(eventArgs);
            //if (eventArgs.Cancel)
            //    return;

            if (FinishButtonClosesWindow)
            {
                CloseParentWindow(true);
            }
        }
Example #6
0
 protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs e)
 {
     base.OnPropertyChanged(e);
     if (
         e.Property.Name == nameof(CanSelectNextPage) ||
         (e.Property.Name == nameof(CanHelp)) ||
         (e.Property.Name == nameof(CanFinish)) ||
         (e.Property.Name == nameof(CanCancel)) ||
         (e.Property.Name == nameof(CanSelectPreviousPage)) ||
         (e.Property.Name == nameof(CurrentPage))
         )
     {
         CancelCommand?.CanExecute(CanCancel);
         FinishCommand?.CanExecute(CanFinish);
         PreviousPageCommand?.CanExecute(CanSelectPreviousPage);
         NextPageCommand?.CanExecute(CanSelectNextPage);
         HelpCommand?.CanExecute(CanHelp);
         UpdateButtonState();
     }
 }