Load() 공개 정적인 메소드

public static Load ( bool first_load = false ) : void
first_load bool
리턴 void
예제 #1
0
파일: Program.cs 프로젝트: KevinSkull/rAPB
        static void Main(string[] args)
        {
            Log.Info("WorldServer", "Starting...");
            if (!EasyServer.InitLog("World", "Configs/Logs.conf") || !EasyServer.InitConfig("Configs/World.xml", "World") || !EasyServer.InitConfig("Configs/Database.xml", "Database"))
            {
                return;
            }
            Port = EasyServer.GetConfValue <int>("World", "WorldServer", "Port");
            IP1  = EasyServer.GetConfValue <byte>("World", "WorldServer", "IP1");
            IP2  = EasyServer.GetConfValue <byte>("World", "WorldServer", "IP2");
            IP3  = EasyServer.GetConfValue <byte>("World", "WorldServer", "IP3");
            IP4  = EasyServer.GetConfValue <byte>("World", "WorldServer", "IP4");
            if (!EasyServer.Listen <TcpServer>(Port, "WorldInfo"))
            {
                return;
            }
            Databases.InitDB();
            Databases.Load(false);
            FileMgr           = new FileManager();
            Password          = EasyServer.GetConfValue <string>("World", "LobbyCommunication", "Password");
            WorldName         = EasyServer.GetConfValue <string>("World", "WorldInfo", "Name");
            ID                = EasyServer.GetConfValue <byte>("World", "WorldInfo", "Id");
            Lobby             = new Client(EasyServer.GetConfValue <string>("World", "LobbyCommunication", "Ip"), EasyServer.GetConfValue <int>("World", "LobbyCommunication", "Port"));
            districtsListener = new Listener(EasyServer.GetConfValue <string>("World", "DistrictListener", "Ip"), EasyServer.GetConfValue <int>("World", "DistrictListener", "Port"));
            clients.Clear();
            Timer aTimer = new Timer(10000);

            aTimer.Elapsed  += OnTimedEvent;
            aTimer.AutoReset = true;
            aTimer.Enabled   = true;
            Log.Enter();
            Console.WriteLine("For available console commands, type /commands");
            Log.Enter();
            bool done = false;

            while (!done)
            {
                string command;
                command = Console.ReadLine();
                ProccessCommand(command);
            }
            EasyServer.StartConsole();
        }
예제 #2
0
파일: Program.cs 프로젝트: sNakiex/reAPB
 private static void OnTimedEvent(object source, ElapsedEventArgs e)
 {
     Databases.Load(false);
 }