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; }
public TaskVM(int id, TaskInfo taskInfo, TaskStatuses status, DateTime? resolveTime, GroupVM parentGroup = null) : base(id, taskInfo, resolveTime, parentGroup) { Details = taskInfo.Details; Status = status; }
public GroupVM(int id, GroupInfo groupInfo, DateTime? resolveTime, GroupVM parentGroup = null) : base(id, groupInfo, resolveTime, parentGroup) { IsExpanded = groupInfo.IsExpanded; CurrentIndex = -1; }
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; }