Exemplo n.º 1
0
        private void ListContents()
        {
            mTextBox.Clear();
            StringBuilder builder = new StringBuilder(5000);

            if (listTeamsToolStripMenuItem.Checked || listFreeAgentsToolStripMenuItem.Checked || listDraftClassToolStripMenuItem.Checked)
            {
                builder.Append(mTool.GetKey(listAttributesToolStripMenuItem.Checked, listApperanceToolStripMenuItem.Checked));
                builder.Append("\n");
            }

            if (listTeamsToolStripMenuItem.Checked)
            {
                builder.Append(mTool.GetLeaguePlayers(listAttributesToolStripMenuItem.Checked, listApperanceToolStripMenuItem.Checked, listSpecialTeamsToolStripMenuItem.Checked));
            }

            if (listFreeAgentsToolStripMenuItem.Checked)
            {
                builder.Append(mTool.GetTeamPlayers("FreeAgents", listAttributesToolStripMenuItem.Checked, listApperanceToolStripMenuItem.Checked, false));
            }

            if (listDraftClassToolStripMenuItem.Checked)
            {
                builder.Append(mTool.GetTeamPlayers("DraftClass", listAttributesToolStripMenuItem.Checked, listApperanceToolStripMenuItem.Checked, false));
            }

            if (listCoachesToolStripMenuItem1.Checked)
            {
                builder.Append(mTool.GetCoachData());
            }

            if (listScheduleToolStripMenuItem.Checked)
            {
                if (mTool.SaveType == SaveType.Franchise)
                {
                    SchedulerHelper helper = new SchedulerHelper(mTool);
                    builder.Append("\n\n#Schedule\n");
                    builder.Append(helper.GetSchedule());
                }
                else
                {
                    Console.WriteLine("Cannot list schedule of {0} GameSave file", mTool.SaveType);
                }
            }

            SetText(builder.ToString());
        }
Exemplo n.º 2
0
        public void GetDraftClassTest()
        {
            string       compareAgainst = GameSaveToolTest.GetTextFileContents("AllBasePlayers.txt").Replace("\r\n", "\n");
            GamesaveTool tool           = new GamesaveTool();

            tool.LoadSaveFile(GetFilePath("Base_NFL2K5_SAVEGAME.DAT"));
            string leaguePlayers = tool.GetTeamPlayers("DraftClass", true, true).Replace("\r\n", "\n");
            int    index         = compareAgainst.IndexOf(leaguePlayers);

            Assert.IsTrue(index > -1, "Error! there is a difference form the base to what we got.");
        }