Ejemplo n.º 1
0
        internal static void Init()
        {
            new Thread(() => {
                const string schedulerFilename = ".scheduler";

                if (File.Exists(Methods.Instance.GetApplicationPath() + schedulerFilename))
                {
                    if (ScheduleList.Count > 0)
                    {
                        ScheduleList.Clear();
                    }
                    var scheduleSettings = new Settings();
                    var Schedules        = scheduleSettings.LoadSettings(schedulerFilename);
                    foreach (string schedule in Schedules)
                    {
                        if (schedule != string.Empty)
                        {
                            var s = schedule.ToSchedule();
                            int i;
                            if (int.TryParse(s.Time, out i))
                            {
                                Add(s, i);
                            }
                            else
                            {
                                Add(s);
                            }
                        }
                    }
                }
            }).Start();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// initialize scheduler.
        /// </summary>
        internal static void Init()
        {
            new Thread(() =>
            {
                const string schedulerFilename = ".scheduler";

                if (File.Exists(Methods.Instance.GetApplicationPath() + schedulerFilename))
                {
                    if (ScheduleList.Count > 0)
                    {
                        ScheduleList.Clear();
                    }
                    var scheduleSettings     = new Settings();
                    IList <String> Schedules = scheduleSettings.LoadSettings(schedulerFilename);
                    foreach (string schedule in Schedules)
                    {
                        if (schedule != string.Empty)
                        {
                            Add(schedule.ToSchedule());
                        }
                    }
                    //Judoers.JudoParser("judo schedule add " + schedule);
                }
            }).Start();
        }
Ejemplo n.º 3
0
        internal static void Init()
        {
            new Thread(() => {
                const string schedulerFilename = ".scheduler";

                if (File.Exists(Methods.Instance.GetApplicationPath() + schedulerFilename)) {
                    if (ScheduleList.Count > 0)
                        ScheduleList.Clear();
                    var scheduleSettings = new Settings();
                    IList<String> Schedules = scheduleSettings.LoadSettings(schedulerFilename);
                    foreach (string schedule in Schedules)
                        if (schedule != string.Empty) {
                            var s = schedule.ToSchedule();
                            int i;
                            if (int.TryParse(s.Time, out i))
                                Add(s, i);
                            else
                                Add(s);
                        }
                }
            }).Start();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// initialize scheduler.
        /// </summary>
        internal static void Init()
        {
            new Thread(() =>
            {
                const string schedulerFilename = ".scheduler";

                if (File.Exists(Methods.Instance.GetApplicationPath() + schedulerFilename))
                {
                    if (ScheduleList.Count > 0)
                        ScheduleList.Clear();
                    var scheduleSettings = new Settings();
                    IList<String> Schedules = scheduleSettings.LoadSettings(schedulerFilename);
                    foreach (string schedule in Schedules)
                        if (schedule != string.Empty)
                            Add(schedule.ToSchedule());
                            //Judoers.JudoParser("judo schedule add " + schedule);
                }
            }).Start();
        }