private void CreateTemplates()
    {
        if (IsGetNewTemplate)
        {
            Response.Write(GetTemplateContent(new OracleCodeBuilderLibrary.Settings().ToXml(), "Create", "TemplateExec('txtTemplate',1);"));
            Response.End();
        }
        else
        {
            try
            {
                OracleCodeBuilderLibrary.Settings st = new OracleCodeBuilderLibrary.Settings();
                st = st.FormXml(Content);
                string filePath = string.Concat(OracleTemplate.GetSettingsPath(), st.ProjectName);
                WorkStudioLibrary.Logging.Files.Log.Info(string.Concat("Create new template:", st.ProjectName));
                if (System.IO.File.Exists(filePath))
                {
                    JsonError(string.Concat("Project name \"", st.ProjectName, "\" was existed."));
                }
                else
                {
                    System.IO.File.WriteAllText(OracleTemplate.GetSettingsPath() + st.ProjectName, st.ToXml());
                    JsonSuccess();
                }

            }
            catch (Exception ex)
            {
                JsonError(ex.Message);
            }
        }
    }
 public static OracleCodeBuilderLibrary.Settings GetSettingsByProjectName(string n)
 {
     OracleCodeBuilderLibrary.Settings s = new OracleCodeBuilderLibrary.Settings();
     s = s.FormXml(System.IO.File.ReadAllText(string.Concat(GetSettingsPath(), n)));
     return s;
 }
 private void EditTemplates()
 {
     if (IsGetNewTemplate)
     {
         try { Response.Write(GetTemplateContent(OracleTemplate.GetSettingsByProjectName(ProjectName).ToXml(), "Save", "TemplateExec('txtTemplate',2);")); }
         catch (Exception ex) { Response.Write(ex.Message); }
         Response.End();
     }
     else
     {
         try
         {
             OracleCodeBuilderLibrary.Settings st = new OracleCodeBuilderLibrary.Settings();
             st = st.FormXml(Content);
             string filePath = string.Concat(OracleTemplate.GetSettingsPath(), st.ProjectName);
             WorkStudioLibrary.Logging.Files.Log.Info(string.Concat("Edit template:", st.ProjectName));
             System.IO.File.WriteAllText(OracleTemplate.GetSettingsPath() + st.ProjectName, st.ToXml());
             JsonSuccess();
         }
         catch (Exception ex)
         {
             JsonError(ex.Message);
         }
     }
 }