private void OnTimeValuChangedCommandExecute() // выбрали какое то время { Thread thread = new Thread(() => { Thread.Sleep(200); // ожидание непосредственного изменения свойства LastTimePickerHelper helper = new LastTimePickerHelper(FirstTime); StartLastTime = helper.StartLastTime; LastTime = helper.LastTime; IsEnabledTimePickers = true; }); thread.Start(); }
private void SetViewModelProperties(Reservation reservation) { FirstTimePickerHelper fHelper = new FirstTimePickerHelper(reservation.Day.ToShortDateString()); StartFirstTime = fHelper.StartFirstTime; FirstTime = reservation.FirstTime.ToShortTimeString(); LastTimePickerHelper lHelper = new LastTimePickerHelper(FirstTime); StartLastTime = lHelper.StartLastTime; LastTime = reservation.LastTime.ToShortTimeString(); DateText = reservation.Day.ToShortDateString(); SelectedItemTable = Tables.FirstOrDefault(table => table.Id == reservation.TableId); IsEnabledTimePickers = true; }