Exemple #1
0
        private static bool ArePeriodsOrDelaysValid()
        {
            if (Form.StartPeriodicallyButton.Checked || Form.StartConsecutivelyButton.Checked)
            {
                var periodBetween = TaskPeriodUtils.SetPeriod().TimeBetween;

                if (IsTimeSpanExceedingLimit(periodBetween))
                {
                    return(false);
                }
            }

            return(true);
        }
Exemple #2
0
        public static Task CreateTask()
        {
            Task task = new Task
            {
                Id             = -1,
                Name           = form.TaskName.Text,
                ExecutablePath = form.TaskExecutablePath.Text,
                IsRunning      = false,
                ProcessId      = -1,
                Period         = TaskPeriodUtils.SetPeriod(),
                EmailInfo      = EmailUtils.SetEmailInfo()
            };

            return(task);
        }