private void DepthProfileViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e) { // RaiseCanExecuteChangedはここにまとめる. switch (e.PropertyName) { case nameof(ExportCsvDestination): ExportCsvCommand.RaiseCanExecuteChanged(); break; case nameof(CurrentFittingProfile): AddReferenceSpectrumCommand.RaiseCanExecuteChanged(); RemoveProfileCommand.RaiseCanExecuteChanged(); break; case nameof(FitCommandExecuting): FitSpectrumCommand.RaiseCanExecuteChanged(); break; } }
public ImportedVm() { Timekeeping = new Timekeeping(); ShiftExtra = new ShiftExtra(); Transform = new Transform(); TimeList = new ObservableCollection <Timekeeping>(); ShiftExtraList = new ObservableCollection <ShiftExtra>(); AbsencesList = new ObservableCollection <Absences>(); CostCodesList = new ObservableCollection <CostCodes>(); ProjectsList = new ObservableCollection <Project>(); EmployeesList = new ObservableCollection <Employee>(); TimeHistoryList = new ObservableCollection <TimekeepingHistory>(); ShiftHistoryList = new ObservableCollection <ShiftExtraHistory>(); AbsencesHistoryList = new ObservableCollection <AbsencesHistory>(); TransformedList = new ObservableCollection <Transform>(); TransformedViewSource = new CollectionViewSource(); TransformedViewSource.Source = TransformedList; AbsencesViewSource = new CollectionViewSource(); AbsencesViewSource.Source = AbsencesList; CostCodesViewSource = new CollectionViewSource(); CostCodesViewSource.Source = CostCodesList; ProjectsViewSource = new CollectionViewSource(); ProjectsViewSource.Source = ProjectsList; ShiftExtraViewSource = new CollectionViewSource(); ShiftExtraViewSource.Source = ShiftExtraList; TimekeepingViewSource = new CollectionViewSource(); TimekeepingViewSource.Source = TimeList; TransformCommand = new TransformCommand(this); ExportCsvCommand = new ExportCsvCommand(this); RefreshDataCommand = new RefreshDataCommand(this); GetTimeKeepingList(); GetShiftExtraList(); GetAbsencesList(); GetCostCodesList(); GetProjectsList(); GetEmployeesList(); GetTimeHistoryList(); GetShiftHistoryList(); GetAbsencesHistoryList(); GetTransformedList(); }