//--------------------------------------------------------------------------
 //タスク追加
 //--------------------------------------------------------------------------
 private void AddTask(string path)
 {
     var editTask = new TaskData();
     //かぶらないファイル名を作る
     var co = 1;
     while (true)
     {
         var NumberTaskName = "新しいタスク" + co++;
         if (gTaskList.Count(t => t.Name == NumberTaskName) == 0)
         {
             editTask.Name = NumberTaskName;
             break;
         }
     }
     var eco = 1;
     while (true)
     {
         var NumberExportFolder = "NewTask" + eco++;
         if (gTaskList.Count(t => t.LogFolder == NumberExportFolder) == 0)
         {
             editTask.LogFolder = NumberExportFolder;
             break;
         }
     }
     editTask.ProjectPath = path;
     editTask.ProjectPaths.Add(path);
     editTask.LogPath = path;
     var form = new TaskForm(editTask, gTaskList);
     if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         editTask.Checked = true;
         gTaskList.Add(editTask);
         AddDataGridView(editTask, taskDataBindingSource.Add(editTask));
     }
 }
 //--------------------------------------------------------------------------
 //タスク編集
 //--------------------------------------------------------------------------
 private void EditTask(int idx)
 {
     var editTask = (TaskData)taskDataBindingSource[idx];
     var form = new TaskForm(editTask, gTaskList);
     if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         editTask.SetLastRun();
         taskDataBindingSource[idx] = editTask;
         gTaskList[idx] = editTask;
     }
 }