Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OpenFromDBCommandBinding&lt;TController, TModel&gt;"/> class.
        /// </summary>
        /// <param name="viewModel">The view model.</param>
        /// <param name="owner">The owner window.</param>
        public ViewSettingsCommandBinding(ShellViewModel viewModel, Window owner)
        {
            this.Command = ShellCommands.ViewSettings;

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

            this.Executed += delegate(object sender, ExecutedRoutedEventArgs e)
            {
                ViewSettingsCommand.Execute(viewModel, owner);
            };
        }
Ejemplo n.º 2
0
 internal static void Execute(ShellViewModel viewModel, Window owner)
 {
     ViewSettingsCommand.Open(viewModel, owner);
 }
Ejemplo n.º 3
0
 internal static bool CanExecute(ShellViewModel viewModel)
 {
     return(ViewSettingsCommand.CanOpen(viewModel));
 }