Exemplo n.º 1
0
        internal static void Execute(ShellViewModel viewModel)
        {
            viewModel.ClearViewModels();

            //To show progress View irrespective of where the user is when Start session is clicked
            viewModel.ShowMigrationView = MigrationStatusViews.Progress;
            StartCommand.Start(viewModel);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StartCommandBinding&lt;TController, TModel&gt;"/> class.
        /// </summary>
        /// <param name="viewModel">The view model.</param>
        public StartCommandBinding(ShellViewModel viewModel)
        {
            this.Command = MediaCommands.Play;

            StartCommand command = new StartCommand(viewModel);

            this.CanExecute += delegate(object sender, CanExecuteRoutedEventArgs e)
            {
                e.CanExecute = command.CanExecute(e.Parameter);
            };

            this.Executed += delegate(object sender, ExecutedRoutedEventArgs e)
            {
                command.Execute(e.Parameter);
            };
        }
Exemplo n.º 3
0
 internal static bool CanExecute(ShellViewModel viewModel)
 {
     return(StartCommand.CanStart(viewModel));
 }