private bool ValidateInput(TextBox tb, string Txt, out int CurrentValue) { if (int.TryParse(Txt, out CurrentValue)) return (CurrentValue < tb.get_Max() && CurrentValue >= tb.get_Min()); return false; }
private void DecrementValue(TextBox tb, int NewValue) { NewValue = (NewValue > tb.get_Min()) ? NewValue - 1 : tb.get_Max() - 1; NewValue = AdjustHalfDayHour(tb, NewValue); Value = Value.ResetTime(NewValue, tb.get_HMSType()); }