public ChecklistElementVM(int id, ChecklistElementInfo ceInfo, 
            DateTime? resolveTime, GroupVM parentGroup)
        {
            ItemID = id;

            Title = ceInfo.Title;
            BackgroundColor = ceInfo.BackgroundColor;
            FontColor = ceInfo.FontColor;
            FontSize = ceInfo.FontSize;
            FontName = ceInfo.FontName;
            BeginTime = ceInfo.BeginTime;

            ResolveTime = resolveTime;

            ParentGroup = parentGroup;
        }
Пример #2
0
 public TaskVM(int id, TaskInfo taskInfo, TaskStatuses status, DateTime? resolveTime, GroupVM parentGroup = null)
     : base(id, taskInfo, resolveTime, parentGroup)
 {
     Details = taskInfo.Details;
     Status = status;
 }
Пример #3
0
 public GroupVM(int id, GroupInfo groupInfo, DateTime? resolveTime, GroupVM parentGroup = null)
     : base(id, groupInfo, resolveTime, parentGroup)
 {
     IsExpanded = groupInfo.IsExpanded;
     CurrentIndex = -1;
 }
Пример #4
0
        private ChecklistElementVM ConstructVmTree(ChecklistElementBLL bllNode, GroupVM parentGroup)
        {
            ChecklistElementVM ret = null;

            if (bllNode is TaskBLL)
            {
                ret = EntityConverter.TaskBllToTaskVm(bllNode as TaskBLL);
                ret.ParentGroup = parentGroup;
            }
            else if (bllNode is GroupBLL)
            {
                ret = EntityConverter.GroupBllToGroupVm(bllNode as GroupBLL);
                GroupVM grp = ret as GroupVM;

                grp.ParentGroup = parentGroup;
                grp.Items = new ObservableCollection<ChecklistElementVM>();

                foreach (ChecklistElementBLL ce in (bllNode as GroupBLL).Items)
                    grp.Items.Add(ConstructVmTree(ce, grp));

            }

            return ret;
        }