private void rightSplitter_SplitterMoving(object sender, SplitterEventArgs e) { try { ObjectStateController.SwitchState("AdjustingTimeRangeByScroller"); if (e.SplitX < leftEmptyPanel.Size.Width + 3) { e.SplitX = leftEmptyPanel.Size.Width + 3; } if (e.SplitX == leftEmptyPanel.Size.Width + 3) { RefreshEndDateTime(StartDateTime); } else { int value = e.SplitX - 3; DateTime dateTime = CalculateDateTimeByStepValue(value); RefreshEndDateTime(dateTime); } } catch (Exception e2) { ExceptionManager.GeneralExceptionFilter(e2); } }
private void endDateTimePicker_ValueChanged(object sender, EventArgs e) { ObjectStateController.SwitchState("AdjustingTimeRangeByDTPicker"); if (StartDateTime > EndDateTime) { endDateTimePicker.Value = startDateTimePicker.Value; } RefreshDateTimeRange(StartDateTime, EndDateTime); InternalEventTriggerHelper(); ObjectStateController.SwitchState(); }
public void RefreshSelectedTimeRange(DateTime start, DateTime end) { if (start > end) { start = end; } ObjectStateController.SwitchState("RefreshState"); RefreshStartDateTime(start); RefreshEndDateTime(end); RefreshDateTimeRange(StartDateTime, EndDateTime); ObjectStateController.SwitchState(); }
private void leftSplitter_SplitterMoving(object sender, SplitterEventArgs e) { try { ObjectStateController.SwitchState("AdjustingTimeRangeByScroller"); int splitX = e.SplitX; DateTime dateTime = CalculateDateTimeByStepValue(splitX); RefreshStartDateTime(dateTime); } catch (Exception e2) { ExceptionManager.GeneralExceptionFilter(e2); } }
public void RefreshTimeRange(DateTime start, DateTime end) { if (start > end) { start = end; } ObjectStateController.SwitchState("RefreshState"); startDateTimePicker.MaxDate = DateTimePicker.MaximumDateTime; startDateTimePicker.MinDate = DateTimePicker.MinimumDateTime; endDateTimePicker.MaxDate = DateTimePicker.MaximumDateTime; endDateTimePicker.MinDate = DateTimePicker.MinimumDateTime; DateTime dateTime = Utilities.RoundDateTimeToSecond(start); DateTime dateTime2 = Utilities.RoundDateTimeToSecond(end); if (dateTime >= DateTimePicker.MinimumDateTime && dateTime <= DateTimePicker.MaximumDateTime && dateTime2 >= DateTimePicker.MinimumDateTime && dateTime2 <= DateTimePicker.MaximumDateTime) { startDateTimePicker.MaxDate = dateTime2; startDateTimePicker.MinDate = dateTime; endDateTimePicker.MaxDate = startDateTimePicker.MaxDate; endDateTimePicker.MinDate = startDateTimePicker.MinDate; } ObjectStateController.SwitchState(); }
private void rightSplitter_SplitterMoved(object sender, SplitterEventArgs e) { InternalEventTriggerHelper(); ObjectStateController.SwitchState(); }