示例#1
0
        private void replaceChecklist(Checklist list)
        {
            Checklist.Clear();

            if (list == null || list.Count <= 0)
            {
                return;
            }

            foreach (var item in list)
            {
                Checklist.Add(item);
            }

            return;
        }
示例#2
0
        private void EnableChecklist()
        {
            this.isChecklist = true;

            if (!(string.IsNullOrEmpty(Text)))
            {
                string[] lines = Text.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);

                this.Checklist = new Checklist();
                foreach (string line in lines)
                {
                    Checklist.Add(new ChecklistItem(line));
                }
            }

            Text = "";
        }