示例#1
0
        public TaskWpf(Task task, TaskWpf parent)
        {
            _task = task;
            _parent = parent;
            if (IsOverEstimatedTime())
                TaskColor = "Red";
            else
                TaskColor = "YellowGreen";

            _state = TaskState.Stoped;

            List<TaskWpf> tasks = new List<TaskWpf>();
            if (task.Childrens != null)
            {
                foreach (var t in task.Childrens)
                {
                    tasks.Add(new TaskWpf(t, this));
                }
            }
            this.Childrens = tasks;

            ImageSource = srcOkButton;
        }
示例#2
0
        private void AddToBin(Task task, string filePath)
        {
            if (task != null)
            {
                XmlLogic.AddToXml(task, filePath);
                unsortedTasks.RemoveAt(listBoxTasks.SelectedIndex);
                listBoxTasks.eReloadDataSource();
                XmlLogic.AddToXml(unsortedTasks, set.BinPath);

            }
        }