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

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

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