Пример #1
0
 private void AddTaskButton_Click(object sender, EventArgs e)
 {
     try {
         TaskForm form = new TaskForm();
         if (form.ShowDialog() == DialogResult.OK)
         {
             POFileManagerService.Configuration.Task task = new POFileManagerService.Configuration.Task();
             task.AllowDuplicate    = form.Task.AllowDuplicate;
             task.DayInterval       = form.Task.DayInterval;
             task.ExternalLib       = form.Task.ExternalLib;
             task.ExternalLibParams = form.Task.ExternalLibParams;
             task.MoveFile          = form.Task.MoveFile;
             task.Name      = form.Task.Name;
             task.Recursive = form.Task.Recursive;
             task.Regex     = form.Task.Regex;
             task.Source    = form.Task.Source;
             AppHelper.Configuration.Tasks.Add(task);
             TasksPage_LoadConf();
         }
     }
     catch (Exception ex) {
         MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #2
0
        private void EditTaskButton_Click(object sender, EventArgs e)
        {
            TaskForm form = new TaskForm();

            form.ShowDialog();
        }