예제 #1
0
        private void MnuOpen_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            FolderCleanerConfigProjectsProject p = e.ClickedItem.Tag as FolderCleanerConfigProjectsProject;

            if (p != null)
            {
                LoadProject(p);
            }
        }
예제 #2
0
 public bool Init()
 {
     _project = ConfigurationHelper.Default.Projects.ProjectByName(TaskName);
     foreach (FolderCleanerConfigTask task in _project.Tasks)
     {
         task.Runner = new TaskRunner(task, _progressForm);
         task.Init();
     }
     return(_project != null && _project.Tasks != null);
 }
예제 #3
0
 private void LoadProject(FolderCleanerConfigProjectsProject proj)
 {
     try
     {
         _isLoading = true;
         var taskList = proj.TaskRef.Select(t => t.Name).ToArray();
         for (int i = 0; i < lstTasks.Items.Count; i++)
         {
             lstTasks.SetItemChecked(i, taskList.Contains(lstTasks.Items[i].ToString()));
         }
     }
     catch (Exception ex)
     {
         ErrorHandler.Handle(ex, "Error while loading project.");
     }
     finally
     {
         _isLoading = false;
     }
 }