Esempio n. 1
0
        private string PlayerNotes()
        {
            //string s = HtmlLib.H4( "Notes", "style=\"outline-color: rgb(0, 0, 255); outline-style: solid; outline-width: 1px;\"" );
            var s = HtmlLib.DivOpen("id=\"notes\"") + $"<p>\n{Player.Bio}</p>\n" + HtmlLib.DivClose();

            return(s);
        }
Esempio n. 2
0
        private string SubHeading()
        {
            var header = Legend();
            var div    = HtmlLib.DivOpen("id=\"main\"") + PlayerData() + EndDiv() + HtmlLib.DivClose();

            return(string.Format("{0}{1}\n", header, div));
        }
        private string SubHeading()
        {
            var header = Legend();
            var div    = HtmlLib.DivOpen("id=\"main\"") + PlayerData() + EndDiv() + HtmlLib.DivClose();

            return($"{header}{div}\n");
        }
Esempio n. 4
0
        private string SubHeading()
        {
            var header = Legend();
            var div    = HtmlLib.DivOpen("id=\"main\"")
                         + GameData() + EndDiv() + HtmlLib.DivClose();
            var gameDataHtml = string.Format("{0}{1}\n", header, div);
            var html         = gameDataHtml + PredictionHtml();

            return(html);
        }
Esempio n. 5
0
        public string Html()
        {
            string s = "\n" + Tabs()
                       + HtmlLib.DivOpen("class='" + _strClass + "'") + "\n" + Tabs() + "\t"
                       + HtmlLib.Span("class='sectionTitle' tabindex='0'", _sectTitle) + "\n" + Tabs() + "\t"
                       + HtmlLib.ALink() + "\n";

            s += Tabs() + HtmlLib.DivClose() + "\n";

            if (_containerHtml.Length > 0)
            {
                s += ContainerHtml() + "\n";
            }

            //s += Tabs() + HtmlLib.DivClose() + "\n";
            return(s);
        }
 private static string EndDiv()
 {
     return(HtmlLib.DivOpen("class=\"end\"")
            + HtmlLib.Spaces(1) + HtmlLib.DivClose() + "\n");
 }
Esempio n. 7
0
        public void Render()
        {
            Utility.EnsureDirectory(_filename);
            var sw = new StreamWriter(_filename, false);

            sw.WriteLine(_header.Length > 0 ? HtmlLib.HTMLOpenPlus(_header) : HtmlLib.HTMLOpen());
            sw.WriteLine(HtmlLib.HeadOpen());
            sw.WriteLine("\t" + HtmlLib.HTMLTitle(_title));
            if (_cssFile != null)
            {
                if (_cssFile.Length > 0)
                {
                    sw.WriteLine("\t" + HtmlLib.CssLink(_cssFile));
                }
            }
            if (_script1 != null)
            {
                if (_script1.Length > 0)
                {
                    sw.WriteLine("\t" + HtmlLib.VBScriptFile(_script1));
                }
            }
            if (_script2 != null)
            {
                if (_script2.Length > 0)
                {
                    sw.WriteLine("\t" + HtmlLib.JSScriptFile(_script2));
                }
            }
            if (TopScripts != null)
            {
                RenderTopScripts(sw);
            }

            if (StyleList.Count > 0)
            {
                var styleEnumerator = StyleList.GetEnumerator();
                sw.WriteLine("\t" + HtmlLib.StyleOpen());
                while (styleEnumerator.MoveNext())
                {
                    sw.WriteLine("\t" + styleEnumerator.Current);
                }
                sw.WriteLine("\t" + HtmlLib.StyleClose());
            }

            sw.WriteLine(HtmlLib.HeadClose());
            sw.WriteLine(HtmlLib.BodyOpen());

            sw.WriteLine(HtmlLib.DivOpen("id=\"container\""));

            //  Add the body parts
            var myEnumerator = _bodyList.GetEnumerator();

            while (myEnumerator.MoveNext())
            {
                sw.WriteLine(myEnumerator.Current);
            }

            sw.WriteLine(HtmlLib.DivClose());

            if (Scripts != null)
            {
                WriteScripts(sw);
            }
            sw.WriteLine(HtmlLib.BodyClose());
            sw.WriteLine(HtmlLib.HtmlClose());
            sw.Close();

            if (AnnounceIt)
            {
                Announce(string.Format("   {0} has been rendered", _filename));
            }
        }
Esempio n. 8
0
 public string ContainerHtml()
 {
     return(Tabs() + "\t" + HtmlLib.DivOpen("class='container'") + "\n\t" + Tabs()
            + _containerHtml + "\n\t" + Tabs()
            + HtmlLib.DivClose() + "\n");
 }