private void TextEnd_Leave(object sender, EventArgs e) { TextEnd.Text = FormatLines.TimeFormat(TextEnd.Text); BeginTimeIsLessThenEndTimeCheck(); if (firstEndChange == true && endChanged == true) { ChangeAllDays(ref firstEndChange); } else { FromTimePickToSchedule(); } }
private void TextBegin_Leave(object sender, EventArgs e) { TextBegin.Text = FormatLines.TimeFormat(TextBegin.Text); BeginTimeIsLessThenEndTimeCheck(); if (firstBeginChange == true && beginChanged == true) { ChangeAllDays(ref firstBeginChange); //при первом изменении, изменяется расписание всех дней } else { FromTimePickToSchedule(); } }
private void GetSettingsValues() { string sleepHrBegin = UserSettings.SleepTimeBegin < 10 ? $"0{UserSettings.SleepTimeBegin}:" : $"{UserSettings.SleepTimeBegin}:"; string sleepHrEnd = UserSettings.SleepTimeBegin < 10 ? $"0{UserSettings.SleepTimeEnd}:" : $"{UserSettings.SleepTimeEnd}:"; MTBSleepBegin.Text = FormatLines.TimeFormat(sleepHrBegin); MTBSleepEnd.Text = FormatLines.TimeFormat(sleepHrEnd); TBHrsToRest.Text = UserSettings.HoursToRestNotify.ToString(); TBHrsToWork.Text = UserSettings.HoursToWorkNotify.ToString(); TBGetStatsHrs.Text = UserSettings.EmploymentCheckRange.ToString(); TBFunHrsPerWeek.Text = UserSettings.WeekFunTime.ToString(); ChBMotivHints.Checked = UserSettings.MotivationalHints.ToString() == Codes.fileTrue ? true : false; ChBCloseGames.Checked = UserSettings.StopGames.ToString() == Codes.fileTrue ? true : false; TBHrsToStopGms.Text = UserSettings.HrsToStopGame.ToString(); }
private void CheckFormat(object sender, EventArgs e) { MaskedTextBox time = (MaskedTextBox)sender; time.Text = FormatLines.TimeFormat(time.Text); }