Exemplo n.º 1
0
        public void LoadDivisions()
        {
            DivList.Clear();
            var div1 = new NFLDivision("East", "NFC", "A", Season, StrCat);

            DivList.Add(div1);
            var div2 = new NFLDivision("North", "NFC", "B", Season, StrCat);

            DivList.Add(div2);
            var div3 = new NFLDivision("South", "NFC", "C", Season, StrCat);

            DivList.Add(div3);
            var div4 = new NFLDivision("West", "NFC", "D", Season, StrCat);

            DivList.Add(div4);
            var div5 = new NFLDivision("East", "AFC", "E", Season, StrCat);

            DivList.Add(div5);
            var div6 = new NFLDivision("North", "AFC", "F", Season, StrCat);

            DivList.Add(div6);
            var div7 = new NFLDivision("South", "AFC", "G", Season, StrCat);

            DivList.Add(div7);
            var div8 = new NFLDivision("West", "AFC", "H", Season, StrCat);

            DivList.Add(div8);
        }
Exemplo n.º 2
0
        private void LoadDivisions(string seasonIn)
        {
            var div1 = new NFLDivision("East", "NFC", "A", seasonIn, StrCat);

            DivList.Add(div1);
            var div2 = new NFLDivision("North", "NFC", "B", seasonIn, StrCat);

            DivList.Add(div2);
            var div3 = new NFLDivision("South", "NFC", "C", seasonIn, StrCat);

            DivList.Add(div3);
            var div4 = new NFLDivision("West", "NFC", "D", seasonIn, StrCat);

            DivList.Add(div4);
            var div5 = new NFLDivision("East", "AFC", "E", seasonIn, StrCat);

            DivList.Add(div5);
            var div6 = new NFLDivision("North", "AFC", "F", seasonIn, StrCat);

            DivList.Add(div6);
            var div7 = new NFLDivision("South", "AFC", "G", seasonIn, StrCat);

            DivList.Add(div7);
            var div8 = new NFLDivision("West", "AFC", "H", seasonIn, StrCat);

            DivList.Add(div8);
        }
Exemplo n.º 3
0
        private static void WriteDivisionNode(XmlWriter writer, NFLDivision d)
        {
            writer.WriteStartElement("division");
            WriteElement(writer, "name", d.NameOut());
            WriteElement(writer, "id", d.Code);

            writer.WriteEndElement();
        }
Exemplo n.º 4
0
        public void QuickAddDiv(string strDivName, string strDivCode)
        {
#if DEBUG
            Utility.Announce(string.Format("NFLConference.QuickAddDiv: {0} Quick Adding {1}", Conference, strDivName));
#endif
            var div = new NFLDivision(strDivName, Conference, strDivCode, Season);
            DivList.Add(div);
        }
Exemplo n.º 5
0
        public void AddDiv(string strDivName, string strDivCode)
        {
            Announce($"NFLConference.AddDiv: {Conference} Adding {strDivName}");
            var div = new NFLDivision(
                strDivName,
                Conference,
                strDivCode,
                Season,
                "");

            DivList.Add(div);
        }
Exemplo n.º 6
0
        private DataTable BuildTable()
        {
            DataTable            dt   = new DataTable();
            DataColumnCollection cols = dt.Columns;

            cols.Add("SORTKEY", typeof(String));
            cols.Add("DIV", typeof(String));
            cols.Add("TEAM", typeof(String));
            cols.Add("LT", typeof(String));
            cols.Add("LG", typeof(String));
            cols.Add("C", typeof(String));
            cols.Add("RG", typeof(String));
            cols.Add("RT", typeof(String));
            cols.Add("Rating", typeof(String));
            cols.Add("SAKALLD", typeof(Decimal));

            foreach (NflTeam t in m_TeamList)
            {
                t.PpUnit(m_Season);
                DataRow dr = dt.NewRow();
                dr["SORTKEY"] = t.Division();
                dr["DIV"]     = NFLDivision.ShortNameOut(t.Division());
                dr["TEAM"]    = t.TeamCode;
                dr["LT"]      = PlayerOut(t.GetPlayerAt("LT", 1, false, false));
                dr["LG"]      = PlayerOut(t.GetPlayerAt("LG", 1, false, false));
                dr["C"]       = PlayerOut(t.GetPlayerAt("C", 1, false, false));
                dr["RG"]      = PlayerOut(t.GetPlayerAt("RG", 1, false, false));
                dr["RT"]      = PlayerOut(t.GetPlayerAt("RT", 1, false, false));
                dr["Rating"]  = t.PpRating();
                dr["SAKALLD"] = t.TotSacksAllowed;
                dt.Rows.Add(dr);
            }
            dt.DefaultView.Sort = "SORTKEY";
            dt.DefaultView.Sort = "Rating";
            return(dt);
        }