Esempio n. 1
0
        /// <summary>
        /// タスクを追加
        /// </summary>
        private void tolAddTask_Click(object sender, EventArgs e)
        {
            var Dlg = new Dialog.Schedule.dlgEditTask(this.mgr, new mgrSchedule.TaskData());

            Dlg.Text = Dlg.Text.Replace("編集", "追加");
            if (Dlg.ShowDialog() == DialogResult.OK)
            {
                this.IsDirty = true;
                this.mgr.Tasks.Add(Dlg.Result);
                this.ApplyToForm();
            }
        }
Esempio n. 2
0
 /// <summary>
 /// タスクを編集
 /// </summary>
 private void ltvData_DoubleClick(object sender, EventArgs e)
 {
     if (this.ltvData.SelectedIndices.Count > 0)
     {
         var Dlg = new Dialog.Schedule.dlgEditTask(this.mgr, this.mgr.Tasks[this.ltvData.SelectedIndices[0]]);
         if (Dlg.ShowDialog() == DialogResult.OK)
         {
             //ダイアログの中で現在のタスク情報が変更されている
             this.IsDirty = true;
             this.ApplyToForm();     //mgrをltvに反映
         }
     }
 }