Beispiel #1
0
 public override ViewModelBase Initialize()
 {
     mViewModel = new UnitsControlViewModel()
     {
         BusinessUnits = new ObservableCollection <BusinessUnit>(MainWindowController.serviceClient.GetBusinessUnits())
     };
     return(mViewModel);
 }
 public void ExecuteUnitsCommand(object obj)
 {
     unitsControlController     = new UnitsControlController();
     mViewModel.ActiveViewModel = unitsControlController.Initialize();
     unitsControlViewModel      = (UnitsControlViewModel)mViewModel.ActiveViewModel;
     mViewModel.ButtonsEnabled  = true;
     mViewModel.BusinessUnitCurrentBackColor     = new SolidColorBrush(Colors.DodgerBlue);
     mViewModel.BusinessUnitCurrentForeColor     = new SolidColorBrush(Colors.White);
     mViewModel.CostMonthCurrentBackColor        = new SolidColorBrush(Colors.White);
     mViewModel.CostMonthCurrentForeColor        = new SolidColorBrush(Colors.Black);
     mViewModel.CostBusinessUnitCurrentBackColor = new SolidColorBrush(Colors.White);
     mViewModel.CostBusinessUnitCurrentForeColor = new SolidColorBrush(Colors.Black);
     mViewModel.StartCurrentBackColor            = new SolidColorBrush(Colors.White);
     mViewModel.StartCurrentForeColor            = new SolidColorBrush(Colors.Black);
     mViewModel.VehiclesCurrentBackColor         = new SolidColorBrush(Colors.White);
     mViewModel.VehiclesCurrentForeColor         = new SolidColorBrush(Colors.Black);
     mViewModel.EmployeeCurrentBackColor         = new SolidColorBrush(Colors.White);
     mViewModel.EmployeeCurrentForeColor         = new SolidColorBrush(Colors.Black);
     mViewModel.UserCurrentBackColor             = new SolidColorBrush(Colors.White);
     mViewModel.UserCurrentForeColor             = new SolidColorBrush(Colors.Black);
 }