Exemplo n.º 1
0
 public void deleteTemplate(string name)
 {
     try
     {
         Directory.Delete(Path.Combine(ConfigurationManager.AppSettings.Get("TEMPLATES_ROOT"), name), true);
         LocalEventManager.OnTemplatesChanged();
     }
     catch (DirectoryNotFoundException e)
     {
         MessageBox.Show(Properties.Resources.templateDoesNotExistErrorMessage);
     }
 }
Exemplo n.º 2
0
        public bool createTemplate(string name)
        {
            verifyRoot();

            try
            {
                Directory.CreateDirectory(Path.Combine(ConfigurationManager.AppSettings.Get("TEMPLATES_ROOT"), name));
                LocalEventManager.OnTemplatesChanged();

                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }