public override ViewModelBase Initialize() { mViewModel = new CostMonthControlViewModel() { CostPerMonth = new ObservableCollection <MonthlyCost>(MainWindowController.serviceClient.GetMonthlyCosts()) }; return(mViewModel); }
public void ExecuteCostMonthCommand(object obj) { costMonthControlController = new CostMonthControlController(); mViewModel.ActiveViewModel = costMonthControlController.Initialize(); costMonthControlViewModel = (CostMonthControlViewModel)mViewModel.ActiveViewModel; mViewModel.ButtonsEnabled = false; mViewModel.StartCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.StartCurrentForeColor = new SolidColorBrush(Colors.Black); mViewModel.CostMonthCurrentBackColor = new SolidColorBrush(Colors.DodgerBlue); mViewModel.CostMonthCurrentForeColor = new SolidColorBrush(Colors.White); mViewModel.CostBusinessUnitCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.CostBusinessUnitCurrentForeColor = 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.BusinessUnitCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.BusinessUnitCurrentForeColor = new SolidColorBrush(Colors.Black); mViewModel.UserCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.UserCurrentForeColor = new SolidColorBrush(Colors.Black); }