Esempio n. 1
0
        private void Item_StateChanged(TaskItem item, TaskItemState oldState, TaskItemState newState)
        {
            if (oldState != newState)
            {
                InvokeRemoveStateEvent(item, oldState);
                InvokeAddStateEvent(item, newState);
            }

            TaskItemChanged?.Invoke(item);
        }
Esempio n. 2
0
        public TaskItem[] this[TaskItemState state]
        {
            get
            {
                var items = orderedItems[state].ToArray();
                if (items == null)
                {
                    items = new TaskItem[0];
                }

                return(items);
            }
        }
Esempio n. 3
0
        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;
            }
        }
Esempio n. 4
0
 public TaskListItem(string text, TaskItemState state, IMarkdown markdown)
 {
     Text     = text;
     State    = state;
     Markdown = markdown;
 }
Esempio n. 5
0
 public TaskListItem(string text, TaskItemState state)
 {
     Text  = text;
     State = state;
 }