Exemple #1
0
        private void AddRow(ref HtmlLib.HtmTable t)
        {
            var c = new HtmlLib.HtmCol();
            var r = new HtmlLib.HtmRow();

            c.Attr  = "BGCOLOR='LIGHTBLUE'";
            c.Attr += " ALIGN='LEFT'";
            c.Data  = _mUnitCode;
            r.AddCol(c);
            var c2 = new HtmlLib.HtmCol {
                Attr = "BGCOLOR='LIGHTBLUE'"
            };

            c2.Attr += " ALIGN='RIGHT'";
            c2.Data  = _mUnitRating;
            r.AddCol(c2);
            t.AddRow(r);
            var c3 = new HtmlLib.HtmCol();
            var r2 = new HtmlLib.HtmRow();

            c3.Attr  = "BGCOLOR='LIGHTBLUE'";
            c3.Attr += " ALIGN='CENTER'";
            c3.Attr += " COLSPAN='2'";
            c3.Data  = _mStats;
            r2.AddCol(c3);
            t.AddRow(r2);
        }
Exemple #2
0
        private HtmlLib.HtmTable PlayerTable(string drafted, string no)
        {
            var t = new HtmlLib.HtmTable("BORDER='1' BORDERCOLOR='BLACK' CELPADDING='0' CELLSPACING='0'");

            if (_mStyle == CellStyle.Player)
            {
                AddRow(no + " " + _mName, ref t);
                AddRow(_mSlot + drafted, ref t);
                AddRow(AgeOut(_mName), ref t);
                if (_mName.Length > 0)
                {
                    if (_mPlayer.IsOffence())
                    {
                        AddRow(ScoresOut(_mName), ref t);
                    }
                }
            }
            else
            {
                _mBgColour = "MOCCASIN";
                AddRow(_mSlot, ref t);
                if (_mPlayer != null)
                {
                    _mBgColour = _mPlayer.SetColour("PINK");
                }
                AddRow(_mName, ref t);
                GetRole("B", _mSlot, ref t);
                GetRole(" ", _mSlot, ref t);
            }
            return(t);
        }
Exemple #3
0
        private HtmlLib.HtmTable UnitTable()
        {
            var t = new HtmlLib.HtmTable("BORDER='1' BORDERCOLOR='BLACK' CELPADDING='0' CELLSPACING='0'");

            AddRow(ref t);
            return(t);
        }
Exemple #4
0
        private void AddRow(string data, ref HtmlLib.HtmTable t)
        {
            var c = new HtmlLib.HtmCol();
            var r = new HtmlLib.HtmRow();

            c.Attr  = BgColour();
            c.Attr += " ALIGN='CENTER'";
            c.Data  = (data.Length > 0) ? data : HtmlLib.Spaces(19);
            r.AddCol(c);
            t.AddRow(r);
        }
Exemple #5
0
        private void GetRole(string role, string slot, ref HtmlLib.HtmTable t)
        {
            var ds = Utility.TflWs.GetPlayer(_mTeamCode, role, slot);

            foreach (DataRow dr in ds.Tables["player"].Rows)
            {
                var p = new NFLPlayer(dr);
                _mBgColour = SetColour("PINK", p);
                AddRow(p.PlayerName, ref t);
            }
            return;
        }