private void button1_Click(object sender, RoutedEventArgs e)
        {
            btnHome.Background = white;
            btnAway.Background = black;

            btnHome.Foreground = black;
            btnAway.Foreground = white;
            team = myGame.homeTeam;

            loadPlayerOptions();
        }
		//this function causes the default colors to be shown (i.e. home team is selected) R.P.
        private void loadDefaultView()
        {
            btnHome.Background = white;
            btnAway.Background = black;

            btnHome.Foreground = black;
            btnAway.Foreground = white;

            team = myGame.homeTeam;
            loadPlayerOptions();
        }
Example #3
0
        public void loadGame()
        {
            object temp;
            string myTeam = "";

            //check which screen the previous one was
            if (phoneAppService.State.ContainsKey("sender"))
            {
                if (phoneAppService.State.TryGetValue("sender", out temp))
                {

                    myTeam = temp.ToString();
                    if (phoneAppService.State.ContainsKey("myGame"))
                    {
                        if (phoneAppService.State.TryGetValue("myGame", out temp))
                        {
                            myGame = (Game)temp;

                            if (myTeam.Equals("home"))
                            {
                                team = myGame.homeTeam;
                            }
                            else
                            {
                                team = myGame.awayTeam;
                            }
                        }
                    }

                    if (phoneAppService.State.ContainsKey("player"))
                    {
                        if (phoneAppService.State.TryGetValue("player", out temp))
                        {
                            player = temp.ToString();
                        }
                    }

                    if (phoneAppService.State.ContainsKey("assist"))
                    {
                        if (phoneAppService.State.TryGetValue("assist", out temp))
                        {
                            assist = temp.ToString();
                        }
                    }
                }
            }
        }
Example #4
0
 public void setAwayTeam(int teamID, string teamName, int managerID, string managerName)
 {
    awayTeam = new Team(teamID, teamName, managerID, managerName);
 }
Example #5
0
 public void setHomeTeam(int teamID, string teamName, int managerID, string managerName)
 {
     homeTeam = new Team(teamID, teamName, managerID, managerName);
 }