Ejemplo n.º 1
0
 public CG(Team home, Team away, Game game)
 {
     _away = away;
     _home = home;
     _game = game;
     ClearScreen();
     DownDistanceVisible = false;
 }
Ejemplo n.º 2
0
        //private SettingsForm _settingsForm;
        public MainForm()
        {
            lyricService = new LyricService();
            playerService = new PlayerService();

            InitializeComponent();

            var gameFile = "C:\\Users\\Joe\\Dropbox\\GVSU\\XLS Files\\GameData.xlsx";
            if(!File.Exists(gameFile))
            {
                LoadTeamFile.Title = "Choose File For Game Data";
                DialogResult gameData = LoadTeamFile.ShowDialog();
                if (gameData == DialogResult.OK)
                {
                    gameFile = LoadTeamFile.FileName;
                }
            }

            Game = new Game(gameFile);

            LoadTeamFile.Title = "Choose File For Home Team";
            DialogResult homeFile = LoadTeamFile.ShowDialog();
            if (homeFile == DialogResult.OK)
            {
                var file = LoadTeamFile.FileName;
                try
                {
                    Home = new Team(file);
                }
                catch (Exception er)
                {

                }
            }

            LoadTeamFile.Title = "Choose File For Away Team";
            DialogResult awayFile = LoadTeamFile.ShowDialog();
            if (awayFile == DialogResult.OK)
            {
                var file = LoadTeamFile.FileName;
                try
                {
                    Away = new Team(file);
                }
                catch (Exception er)
                {

                }
            }

            CG = new CG(Home, Away, Game);

            QuarterLabel.Text = Game.QuarterLong;
            Game.ClockVisible = true;
            updateClockForm();
            TimerIntervalLabel.Text = GameTimer.Interval.ToString();

            AwayTeamLabel.Text = Away.BugName;
            HomeTeamLabel.Text = Home.BugName;
            AwayTeamScoreLabel.Text = Away.Score.ToString();
            HomeTeamScoreLabel.Text = Home.Score.ToString();

            DownLabel.Text = Game.Down;
            YardsToGoTextBox.Text = "10";

            // instantiate data service with necessary site
            DataAddress.Text = "http://static.sidearmstats.com/static/json_gvsu_football_stats.js";
            var dataAddress = DataAddress.Text;
            dataService = new DataService(dataAddress);

            // pre populate labels and buttons
            HomeCoachLabel.Text = Home.CoachName;
            AwayCoachLabel.Text = Away.CoachName;
            ShowAnnouncer1.Text = Game.Announcer1;
            ShowAnnouncer2.Text = Game.Announcer2;
            ShowAnnouncerDouble.Text = Game.Announcer1 + " / " + Game.Announcer2;

            // clear out player labels
            homePlayerLabel1.Text = "";
            HomePlayer1PassingLabel.Text = "";
            HomePlayer1ReceivingLabel.Text = "";
            HomePlayer1RushingLabel.Text = "";

            awayPlayerLabel1.Text = "";
            AwayPlayer1PassingLabel.Text = "";
            AwayPlayer1ReceivingLabel.Text = "";
            AwayPlayer1RushingLabel.Text = "";
        }
Ejemplo n.º 3
0
 public String AnnouncerDouble(Game game)
 {
     var returnString = SetDissolve();
     returnString = returnString + "W\\100\\1008\\" + game.Announcer1 + "\\" + game.Announcer2 + "\\\\";
     return returnString;
 }
Ejemplo n.º 4
0
 public String TitlePage(Team home, Team away, Game game)
 {
     var returnString = "";
     returnString = @"W\\100\\1003\\" + game.GameTitle + "\\" + away.Logo + "\\" + away.Name + "\\" + away.Mascot + "\\" + away.Record + "\\" + home.Logo + "\\" + home.Name + "\\" + home.Mascot + "\\" + home.Record + "\\" + game.GameVenue + "\\" + game.GameLocation + "\\\\";
     return returnString;
 }