Ejemplo n.º 1
0
 private void zEditScheduledTaskProperties(ScheduledTask task)
 {
     if (task != null)
     {
         frmScheduledTaskProperties frm = new frmScheduledTaskProperties(task, false);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             WebHawkAppContext.SchedulingController.SaveScheduledTask(task);
             WebHawkAppContext.Scheduler.ScheduleTask(task);
             zRefreshScheduledTasks();
         }
     }
 }
Ejemplo n.º 2
0
        private void newScheduledTaskToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ScheduledTask newScheduledTask = new ScheduledTask()
            {
                TaskName = "New Scheduled Task",
                Enabled  = true
            };
            frmScheduledTaskProperties frm = new frmScheduledTaskProperties(newScheduledTask, true);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                WebHawkAppContext.SchedulingController.SaveScheduledTask(newScheduledTask);
                WebHawkAppContext.Scheduler.ScheduleTask(newScheduledTask);
                zRefreshScheduledTasks();
            }
        }