Пример #1
0
        private void EnableChecklist()
        {
            this.isChecklist = true;

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

                Checklist.Clear();
                foreach (string line in lines)
                {
                    Checklist.Add(ChecklistItem.FromText(line));
                }
            }

            Text = "";
        }
Пример #2
0
        private void replaceChecklist(Checklist list)
        {
            if (Checklist.Count <= 0 && (list == null || list.Count <= 0))
            {
                return;
            }

            Checklist.Clear();

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

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

            return;
        }