예제 #1
0
 private void ExecuteDeleteCommand(int index)
 {
     if (index < 0 || index >= TemlpateList.Count)
     {
         return;
     }
     TemlpateList.RemoveAt(index);
 }
예제 #2
0
        private void ExecuteSaveCommand()
        {
            if (string.IsNullOrEmpty(Title))
            {
                return;
            }
            var item = new TemplateItem(Title, Content, IsHtml);

            if (_index < 0)
            {
                TemlpateList.Add(item);
            }
            else
            {
                TemlpateList[_index] = item;
            }
            _init();
        }