private void replaceChecklist(Checklist list) { Checklist.Clear(); if (list == null || list.Count <= 0) { return; } foreach (var item in list) { Checklist.Add(item); } return; }
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 = ""; }