예제 #1
0
        public ConnectionConsole(PRoConClient prcClient) : base() {
            Client = prcClient;

            FileHostNamePort = Client.FileHostNamePort;
            LoggingStartedPrefix = "Console logging started";
            LoggingStoppedPrefix = "Console logging stopped";
            FileNameSuffix = "console";

            LogDebugDetails = false;
            LogEventsConnection = false;
            DisplayConnection = true;
            DisplayPunkbuster = true;
            ConScrolling = true;
            PBScrolling = true;

            Client.Game.Connection.PacketQueued += new FrostbiteConnection.PacketQueuedHandler(m_prcClient_PacketQueued);
            Client.Game.Connection.PacketDequeued += new FrostbiteConnection.PacketQueuedHandler(m_prcClient_PacketDequeued);
            Client.Game.Connection.PacketSent += new FrostbiteConnection.PacketDispatchHandler(m_prcClient_PacketSent);
            Client.Game.Connection.PacketReceived += new FrostbiteConnection.PacketDispatchHandler(m_prcClient_PacketRecieved);
            Client.Game.Connection.PacketCacheIntercept += new FrostbiteConnection.PacketCacheDispatchHandler(Connection_PacketCacheIntercept);

            Client.ConnectAttempt += new PRoConClient.EmptyParamterHandler(m_prcClient_CommandConnectAttempt);
            Client.ConnectSuccess += new PRoConClient.EmptyParamterHandler(m_prcClient_CommandConnectSuccess);

            Client.ConnectionFailure += new PRoConClient.FailureHandler(m_prcClient_ConnectionFailure);
            Client.ConnectionClosed += new PRoConClient.EmptyParamterHandler(m_prcClient_ConnectionClosed);

            Client.LoginAttempt += new PRoConClient.EmptyParamterHandler(m_prcClient_CommandLoginAttempt);
            Client.Login += new PRoConClient.EmptyParamterHandler(m_prcClient_CommandLogin);
            Client.LoginFailure += new PRoConClient.AuthenticationFailureHandler(m_prcClient_CommandLoginFailure);
            Client.Logout += new PRoConClient.EmptyParamterHandler(m_prcClient_CommandLogout);
        }
예제 #2
0
        public ChatConsole(PRoConClient prcClient) : base() {
            Client = prcClient;

            FileHostNamePort = Client.FileHostNamePort;
            LoggingStartedPrefix = "Chat logging started";
            LoggingStoppedPrefix = "Chat logging stopped";
            FileNameSuffix = "chat";

            LogJoinLeaving = false;
            LogKills = false;
            Scrolling = true;
            DisplayTypeIndex = 0;
            DisplayTimeIndex = 0;

            MessageHistory = new Queue<ChatMessage>();

            Client.Game.Chat += new FrostbiteClient.RawChatHandler(m_prcClient_Chat);

            Client.PlayerKilled += new PRoConClient.PlayerKilledHandler(m_prcClient_PlayerKilled);
            Client.Game.PlayerJoin += new FrostbiteClient.PlayerEventHandler(m_prcClient_PlayerJoin);
            Client.Game.PlayerLeft += new FrostbiteClient.PlayerLeaveHandler(m_prcClient_PlayerLeft);

            Client.ProconAdminSaying += new PRoConClient.ProconAdminSayingHandler(m_prcClient_ProconAdminSaying);
            Client.ProconAdminYelling += new PRoConClient.ProconAdminYellingHandler(m_prcClient_ProconAdminYelling);

            Client.ReadRemoteChatConsole += new PRoConClient.ReadRemoteConsoleHandler(m_prcClient_ReadRemoteChatConsole);
        }
예제 #3
0
        public MapGeometry(PRoConClient prcClient) {
            MapZones = new MapZoneDictionary();

            if ((Client = prcClient) != null) {
                Client.Game.ServerInfo += new FrostbiteClient.ServerInfoHandler(m_prcClient_ServerInfo);
                Client.Game.LoadingLevel += new FrostbiteClient.LoadingLevelHandler(m_prcClient_LoadingLevel);
                Client.Game.LevelLoaded += new FrostbiteClient.LevelLoadedHandler(m_prcClient_LevelLoaded);
                Client.PlayerKilled += new PRoConClient.PlayerKilledHandler(m_prcClient_PlayerKilled);
            }
        }
예제 #4
0
 public void SetConnection(PRoConClient prcClient) {
     if (prcClient != null) {
         if (prcClient.Game != null) {
             this.prcClient_GameTypeDiscovered(prcClient);
         }
         else {
             prcClient.GameTypeDiscovered += new PRoConClient.EmptyParamterHandler(prcClient_GameTypeDiscovered);
         }
     }
 }
예제 #5
0
        public PunkbusterConsole(PRoConClient client) : base() {
            Client = client;

            FileHostNamePort = Client.FileHostNamePort;
            LoggingStartedPrefix = "Punkbuster logging started";
            LoggingStoppedPrefix = "Punkbuster logging stopped";
            FileNameSuffix = "punkbuster";

            Client.Game.PunkbusterMessage += new FrostbiteClient.PunkbusterMessageHandler(m_prcClient_PunkbusterMessage);
            Client.Game.SendPunkbusterMessage += new FrostbiteClient.SendPunkBusterMessageHandler(m_prcClient_SendPunkbusterMessage);
        }
        private void m_prcClient_GameTypeDiscovered(PRoConClient sender) {
            this.InvokeIfRequired(() => {
                this.Client.Game.TeamKillCountForKick += new FrostbiteClient.LimitHandler(m_prcClient_TeamKillCountForKick);
                this.Client.Game.TeamKillValueForKick += new FrostbiteClient.LimitHandler(m_prcClient_TeamKillValueForKick);
                this.Client.Game.TeamKillKickForBan += new FrostbiteClient.LimitHandler(m_prcClient_TeamKillKickForBan);
                this.Client.Game.TeamKillValueIncrease += new FrostbiteClient.LimitHandler(m_prcClient_TeamKillValueIncrease);
                this.Client.Game.TeamKillValueDecreasePerSecond += new FrostbiteClient.LimitHandler(m_prcClient_TeamKillValueDecreasePerSecond);

                this.Client.Game.BF4preset += new FrostbiteClient.BF4presetHandler(Tab_BF4preset);
            });
        }
예제 #7
0
        public void SetConnection(PRoConApplication praApplication, PRoConClient prcClient) {
            if ((this._application = praApplication) != null && (this._client = prcClient) != null) {

                if (this._client.Game != null) {
                    this.m_prcClient_GameTypeDiscovered(prcClient);
                }
                else {
                    this._client.GameTypeDiscovered += new PRoConClient.EmptyParamterHandler(m_prcClient_GameTypeDiscovered);
                }
            }
        }
예제 #8
0
        private void m_prcClient_GameTypeDiscovered(PRoConClient sender) {
            this.InvokeIfRequired(() => {
                this.m_prcClient.EventsLogging.CapturedEvents.ItemAdded += new NotificationList<CapturableEvents>.ItemModifiedHandler(CapturedEvents_ItemAdded);
                this.m_prcClient.EventsLogging.CapturedEvents.ItemRemoved += new NotificationList<CapturableEvents>.ItemModifiedHandler(CapturedEvents_ItemRemoved);

                this.m_prcClient.EventsLogging.MaximumDisplayedEventsChange += new EventCaptures.MaximumDisplayedEventsChangeHandler(LoggedEvents_MaximumDisplayedEventsChange);
                this.m_prcClient.EventsLogging.OptionsVisibleChange += new EventCaptures.OptionsVisibleChangeHandler(LoggedEvents_OptionsHiddenChange);
                this.m_prcClient.EventsLogging.ScrollingEnabledChange += new EventCaptures.ScrollingEnabledChangeHandler(LoggedEvents_ScrollingEnabledChange);

                this.m_prcClient.EventsLogging.LoggedEvent += new EventCaptures.LoggedEventHandler(LoggedEvents_LoggedEvent);
            });
        }
예제 #9
0
        public void SetConnection(PRoConClient prcClient) {
            if ((this.m_prcClient = prcClient) != null) {
                this.m_prcClient.ConnectAttempt += new PRoConClient.EmptyParamterHandler(m_prcClient_ConnectAttempt);
                this.m_prcClient.ConnectionClosed += new PRoConClient.EmptyParamterHandler(m_prcClient_ConnectionClosed);
                this.m_prcClient.ConnectionFailure += new PRoConClient.FailureHandler(m_prcClient_ConnectionFailure);
                this.m_prcClient.SocketException += new PRoConClient.SocketExceptionHandler(m_prcClient_SocketException);
                this.m_prcClient.Logout += new PRoConClient.EmptyParamterHandler(m_prcClient_CommandLogout);
                this.m_prcClient.LoginFailure += new PRoConClient.AuthenticationFailureHandler(m_prcClient_CommandLoginFailure);
                this.m_prcClient.Login += new PRoConClient.EmptyParamterHandler(m_prcClient_Login);

                this.m_prcClient.AutomaticallyConnectChanged += new PRoConClient.AutomaticallyConnectHandler(m_prcClient_AutomaticallyConnectChanged);
            }
        }
예제 #10
0
        public PluginConsole(PRoConClient prcClient) : base() {
            Client = prcClient;

            LogEntries = new Queue<LogEntry>();

            FileHostNamePort = Client.FileHostNamePort;
            LoggingStartedPrefix = "Plugin logging started";
            LoggingStoppedPrefix = "Plugin logging stopped";
            FileNameSuffix = "plugin";

            Client.CompilingPlugins += new PRoConClient.EmptyParamterHandler(m_prcClient_CompilingPlugins);
            Client.RecompilingPlugins += new PRoConClient.EmptyParamterHandler(m_prcClient_RecompilingPlugins);
        }
예제 #11
0
        private void m_prcClient_PlayerKilled(PRoConClient sender, Kill kKillerVictimDetails) {
            float trespassArea = 0.0F;

            foreach (MapZoneDrawing zone in new List<MapZoneDrawing>(MapZones)) {
                if (System.String.Compare(CurrentMapFileName, zone.LevelFileName, System.StringComparison.OrdinalIgnoreCase) == 0) {
                    if ((trespassArea = zone.TrespassArea(kKillerVictimDetails.KillerLocation, 14.14F)) > 0.0F) {
                        if (MapZoneTrespassed != null) {
                            this.MapZoneTrespassed(kKillerVictimDetails.Killer, ZoneAction.Kill, new MapZone(zone.UID, zone.LevelFileName, zone.Tags.ToString(), zone.ZonePolygon, true), kKillerVictimDetails.KillerLocation, trespassArea, kKillerVictimDetails);
                        }
                    }

                    if ((trespassArea = zone.TrespassArea(kKillerVictimDetails.VictimLocation, 14.14F)) > 0.0F) {
                        if (MapZoneTrespassed != null) {
                            this.MapZoneTrespassed(kKillerVictimDetails.Victim, ZoneAction.Death, new MapZone(zone.UID, zone.LevelFileName, zone.Tags.ToString(), zone.ZonePolygon, true), kKillerVictimDetails.VictimLocation, trespassArea, kKillerVictimDetails);
                        }
                    }
                }
            }
        }
예제 #12
0
        public void SetConnection(PRoConClient prcClient) {
            if ((this.m_prcClient = prcClient) != null) {
                this.uscPlugins.SetConnection(prcClient);

                this.m_prcClient.RemoteAccountLoggedIn += new PRoConClient.RemoteAccountLoginStatusHandler(m_prcClient_RemoteAccountLoggedIn);
                this.m_prcClient.RemoteAccountCreated += new PRoConClient.RemoteAccountHandler(m_prcClient_RemoteAccountCreated);
                this.m_prcClient.RemoteAccountChangePassword += new PRoConClient.EmptyParamterHandler(m_prcClient_RemoteAccountChangePassword);
                this.m_prcClient.RemoteAccountDeleted += new PRoConClient.RemoteAccountHandler(m_prcClient_RemoteAccountDeleted);
                this.m_prcClient.RemoteAccountAltered += new PRoConClient.RemoteAccountAlteredHandler(m_prcClient_RemoteAccountAltered);

                this.m_prcClient.RemoteLoadedPlugins += new PRoConClient.RemoteLoadedPluginsHandler(m_prcClient_RemoteLoadedPlugins);
                this.m_prcClient.RemoteEnabledPlugins += new PRoConClient.RemoteEnabledPluginsHandler(m_prcClient_RemoteEnabledPlugins);
                this.m_prcClient.RemotePluginLoaded += new PRoConClient.RemotePluginLoadedHandler(m_prcClient_RemotePluginLoaded);
                this.m_prcClient.RemotePluginEnabled += new PRoConClient.RemotePluginEnabledHandler(m_prcClient_RemotePluginEnabled);
                this.m_prcClient.RemotePluginVariables += new PRoConClient.RemotePluginVariablesHandler(m_prcClient_RemotePluginVariables);
                this.m_prcClient.ReadRemotePluginConsole += new PRoConClient.ReadRemoteConsoleHandler(m_prcClient_ReadRemotePluginConsole);

                this.m_prcClient.ProconPrivileges += new PRoConClient.ProconPrivilegesHandler(m_prcClient_ProconPrivileges);
            }
        }
예제 #13
0
        private void Connections_ConnectionAdded(PRoConClient item) {
            item.ConnectionClosed += new PRoConClient.EmptyParamterHandler(item_ConnectionClosed);
            item.ConnectAttempt += new PRoConClient.EmptyParamterHandler(item_ConnectAttempt);
            item.Login += new PRoConClient.EmptyParamterHandler(item_Login);
            item.GameTypeDiscovered += new PRoConClient.EmptyParamterHandler(item_GameTypeDiscovered);

            this.UpdateConnections();
        }
예제 #14
0
 private void m_prcClient_ConnectAttempt(PRoConClient sender) {
     this.InvokeIfRequired(() => { this.Connecting = true; });
 }
예제 #15
0
 private void m_prcClient_CommandLogout(PRoConClient sender) {
     this.InvokeIfRequired(() => { this.LoggedIn = false; });
 }
예제 #16
0
 void m_prcClient_AutomaticallyConnectChanged(PRoConClient sender, bool isEnabled) {
     this.InvokeIfRequired(() => { this.chkAutomaticallyConnect.Checked = isEnabled; });
 }
예제 #17
0
 private void m_prcClient_BanListList(PRoConClient sender, List<CBanInfo> lstBans) {
     InvokeOnAllEnabled("OnBanList", lstBans);
 }
예제 #18
0
        private void m_prcClient_SocketException(PRoConClient sender, System.Net.Sockets.SocketException se) {
            this.InvokeIfRequired(() => {
                this.ErrorMessage = this.m_clocLanguage.GetLocalized("uscServerConnection.OnServerConnectionFailure", se.Message);

                this.Connecting = this.LoggedIn = false;
            });
        }
예제 #19
0
 private void m_prcClient_ConnectionClosed(PRoConClient sender) {
     this.InvokeIfRequired(() => { this.Connecting = this.LoggedIn = false; });
 }
예제 #20
0
        private void m_prcClient_ConnectionFailure(PRoConClient sender, Exception exception) {
            this.InvokeIfRequired(() => {
                this.ErrorMessage = this.m_clocLanguage.GetLocalized("uscServerConnection.OnServerConnectionFailure", exception.Message);

                this.Connecting = this.LoggedIn = false;
            });
        }
예제 #21
0
 private void m_client_FullTextChatModerationListList(PRoConClient sender, TextChatModerationDictionary moderationList) {
     InvokeOnAllEnabled("OnTextChatModerationList", moderationList);
 }
예제 #22
0
 public void sender_ProconPrivileges(PRoConClient sender, CPrivileges spPrivs) {
     this.InvokeIfRequired(() => { this.pnlSettingsPanels.Enabled = spPrivs.CanAlterServerSettings; });
 }
예제 #23
0
 private void item_Login(PRoConClient sender) {
     this.UpdateConnections();
 }
예제 #24
0
        private void Connections_ConnectionRemoved(PRoConClient item) {
            this.InvokeIfRequired(() => {
                item.ConnectionClosed -= new PRoConClient.EmptyParamterHandler(item_ConnectionClosed);
                item.Login -= new PRoConClient.EmptyParamterHandler(item_Login);
                item.GameTypeDiscovered -= new PRoConClient.EmptyParamterHandler(item_GameTypeDiscovered);

                if (item.Game != null) {
                    item.Game.ServerInfo -= new FrostbiteClient.ServerInfoHandler(Game_ServerInfo);
                }

                if (this._isDocumentReady == true && this.webBrowser1.Document != null) {
                    this.webBrowser1.Document.InvokeScript("fnRemoveConnection", new object[] {Regex.Replace(item.FileHostNamePort, "[^0-9a-zA-Z]", "")});
                }
            });
        }
예제 #25
0
 private void item_GameTypeDiscovered(PRoConClient sender) {
     this.InvokeIfRequired(() => {
         if (sender.Game != null) {
             sender.Game.ServerInfo += new FrostbiteClient.ServerInfoHandler(Game_ServerInfo);
         }
     });
 }
예제 #26
0
        private void prcClient_GameTypeDiscovered(PRoConClient sender) {
            this.InvokeIfRequired(() => {
                sender.ProconPrivileges += new PRoConClient.ProconPrivilegesHandler(sender_ProconPrivileges);

                if (sender.Game is BF3Client) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsDetailsBF3());
                }
                else if (sender.Game is BF4Client) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsDetailsBF4());
                }
                else if (sender.Game is MOHWClient) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsDetailsBF3());
                }
                else {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsDetails());
                }

                if (sender.Game is BF3Client) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsConfigurationBF3());
                }
                else if (sender.Game is BF4Client) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsConfigurationBF4());
                }
                else if (sender.Game is MOHWClient) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsConfigurationMOHW());
                }
                else {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsConfiguration());
                }

                if (sender.Game is BFBC2Client) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsGameplayBFBC2());
                }
                else if (sender.Game is MoHClient) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsGameplayMoH());
                }
                else if (sender.Game is BF3Client) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsGameplayBF3());
                }
                else if (sender.Game is BF4Client) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsGameplayBF4());
                }
                else if (sender.Game is MOHWClient) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsGameplayMOHW());
                }

                if (sender.Game is BFBC2Client || sender.Game is MoHClient) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsTextChatModeration());
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsLevelVariables());
                }

                if (sender.Game is BF4Client) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsTeamKillsBF4());
                }
                else {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsTeamKills());
                }

                if (sender.Game is BFBC2Client) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsConfigGeneratorBFBC2());
                }
                else if (sender.Game is MoHClient) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsConfigGeneratorMoH());
                }
                else if (sender.Game is BF3Client) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsConfigGeneratorBF3());
                }
                else if (sender.Game is BF4Client) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsConfigGeneratorBF4());
                }
                else if (sender.Game is MOHWClient) {
                    this.cboSelectedSettingsPanel.Items.Add(new uscServerSettingsConfigGeneratorMOHW());
                }

                foreach (uscServerSettings page in this.cboSelectedSettingsPanel.Items) {
                    if (this.pnlSettingsPanels.Controls.Contains(page) == false) {
                        this.pnlSettingsPanels.Controls.Add(page);
                        page.Dock = DockStyle.Fill;
                    }

                    if (this.cboSelectedSettingsPanel.SelectedItem == null) {
                        this.cboSelectedSettingsPanel.SelectedItem = page;
                    }

                    if (this.m_frmMain != null) {
                        page.SettingLoading = this.m_frmMain.picAjaxStyleLoading.Image;
                        page.SettingFail = this.m_frmMain.picAjaxStyleFail.Image;
                        page.SettingSuccess = this.m_frmMain.picAjaxStyleSuccess.Image;
                    }

                    page.SetConnection(sender);

                    if (this.m_clocLanguage != null) {
                        page.SetLocalization(this.m_clocLanguage);
                    }
                }
            });
        }
예제 #27
0
 private void item_ConnectionClosed(PRoConClient sender) {
     this.UpdateConnections();
 }
예제 #28
0
 private void m_prcClient_Login(PRoConClient sender) {
     this.InvokeIfRequired(() => { this.LoggedIn = true; });
 }
예제 #29
0
 private void m_prcClient_CompilingPlugins(PRoConClient sender) {
     Client.PluginsManager.PluginOutput += new PluginManager.PluginOutputHandler(Plugins_PluginOutput);
 }
예제 #30
0
        private void m_prcClient_CommandLoginFailure(PRoConClient sender, string strError) {
            this.InvokeIfRequired(() => {
                if (String.Compare(strError, "InsufficientPrivileges", true) == 0) {
                    this.ErrorMessage = this.m_clocLanguage.GetLocalized("uscLoginPanel.ErrorMessage.InsufficientPrivileges");
                }
                else if (String.Compare(strError, "InvalidUsername", true) == 0) {
                    this.ErrorMessage = this.m_clocLanguage.GetLocalized("uscLoginPanel.ErrorMessage.InvalidUsername");
                }
                else if (String.Compare(strError, "InvalidPassword", true) == 0 || String.Compare(strError, "InvalidPasswordHash", true) == 0) {
                    this.ErrorMessage = this.m_clocLanguage.GetLocalized("uscLoginPanel.ErrorMessage.InvalidPassword");
                }

                this.Connecting = this.LoggedIn = false;
            });
        }