public MainWindowViewModel(IAccount account) { _account = account; var accountManagementService = new AccountManagementService(account); SyncToAccount(); _account.PropertyChanged += (o, e) => SyncToAccount(); AccountPropertiesViewModel = new AccountPropertiesViewModel(accountManagementService); AccountAllocationsViewModel = new AccountAllocationsViewModel(accountManagementService); }
public AccountAllocationsViewModel(AccountManagementService accountManagementService) { _accountManagement = accountManagementService; _accountManagement.Account.PropertyChanged += (o, e) => SyncToAccount(); _accountManagement.ValidationChanged += (o, e) => HandleValidation(e.PropertyName); }
public AccountPropertiesViewModel(AccountManagementService accountManagementService) { _accountManagement = accountManagementService; _accountManagement.Account.PropertyChanged += (o, e) => SyncToAccount(); }