Ejemplo n.º 1
0
        public XElement GetTemplateByType(CodeFileType type)
        {
            var doc = XDocument.Load(Directory.GetCurrentDirectory() + "\\App_Data\\IntelliCode.ct");

            return doc.Descendants("Name").Where(d => d.Value == type.ToString())
                        .Select(d => d.Parent).SingleOrDefault();
        }
Ejemplo n.º 2
0
        private void FillDataExtracted(CodeFileType fileType, TextBox obj, TextBox objName)
        {

            var section = _template.GetTemplateByType(fileType.ToString()).TemplatSections;
            obj.Text = section.Find(s => s.Name == "FileLocation").Value;
            objName.Text = section.Find(s => s.Name == "FileName").Value;
        }
Ejemplo n.º 3
0
 private void SaveData(CodeFileType fileType, TextBox obj, TextBox objName)
 {
     _template.SaveTemplateSection(obj.Text, fileType.ToString(), "FileLocation");
     _template.SaveTemplateSection(objName.Text, fileType.ToString(), "FileName");
 }