Пример #1
0
 private void RenderHeader(HtmlTextWriter writer)
 {
     writer.AddAttribute(HtmlTextWriterAttribute.Id, HeaderID);
     writer.RenderBeginTag(HtmlTextWriterTag.H2);
     writer.AddAttribute(HtmlTextWriterAttribute.Class, "alink icon icon-link");
     writer.AddAttribute(HtmlTextWriterAttribute.Href, ResolveUrl(BootstrapUtils.GenerateDemoSectionUrl(Section)));
     writer.AddAttribute(HtmlTextWriterAttribute.Target, "_top");
     writer.RenderBeginTag(HtmlTextWriterTag.A);
     writer.RenderEndTag();
     writer.WriteEncodedText(Title);
     writer.RenderEndTag();
 }
Пример #2
0
        public List <BootstrapDemoSectionSourceFileModel> LoadCustomFiles()
        {
            var sourceFiles = Section.GetSourceFiles();

            foreach (var file in sourceFiles)
            {
                if (!BootstrapUtils.IsSourceFileExist(file.Path))
                {
                    var vbFilePath = Path.ChangeExtension(file.Path, ".vb");
                    if (BootstrapUtils.IsSourceFileExist(vbFilePath))
                    {
                        file.Path = vbFilePath;
                    }
                }
                if (BootstrapUtils.IsSourceFileExist(file.Path) && string.IsNullOrEmpty(file.Content))
                {
                    file.Content = BootstrapUtils.GetSourceFileCode(file.Path);
                }
            }
            return(sourceFiles);
        }
Пример #3
0
        protected string GetCodeFromFile()
        {
            string virtualPath = BootstrapUtils.GenerateDemoPageUrl(Demo);

            return(GetCodeFromFile(virtualPath, Key));
        }