Beispiel #1
0
 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();
     }
 }
Beispiel #2
0
 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();
     }
 }
Beispiel #3
0
        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();
        }
Beispiel #4
0
        private void CheckFormat(object sender, EventArgs e)
        {
            MaskedTextBox time = (MaskedTextBox)sender;

            time.Text = FormatLines.TimeFormat(time.Text);
        }