Example #1
0
        public void Initialize()
        {
            InitializeDatabase(false);
            Util.DebugLog("AdminServer Initialize: Database Done.");

            _securityManager.Startup();
            _securityObject = SecurityManager.Root;
            Util.DebugLog("AdminServer Initialize: SecurityManager Done.");

            InitAutomations();
            Util.DebugLog("AdminServer Initialize: Automation Done.");

            InitStrategy();
            Util.DebugLog("AdminServer Initialize: Strategy Done.");

            _paysysAgent        = new OraclePaySysAgent(SystemConfig.Current.PaySysDbConnectionString);
            _paysysAgent.Error += new EventHandler(_paysysAgent_Error);
            Util.DebugLog("AdminServer Initialize: Paysys Done.");

            LogSystem.TheInstance.LogDeviceList.Add(new MySqlLogDevice(SystemConfig.Current.DbConnectionString));
            Util.DebugLog("AdminServer Initialize: LogSystem Done.");

            try
            {
                FS2GameDataManager.TheInstance.Init(SystemConfig.Current.GameSettingDir, SystemConfig.Current.DefaultEncoding);
                if (SystemConfig.Current.PreloadGameData)
                {
                    FS2GameDataManager.TheInstance.Load();
                }

                Util.DebugLog("AdminServer Initialize: FS2GameDataManager Done.");
            }
            catch (Exception ex)
            {
                Util.DebugLog(ex.ToString());
            }
        }
Example #2
0
		public void Initialize()
		{			
			InitializeDatabase(false);
			Util.DebugLog("AdminServer Initialize: Database Done.");

			_securityManager.Startup();
			_securityObject = SecurityManager.Root;
			Util.DebugLog("AdminServer Initialize: SecurityManager Done.");

            InitAutomations();
			Util.DebugLog("AdminServer Initialize: Automation Done.");

			InitStrategy();
			Util.DebugLog("AdminServer Initialize: Strategy Done.");

			_paysysAgent = new OraclePaySysAgent(SystemConfig.Current.PaySysDbConnectionString);
			_paysysAgent.Error += new EventHandler(_paysysAgent_Error);
			Util.DebugLog("AdminServer Initialize: Paysys Done.");

			LogSystem.TheInstance.LogDeviceList.Add(new MySqlLogDevice(SystemConfig.Current.DbConnectionString));
			Util.DebugLog("AdminServer Initialize: LogSystem Done.");

			try
			{
				FS2GameDataManager.TheInstance.Init(SystemConfig.Current.GameSettingDir, SystemConfig.Current.DefaultEncoding);
				if (SystemConfig.Current.PreloadGameData)
				{
					FS2GameDataManager.TheInstance.Load();
				}
				
				Util.DebugLog("AdminServer Initialize: FS2GameDataManager Done.");
			}
			catch (Exception ex)
			{
				Util.DebugLog(ex.ToString());
			}
		}