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; } }
private void Tasks_TasksRowDeleting(Tasks.TaskChangeEventArgs e) { TreeListViewItem node = FindTaskNode(e.Task.Id); if (node != null && node.ListView != null) node.Remove(); }
private void Tasks_TasksRowDeleting(Tasks.TaskChangeEventArgs e) { tasksRowDeletingEventCount++; }
private void Tasks_TasksRowChanged(Tasks.TaskChangeEventArgs e) { if (e.Action == DataRowAction.Add) tasksRowChangedEvent_RowAddedCount++; else if (e.Action == DataRowAction.Change) this.tasksRowChangedEvent_RowUpdatedCount++; }
private void Tasks_TasksRowDeleted(Tasks.TaskChangeEventArgs e) { CreateNotifyMenu(); CreateRigthClickMenu(); DisplaySelectedItemStatus(); }
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; } } } }
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(); }