Esempio n. 1
0
 public MainViewModel(Community community, NavigationModel navigationModel, NewEntryModel newEntry, SynchronizationService synhronizationService)
 {
     _community = community;
     _navigationModel = navigationModel;
     _newEntry = newEntry;
     _synhronizationService = synhronizationService;
 }
Esempio n. 2
0
        public BookViewModel(Book book, NewEntryModel newEntry)
        {
            _book = book;
            _newEntry = newEntry;

            _otherAccountOptions = new DependentList<AccountHeaderViewModel>(() =>
                from account in _book.Account.Company.Accounts
                orderby account.Name.Value
                select new AccountHeaderViewModel(account)
            );
        }
Esempio n. 3
0
 public ViewModelLocator()
 {
     var navigationModel = new NavigationModel();
     var newEntry = new NewEntryModel();
     _synchronizationService = new SynchronizationService();
     if (!DesignerProperties.IsInDesignTool)
     {
         _synchronizationService.Initialize();
         navigationModel.SelectedShare = _synchronizationService.Identity.ActiveShares
             .OrderBy(share => share.Company.Name.Value)
             .FirstOrDefault();
         _main = new MainViewModel(_synchronizationService.Community, navigationModel, newEntry, _synchronizationService);
     }
 }
Esempio n. 4
0
 public CompanyViewModel(Share share, NavigationModel navigationModel, NewEntryModel newEntry)
 {
     _newEntry = newEntry;
     _share = share;
     _navigationModel = navigationModel;
 }