Esempio n. 1
0
 /** Load a file containing name - value pairs into
  * the specified array. */
 public static void LoadOptFile(string filename, OptionsList optionsList, bool sort)
 {
     #if DEBUG
     Console.WriteLine("FileHelper.LoadOptFile");
     #endif
     optionsList = new OptionsList();
     string path = FindSupportFile(filename, false);
     string[] lines = File.ReadAllLines(path);
     foreach (string line in lines)
     {
         string optName = null, optValue = null;
         if (ParseOptLine(line, ref optName, ref optValue))
         {
             optionsList.Add(optName, optValue);
             /*
             if ((optName.EndsWith("_unix") && Variables.os_is_unix) ||
                 (optName.EndsWith("_win32") && !Variables.os_is_unix))
             {
                 option.name = optName.Remove(optName.IndexOf(Variables.os_is_unix ? "_unix" : "_win32"));
                 optionList.list.Add(option);
             } */
         }
     }
 }
Esempio n. 2
0
        public User()
        {
            #if DEBUG
            Console.WriteLine("User.New");
            #endif
            Name = "NONAME";
            Team = null;
            TeamId = -1;

            // TODO
            //live_game_reset(&new.live_game, NULL, FALSE);

            Events = new List<Event>();
            History = new List<UserHistory>();
            Options = new OptionsList ();
            //TODO Options.list = null;
            //TODO Options.datalist = null;

            Sponsor = new UserSponsor();

            // TODO
            //new.youth_academy.players = g_array_new(FALSE, FALSE, sizeof(Player));
            //new.youth_academy.pos_pref = PLAYER_POS_ANY;
            //new.youth_academy.coach = QUALITY_AVERAGE;

            MemMatchesFile = null;
            MemMatches = new List<MemMatch>();

            Bets[0] = new List<BetUser>();
            Bets[1] = new List<BetUser>();
            DefaultTeam = new List<int>();
            DefaultStyle = 0;
            DefaultBoost = 0;
        }