示例#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
 private void Tasks_TasksRowDeleting(Tasks.TaskChangeEventArgs e)
 {
     tasksRowDeletingEventCount++;
 }
示例#4
0
 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();
 }