Example #1
0
        private async void CopyFromExitingCommandButton_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            CommandSelectorDialogControl dialogControl = new CommandSelectorDialogControl();

            if (bool.Equals(await DialogHelper.ShowCustom(dialogControl), true) && dialogControl.ViewModel.SelectedCommand != null)
            {
                await((ConditionalActionEditorControlViewModel)this.DataContext).ImportActionsFromCommand(dialogControl.ViewModel.SelectedCommand);
            }
        }
        private async Task <CommandBase> ShowCommandSelector()
        {
            if (await this.viewModel.CanSelectCommands())
            {
                CommandSelectorDialogControl dialogControl = new CommandSelectorDialogControl();
                await DialogHelper.ShowCustom(dialogControl);

                return(dialogControl.Command);
            }
            return(null);
        }
 private async Task <CommandModelBase> ShowCommandSelector()
 {
     if (await this.viewModel.CanSelectCommands())
     {
         CommandSelectorDialogControl dialogControl = new CommandSelectorDialogControl();
         if (bool.Equals(await DialogHelper.ShowCustom(dialogControl), true) && dialogControl.ViewModel.SelectedCommand != null)
         {
             return(dialogControl.ViewModel.SelectedCommand);
         }
     }
     return(null);
 }