private void Item_StateChanged(TaskItem item, TaskItemState oldState, TaskItemState newState) { if (oldState != newState) { InvokeRemoveStateEvent(item, oldState); InvokeAddStateEvent(item, newState); } TaskItemChanged?.Invoke(item); }
public TaskItem[] this[TaskItemState state] { get { var items = orderedItems[state].ToArray(); if (items == null) { items = new TaskItem[0]; } return(items); } }
void InvokeRemoveStateEvent(TaskItem item, TaskItemState state) { switch (state) { case TaskItemState.Pending: RemovedInputItem?.Invoke(item); break; case TaskItemState.Processing: RemovedItemProcessing?.Invoke(item); break; case TaskItemState.Done: RemovedOutputItem?.Invoke(item); break; } }
public TaskListItem(string text, TaskItemState state, IMarkdown markdown) { Text = text; State = state; Markdown = markdown; }
public TaskListItem(string text, TaskItemState state) { Text = text; State = state; }