예제 #1
0
 /** Set up a youth academy taking the average skill and talent in
  * the team into account. */
 public YouthAcademy(User user)
 {
     #if DEBUG
     Console.WriteLine("YouthAcademy constrctor");
     #endif
     // TODO
 }
예제 #2
0
        /** Add a user to the users array. */
        private static void AddPlayer()
        {
            #if DEBUG
            Console.WriteLine("StartupWindow.AddPlayer");
            #endif
            string playerName = entry_player_name.Text;
            User newUser = new User ();
            Team team = (Team)TreeViewHelper.GetPointer (treeview_startup, 2);
            int startLeague = combobox_start_league.Active;

            if (!string.IsNullOrEmpty (playerName))
                newUser.Name = playerName;
            entry_player_name.Text = string.Empty;

            newUser.Team = team;
            newUser.TeamId = team.id;
            newUser.Scout = (Quality)(startLeague == 0 || team.clid == Variables.Country.Leagues [startLeague - 1].id ? -1 : startLeague - 1);
            Variables.Users.Add (newUser);

            TreeViewHelper.ShowUsers (treeview_users);
            TreeViewHelper.ShowTeamList (treeview_startup, false, false);

            combobox_start_league.Active = 0;

            if (Variables.Users.Count == 1) {
                team_selection_ok.Sensitive = true;
                combo_country.Sensitive = false;
            }
        }