public void Reset() { BeginDate = DateTime.Parse("20.12.2016"); EndDate = DateTime.Now; Plotnost.Clear(); General.Clear(); AllLayer.Clear(); General.Clear(); Layer1.Clear(); Layer2.Clear(); Layer3.Clear(); InfoVision = false; ButtonVisibility = false; RegulationAll = false; RegulationCoun = false; RegulationGen = false; RegulationLayer1 = false; RegulationLayer2 = false; RegulationLayer3 = false; RegulationPlotn = false; var tempTime = string.Format("{0} {1}:{2}:{3}", DateTime.Now.ToShortDateString(), DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second); var startstop = new ReadStartStop("20.12.2016 18:00:00", tempTime); _startStops = startstop.GetMassurm3(); Get(); }
public void Filter() { try { _selectRoad = new DataRoad { SelectbeginDate = BeginDate.ToString(), SelectendDate = EndDate.ToString() }; var startstop = new ReadStartStop(_selectRoad.SelectbeginDate, _selectRoad.SelectendDate); _startStops = startstop.GetMassurm3(); Get(); } catch (Exception) { MessageBox.Show(@"Выберите дату", @"Ошибка выбора даты", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } }
public MainViewModel(IDataService dataService) { InfoVision = false; ButtonVisibility = false; RegulationDrop = false; RegulationGen = false; RegulationPlotn = false; RegulationCoun = false; RegulationLayer1 = false; RegulationLayer2 = false; RegulationLayer3 = false; RegulationAll = false; Report = false; dataService.GetData( (item, error) => { if (error != null) { } }); BeginDate = DateTime.Parse("20.12.2016"); var tempTime = string.Format("{0} {1}:{2}:{3}", DateTime.Now.ToShortDateString(), DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second); var startstop = new ReadStartStop("21.12.2016 17:00:00", "21.12.2016 18:00:00"); _startStops = startstop.GetMassurm3(); Get(); CleanRelayCommand = new RelayCommand(Clean); AddRelayCommand = new RelayCommand(Add); OkRelayCommand = new RelayCommand(Select); FilterRelayCommand = new RelayCommand(Filter); ResetRelayCommand = new RelayCommand(Reset); VisionRelayCommand = new RelayCommand(Vision); GraffCountCommand = new RelayCommand <string>(Graff); }