コード例 #1
0
        /// <summary>
        /// Проверка задач
        /// </summary>
        /// <param name="tasks">лист задач</param>
        void CheckScheduleTasks(List <Task> tasks)
        {
            for (int i = 0; i < tasks.Count; i++)
            {
                if (tasks[i].timeSwitch.Hour == DateTime.Now.Hour && tasks[i].timeSwitch.Minute == DateTime.Now.Minute)
                {
                    if (tasks[i].type == GlobalSetting.typeSheduleActive.mainSchedule)
                    {
                        rb_mainSchedule.IsChecked    = true;
                        rb_reducedSchedule.IsChecked = false;

                        isMainSchedule     = true;
                        isReducedSchedule  = false;
                        isSuterdaySchedule = false;

                        tasks.RemoveAt(i);
                        TaskShedule.SaveTaskXML();
                    }
                    else if (tasks[i].type == GlobalSetting.typeSheduleActive.reducedSchedule)
                    {
                        rb_mainSchedule.IsChecked    = false;
                        rb_reducedSchedule.IsChecked = true;

                        isMainSchedule     = false;
                        isReducedSchedule  = true;
                        isSuterdaySchedule = false;

                        tasks.RemoveAt(i);
                        TaskShedule.SaveTaskXML();
                    }
                    else if (tasks[i].type == GlobalSetting.typeSheduleActive.trainingAllertCall)
                    {
                        GlobalSetting.PlaySoundTrainingAllertCall();

                        tasks.RemoveAt(i);
                        TaskShedule.SaveTaskXML();
                    }
                }
            }
        }
コード例 #2
0
 private void testSoundCall_Click(object sender, RoutedEventArgs e)
 {
     GlobalSetting.PlaySound(tb_SoundCall.Text);
 }
コード例 #3
0
 private void saveSetting_Click(object sender, RoutedEventArgs e)
 {
     GlobalSetting.SaveSettings();
 }
コード例 #4
0
 private void testSoundAlert_Click(object sender, RoutedEventArgs e)
 {
     GlobalSetting.PlaySound(tb_TreningAlert.Text);
 }