コード例 #1
0
 private void newToDoTask(object sender, EventArgs e)
 {
     using (ToDoItemDialog dialog = new ToDoItemDialog(this._engine))
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             if (dialog.ToDoTask != null && dialog.ToDoTask.TaskDescription != null)
             {
                 _todoTasks.Add(dialog.ToDoTask);
                 _engine.SettingsProvider.Set("ToDoTasks", _todoTasks, PersistHint.AcrossSessions);
                 PopulateListView();
             }
         }
     }
 }
コード例 #2
0
        private void editToDoTask(object sender, EventArgs e)
        {
            ToDoTask toDoTask = listView.Items[listView.SelectedIndices[0]].Tag as ToDoTask;

            using (ToDoItemDialog dialog = new ToDoItemDialog(this._engine, toDoTask))
            {
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    if (dialog.ToDoTask != null && dialog.ToDoTask.TaskDescription != null)
                    {
                        _todoTasks.Add(dialog.ToDoTask);
                        _engine.SettingsProvider.Set("ToDoTasks", _todoTasks, PersistHint.AcrossSessions);
                        PopulateListView();
                    }
                }
            }
        }
コード例 #3
0
 private void editToDoTask(object sender, EventArgs e)
 {
     ToDoTask toDoTask = listView.Items[listView.SelectedIndices[0]].Tag as ToDoTask;
     using (ToDoItemDialog dialog = new ToDoItemDialog(this._engine, toDoTask))
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             if (dialog.ToDoTask != null && dialog.ToDoTask.TaskDescription != null)
             {
                 _todoTasks.Add(dialog.ToDoTask);
                 _engine.SettingsProvider.Set("ToDoTasks", _todoTasks, PersistHint.AcrossSessions);
                 PopulateListView();
             }
         }
     }
 }
コード例 #4
0
 private void newToDoTask(object sender, EventArgs e)
 {
     using (ToDoItemDialog dialog = new ToDoItemDialog(this._engine))
     {
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             if (dialog.ToDoTask != null && dialog.ToDoTask.TaskDescription != null)
             {
                 _todoTasks.Add(dialog.ToDoTask);
                 _engine.SettingsProvider.Set("ToDoTasks", _todoTasks, PersistHint.AcrossSessions);
                 PopulateListView();
             }
         }
     }
 }