private void SaveNewTempalte()
 {
     CleanUpPropertiesBeforeSave();
     Templates.Add(SelectedTemplate);
     selectedIndex = Templates.IndexOf(SelectedTemplate);
     TemplateManagerDAO.Save(Templates);
 }
 private void DeleteTemplate()
 {
     Templates.RemoveAll(t => t.Name.Equals(SelectedTemplate.Name));
     SelectedTemplate    = Templates.FirstOrDefault();
     selectedIndex       = Templates.IndexOf(SelectedTemplate);
     lastTemplateUpdated = SelectedTemplate.Name;
     TemplateManagerDAO.Save(Templates);
 }
 private void UpdateTemplate()
 {
     CleanUpPropertiesBeforeSave();
     Templates.RemoveAt(selectedIndex);
     Templates.Add(SelectedTemplate);
     selectedIndex       = Templates.IndexOf(SelectedTemplate);
     lastTemplateUpdated = SelectedTemplate.Name;
     TemplateManagerDAO.Save(Templates);
 }