Exemple #1
0
 public AddAction(ref ScheduledTask task, ClientThread client, ServerMain dialog)
 {
     InitializeComponent();
     this.task = task;
     this.client = client;
     this.dialog = dialog;
 }
Exemple #2
0
        void StepThroughEachTaskSubFolder(TaskFolder fold)
        {
            string taskName, taskDescription;

            foreach (Task task in fold.Tasks)
            {
                taskName = task.Name;
                taskDescription = task.Definition.RegistrationInfo.Description;
                ScheduledTask st = new ScheduledTask(taskName, taskDescription);
                st.CopyTriggers(task.Definition.Triggers.ToList());
                try
                {

                    List<ExecAction> actions = task.Definition.Actions.Cast<ExecAction>().ToList();
                    st.CopyActions(actions);

                }
                catch (Exception e)
                {
                }
                scheduledTasks.Add(st);
            }

            foreach (TaskFolder tf in fold.SubFolders)
            {
                StepThroughEachTaskSubFolder(tf);
            }
        }
Exemple #3
0
 internal string AddTask(string taskName, string description, string path)
 {
     ScheduledTask t = new ScheduledTask(taskName, description,path);
     t.RegisterTask();
     return "Done";
 }