예제 #1
0
 private void Tasks_TasksRowChanged(Tasks.TaskChangeEventArgs e)
 {
     if (e.Action == DataRowAction.Add)
     {
         TreeListViewItem nodeParent = FindTaskNode(e.Task.ParentId);
         TreeListViewItem nodeChild = CreateNode(e.Task);
         nodeParent.Items.Add(nodeChild);
         return;
     }
     else if (e.Action == DataRowAction.Change)
     {
         TreeListViewItem node = FindTaskNode(e.Task.Id);
         node.Text = e.Task.Description;
         node.ImageIndex = e.Task.IconId;
         string priority = e.Task.Priority == 0 ? String.Empty : e.Task.Priority.ToString();
         node.SubItems[priorityColumnHeader.Index].Text = priority;
     }
 }
예제 #2
0
 private void Tasks_TasksRowDeleting(Tasks.TaskChangeEventArgs e)
 {
     TreeListViewItem node = FindTaskNode(e.Task.Id);
     if (node != null && node.ListView != null)
         node.Remove();
 }
예제 #3
0
파일: TasksTest.cs 프로젝트: ckolumbus/ptm
 private void Tasks_TasksRowDeleting(Tasks.TaskChangeEventArgs e)
 {
     tasksRowDeletingEventCount++;
 }
예제 #4
0
파일: TasksTest.cs 프로젝트: ckolumbus/ptm
 private void Tasks_TasksRowChanged(Tasks.TaskChangeEventArgs e)
 {
     if (e.Action == DataRowAction.Add)
         tasksRowChangedEvent_RowAddedCount++;
     else if (e.Action == DataRowAction.Change)
         this.tasksRowChangedEvent_RowUpdatedCount++;
 }
예제 #5
0
 private void Tasks_TasksRowDeleted(Tasks.TaskChangeEventArgs e)
 {
     CreateNotifyMenu();
     CreateRigthClickMenu();
     DisplaySelectedItemStatus();
 }
예제 #6
0
 private void TasksDataTable_TasksRowDeleting(Tasks.TaskChangeEventArgs e)
 {
     if (e.Action == DataRowAction.Delete)
     {
         for (int i =0; i<this.taskList.Items.Count;i++)
         {
             if (((Log) this.taskList.Items[i].Tag).TaskId == e.Task.Id)
             {
                 this.taskList.Items.RemoveAt(i);
                 return;
             }
         }
     }
 }
예제 #7
0
 private void TasksDataTable_TasksRowChanged(Tasks.TaskChangeEventArgs e)
 {
     if (e.Action == DataRowAction.Change)
     {
         foreach (ListViewItem item in this.taskList.Items)
         {
             if (((Log) item.Tag).TaskId == e.Task.Id)
             {
                 if (this.pathCheckBox.Checked)
                     item.SubItems[TaskDescriptionHeader.Index].Text = Tasks.GetFullPath(e.Task.Id);
                 else
                     item.SubItems[TaskDescriptionHeader.Index].Text = e.Task.Description;
                 item.ImageIndex = e.Task.IconId;
             }
         }
     }
     if(e.Task.Id == Tasks.CurrentTask.Id)
         UpdateNotifyIcon();
     CreateNotifyMenu();
     CreateRigthClickMenu();
     DisplaySelectedItemStatus();
 }