Exemple #1
0
 private void _showMainView(object sender, EventArgs e)
 {
     Logger.Log("Lancement de la fenêtre principale (post login)");
     UserEntity userEntity = new UserEntity(_user);
     MainWindowViewModel mainViewModel = new MainWindowViewModel(userEntity);
     ViewDriverProvider.ViewDriver.CloseAndShowNewMainWindow<MainWindowViewModel>(mainViewModel);
     _timer.IsEnabled = false;
 }
        public MainWindowViewModel(UserEntity user)
        {
            Logger.Log("=Initialisation Fenêtre principale (post login)=");
            _pcs = new PropertyChangeSupport(this);
            _user = user;
            _currentEntities = new ObservableCollection<INavigableViewModel>();
            _title = "Resotel - Facturation";
            _navigation = new LinkedList<INavigableViewModel>();

            _addBookingCommand = new DelegateCommand<object>(_addBooking);
            _closeBookingCommand = new DelegateCommand<IEntity>(_closeBooking);
            _addClientCommand = new DelegateCommand<object>(_addClient);
            _searchBookingCommand = new DelegateCommandAsync<object>(_searchBooking);
            _searchClientCommand = new DelegateCommandAsync<object>(_searchClient);
            _logoutCommand = new DelegateCommand<object>(_logOut);
            _nextCommand = new DelegateCommand<BookingViewModel>(_next);
            _prevCommand = new DelegateCommand<BookingViewModel>(_prev);
            Logger.Log("=fenêtre principale initialisée (post login)=");
        }