示例#1
0
        private void initSingleListItemFromComponent(string[] components, IListNote note)
        {
            string        content     = components[0];
            bool          highlighted = bool.Parse(components[1]);
            ItemsModifier modifier    = new ItemsModifier();

            modifier.TryAddToList(note, new ListItem(highlighted, content));
        }
        private void handleAddingItem(IListNote note)
        {
            Console.WriteLine("Type item content");
            string content = Console.ReadLine();

            Console.WriteLine("Is checked? (Y/n)");
            bool          isChecked = Console.ReadLine() == "n" ? false : true;
            ItemsModifier modifier  = new ItemsModifier();

            modifier.TryAddToList(note, new ListItem(isChecked, content));
        }