Esempio n. 1
0
 private void InitValues()
 {
     customerViewModel = new CustomerViewModel();
     invoiceViewModel  = new InvoiceViewModel(customerViewModel.Customers);
     ChangeViewCommand = new ChangeViewCommand(ChangeView);
     ContentViewModel  = customerViewModel;
 }
Esempio n. 2
0
        public MainViewModel()
        {
            ChangeViewCommand = new ChangeViewCommand(ChangeView);

            customerViewModel = new CustomerViewModel();
            invoiceViewModel  = new InvoiceViewModel(customerViewModel.Customers);

            VM = customerViewModel;
        }
Esempio n. 3
0
        public MainViewModel()
        {
            ChangeViewCommand      = new ChangeViewCommand(ChangeView);
            DisplayInvoiceCommand  = new DelegateCommand <Invoice>(DisplayInvoice);
            DisplayCustomerCommand = new DelegateCommand <Customer>(DisplayCustomer);

            AddNewItemCommand           = new DelegateCommand <object>(AddNewItem, CanAddNewItem);
            AddInvoiceToCustomerCommand = new DelegateCommand <Customer>(AddInvoiceToCustomer);

            customerViewModel = new CustomerViewModel();
            invoiceViewModel  = new InvoiceViewModel(customerViewModel.Customers);

            VM = customerViewModel;
        }
Esempio n. 4
0
        public MainViewModel(INavigator navigator, IUnitOfWork unitOfWork, IAuthenticator authenticator,
                             ChangeViewCommand changeViewCommand, AppHeaderViewModel appHeaderViewModel)
        {
            _navigator     = navigator;
            _unitOfWork    = unitOfWork;
            _authenticator = authenticator;

            ChangeViewCommand = changeViewCommand;

            AppHeaderViewModel = appHeaderViewModel;

            ChangeViewCommand.Execute(ViewType.Login);

            _navigator.StateChanged     += OnCurrentViewModelChanged;
            _authenticator.StateChanged += Authenticator_StateChanged;
            NetworkState.StateChanged   += Network_StateChanged;
        }
 private void InitCommands()
 {
     ChangeViewCommand         = new ChangeViewCommand(this);
     ChangeLightingModeCommand = new ChangeLightingModeCommand(this);
 }
 public MainWindowViewModel()
 {
     _activeView = new EnterPasswordViewModel();
     ChangeViewCommand = new ChangeViewCommand(this);
 }