コード例 #1
0
        public ControlForm()
        {
            InitializeComponent();
            Database.ServerDatabase.InitializeSql();

            GUI = this;
            CheckForIllegalCrossThreadCalls = false;

            foreach (var sob in Database.ServerDatabase.Context.SOB.GetSOBByMap(1039))
            {
                if (sob.Mesh / 10 % 3 == 0)
                {
                    sob.Level = (byte)(20 + (sob.Mesh - 427) / 30 * 5);
                    Database.ServerDatabase.Context.SOB.AddOrUpdate(sob);
                }
            }

            SettingsReader.Read();

            //Begin login server
            Login = new LoginServer("AuthServer", Constants.LOGIN_PORT);

            //Begin game server
            Game = new GameServer("GameServer", Constants.GAME_PORT);

            //GUI Update
            Text += " - " + Constants.SERVER_NAME;
            Console.WriteLine(Constants.SERVER_NAME + " Ready to log in");
        }
コード例 #2
0
ファイル: ControlForm.cs プロジェクト: youssef-hany/trial
        public ControlForm()
        {
            InitializeComponent();
            Database.ServerDatabase.InitializeSql();

            GUI = this;
            CheckForIllegalCrossThreadCalls = false;

            SettingsReader.Read();

            //Begin login server
            LoginServer login = new LoginServer("AuthServer", Constants.LOGIN_PORT);

            //Begin game server
            GameServer game = new GameServer("GameServer", Constants.GAME_PORT);

            //GUI Update
            Text += " - " + Constants.SERVER_NAME;
            Console.WriteLine(Constants.SERVER_NAME + " Ready to log in");
        }
コード例 #3
0
        public ControlForm()
        {
            InitializeComponent();
            Database.ServerDatabase.InitializeSql();

            GUI = this;
            CheckForIllegalCrossThreadCalls = false;

            foreach (var sob in Database.ServerDatabase.Context.SOB.GetSOBByMap(1039))
            {
                if (sob.Mesh / 10 % 3 == 0)
                {
                    sob.Level = (byte)(20 + (sob.Mesh - 427) / 30 * 5);
                    Database.ServerDatabase.Context.SOB.AddOrUpdate(sob);
                }
            }

            SettingsReader.Read();  // The Constructor (The first thing works when you debug the application

            //Begin login server
            Login = new LoginServer("AuthServer", Constants.LOGIN_PORT);

            //Begin game server
            Game = new GameServer("GameServer", Constants.GAME_PORT);

            //GUI Update

            Text += " - " + Constants.SERVER_NAME;
            //Text += " - " +  DateTime.Now.Date;

            #region Redirect the Console’s output

            _writer = new TextBoxStreamWriter(ConsoleText);
            Console.SetOut(_writer);

            //                                       DayName    Date        Time  A\PM    newline
            Console.WriteLine(DateTime.Now.ToString("[dddddd - dd/M/yyyy - hh:mm:ss tt]") + "\n" + Constants.SERVER_NAME + " Ready to log in");

            NoteBox.Text = File.ReadAllText("Text Files\\Todo List.txt");
        }