Ejemplo n.º 1
0
 /// <summary>
 /// Use this constructor when creating a dialog that will be used on an edited account
 /// </summary>
 /// <param name="account">the existing account to be edited</param>
 /// <param name="factory"></param>
 public AccountDialogViewModel(Account account, IAccountOperationFactory factory)
 {
     if (account != null)
     {
         this.accountOperation = factory.CreateEditAccountOperation(account);
         Confirm = new CommandBase(ConfirmEdit);
         Cancel  = new CommandBase(CancelEdit);
     }
     else
     {
         this.accountOperation = factory.CreateAddAccountOperation();
         Confirm = new CommandBase(ConfirmNew);
         Cancel  = new CommandBase(CancelNew);
     }
 }
 /// <summary>
 /// Use this constructor when creating a dialog that will be used on an edited account
 /// </summary>
 /// <param name="account">the existing account to be edited</param>
 /// <param name="factory"></param>
 public AccountDialogViewModel(Account account, IAccountOperationFactory factory)
 {
     if (account != null)
     {
         this.accountOperation = factory.CreateEditAccountOperation(account);
         Confirm = new CommandBase(ConfirmEdit);
         Cancel = new CommandBase(CancelEdit);
     }
     else
     {
         this.accountOperation = factory.CreateAddAccountOperation();
         Confirm = new CommandBase(ConfirmNew);
         Cancel = new CommandBase(CancelNew);
     }
 }
 /// <summary>
 /// Use this constructor when creating a dialog that will be used on a new account
 /// </summary>
 public AccountDialogViewModel(IAccountManager accountManager, IAccountOperationFactory factory)
     : this(null, accountManager, factory)
 { }
Ejemplo n.º 4
0
 /// <summary>
 /// Use this constructor when creating a dialog that will be used on a new account
 /// </summary>
 public AccountDialogViewModel(IAccountOperationFactory factory)
     : this(null, factory)
 {
 }