Esempio n. 1
0
 /// <summary>
 /// Determines whether a data model can be created for the specified <see cref="ViewModel&lt;TController, TModel&gt;"/>.
 /// </summary>
 /// <param name="viewModel">The view model.</param>
 /// <returns>
 ///     <c>true</c> if a data model can be created; otherwise, <c>false</c>.
 /// </returns>
 public static bool CanCreate(ViewModel <TController, TModel> viewModel)
 {
     return(viewModel.CanCreate);
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CreateCommand&lt;TController, TModel&gt;"/> class.
 /// </summary>
 /// <param name="viewModel">The view model.</param>
 /// <param name="owner">The owner window.</param>
 public CreateCommand(ViewModel <TController, TModel> viewModel, Window owner)
     : base(viewModel)
 {
     this.owner = owner;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CreateCommand&lt;TController, TModel&gt;"/> class.
 /// </summary>
 /// <param name="viewModel">The view model.</param>
 public CreateCommand(ViewModel <TController, TModel> viewModel)
     : this(viewModel, null)
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NewCommandBinding&lt;TController, TModel&gt;"/> class.
 /// </summary>
 /// <param name="viewModel">The view model.</param>
 public NewCommandBinding(ViewModel <TController, TModel> viewModel)
     : this(viewModel, null)
 {
 }
Esempio n. 5
0
 internal static void Execute(ViewModel <TController, TModel> viewModel, Window owner, object parameter)
 {
     CreateCommand <TController, TModel> .Create(viewModel);
 }
Esempio n. 6
0
 internal static bool CanExecute(ViewModel <TController, TModel> viewModel, object parameter)
 {
     return(CreateCommand <TController, TModel> .CanCreate(viewModel));
 }