コード例 #1
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            AddStep      ads = new AddStep();
            DialogResult dr  = ads.ShowDialog();

            if (dr == DialogResult.OK)
            {
                ModuleTask mt = new ModuleTask();
                mt.Description  = ads._Description;
                mt.Title        = ads._Titel;
                mt.Completeness = 0;
                int moduleindex = GetSelectedModuleAt(cbProjectsTodolist.SelectedIndex);
                Log.System(string.Format("Adding task to module with index : {0}", moduleindex));
                _ProjectManager.AddTaskToModule(moduleindex, mt);
                BuildMainToduList();
            }
        }
コード例 #2
0
        private void btnTaskEdit_Click(object sender, EventArgs e)
        {
            if (clbMainTaskList.SelectedItem == null)
            {
                return;
            }
            AddStep      ads = new AddStep(clbMainTaskList.SelectedItem.Title, clbMainTaskList.SelectedItem.Description);
            DialogResult dr  = ads.ShowDialog();

            if (dr == DialogResult.OK)
            {
                ModuleTask mt = new ModuleTask();
                mt.Description = ads._Description;
                mt.Title       = ads._Titel;
                int moduleindex = GetSelectedModuleAt(cbProjectsTodolist.SelectedIndex);
                mt.Completeness = clbMainTaskList.SelectedItem.Completeness;
                int taskid   = clbMainTaskList.IndexOf(clbMainTaskList.SelectedItem);
                int moduleid = GetSelectedModuleAt(cbProjectsTodolist.SelectedIndex);
                _ProjectManager.ChangeTaskInModule(moduleid, taskid, mt);
                Log.System("Done Changing Task");
                BuildMainToduList();
            }
        }