Exemple #1
0
        private void ConnectButton_Click(object sender, EventArgs e)
        {
            if (ConnectButton.Text == "Connect")
            {
                ConnectButton.Text = "Disconnect";

                // Create Helper Manager
                Managers.HelperClass HelperMgr = new Managers.HelperClass();

                // Load Status
                Status = HelperMgr.LoadStatus(SettingsForm.ServerNameBox.Text, SettingsForm.ServerPortBox.Text, SettingsForm.SIDBox.Text);

                // Get the base map image
                MapImg.Image = HelperMgr.GetMap(SettingsForm.ServerNameBox.Text, SettingsForm.ServerPortBox.Text);

                //Load Map Manager
                MapMgr = new Managers.MapManager(MapImg.Image);

                // Load Monuments World Objects
                Monumentlst = HelperMgr.LoadMonuments(SettingsForm.ServerNameBox.Text, SettingsForm.ServerPortBox.Text, SettingsForm.SIDBox.Text);

                // Load Deaths
                DeathLst = HelperMgr.LoadDeaths(SettingsForm.ServerNameBox.Text, SettingsForm.ServerPortBox.Text, SettingsForm.SIDBox.Text);

                // Load Languages
                Languages = HelperMgr.LoadLanguages(SettingsForm.SIDBox.Text);

                // Load Languages
                Items = HelperMgr.LoadItems(SettingsForm.ServerNameBox.Text, SettingsForm.ServerPortBox.Text, SettingsForm.SIDBox.Text);

                // Load Config
                Config = HelperMgr.LoadConfig(SettingsForm.ServerNameBox.Text, SettingsForm.ServerPortBox.Text, SettingsForm.SIDBox.Text);

                // Load Recent Players
                RecentLst = HelperMgr.LoadRecent(SettingsForm.ServerNameBox.Text, SettingsForm.ServerPortBox.Text, SettingsForm.SIDBox.Text);

                // Draw Monuments World Objects
                MapImg = MapMgr.DrawMonuments(SettingsForm.ServerNameBox.Text, SettingsForm.ServerPortBox.Text, Monumentlst, MapImg, Status, OutPut);

                // Update base map with Monuments
                MapMgr.UpdateMapImg((Image)MapImg.Image.Clone());

                // Greet the web socket server
                wsGreet();

                // Greet the web socket server RCON
                wsGreetRCON();
            }
            else
            {
                Task.WhenAll(Close(WSArray[0]));
                WSArray[0]         = new ClientWebSocket();
                ConnectButton.Text = "Connect";
            }
        }
Exemple #2
0
 private void PingButton_Click(object sender, EventArgs e)
 {
     Managers.HelperClass HelperMgr = new Managers.HelperClass();
     Status = HelperMgr.LoadStatus(SettingsForm.ServerNameBox.Text, SettingsForm.ServerPortBox.Text, SettingsForm.SIDBox.Text);
     OutPutPingServer();
 }