public void Initialize(PRoConApplication praApplication, PRoConClient prcClient) { this._application = praApplication; foreach (Account accAccount in this._application.AccountsList) { if (this.AccountPrivileges.Contains(accAccount.Name) == false) { AccountPrivilege apPrivs = new AccountPrivilege(accAccount, new CPrivileges()); apPrivs.AccountPrivilegesChanged += new AccountPrivilege.AccountPrivilegesChangedHandler(apPrivs_AccountPrivilegesChanged); this.AccountPrivileges.Add(apPrivs); } else { this.AccountPrivileges[accAccount.Name].AccountPrivilegesChanged += new AccountPrivilege.AccountPrivilegesChangedHandler(apPrivs_AccountPrivilegesChanged); } } this._application.AccountsList.AccountAdded += new AccountDictionary.AccountAlteredHandler(AccountsList_AccountAdded); this._application.AccountsList.AccountRemoved += new AccountDictionary.AccountAlteredHandler(AccountsList_AccountRemoved); this._client = prcClient; this._client.SocketException += new PRoConClient.SocketExceptionHandler(m_prcClient_SocketException); this._client.ConnectionFailure += new PRoConClient.FailureHandler(m_prcClient_ConnectionFailure); this._client.ConnectionClosed += new PRoConClient.EmptyParamterHandler(m_prcClient_ConnectionClosed); this._client.Game.Login += new FrostbiteClient.EmptyParamterHandler(m_prcClient_CommandLogin); this.ClientConnected += PRoConLayer_ClientConnected; if (this.IsEnabled == true && this.IsOnline == false) { this.Start(); } }
public OptionsSettings(PRoConApplication praApplication) { this.m_praApplication = praApplication; this.AutoCheckDownloadUpdates = true; this.AutoCheckGameConfigsForUpdates = true; this.EnableAdminReason = false; this.LayerHideLocalAccounts = true; this.LayerHideLocalPlugins = true; this.ShowCfmMsgRoundRestartNext = true; this.ShowDICESpecialOptions = false; this.ShowTrayIcon = true; this.TrustedHostsWebsitesPorts = new NotificationList <TrustedHostWebsitePort>(); this.StatsLinksMaxNum = 4; this.StatsLinkNameUrl = new NotificationList <StatsLinkNameUrl>(); this.StatsLinkNameUrl.Add(new StatsLinkNameUrl("Battlelog", "https://battlelog.battlefield.com/%game%/user/%player_name%")); this.StatsLinkNameUrl.Add(new StatsLinkNameUrl("PunkBuster", "https://www.pbbans.com/mbi-guid-search-%player_PBguid%.html")); this.StatsLinkNameUrl.Add(new StatsLinkNameUrl("BF4DB", "https://bf4db.com/player/search?query=%player_name%")); this.PluginMaxRuntime_s = 59; this.PluginMaxRuntime_m = 0; this.UsePluginOldStyleLoad = false; this.EnablePluginDebugging = false; }
public OptionsSettings(PRoConApplication praApplication) { this.m_praApplication = praApplication; this.AutoCheckDownloadUpdates = true; this.AutoCheckGameConfigsForUpdates = true; this.AllowAnonymousUsageData = true; this.EnableAdminReason = false; this.LayerHideLocalAccounts = true; this.LayerHideLocalPlugins = true; this.ShowCfmMsgRoundRestartNext = true; this.ShowDICESpecialOptions = false; this.ShowTrayIcon = true; this.TrustedHostsWebsitesPorts = new NotificationList <TrustedHostWebsitePort>(); this.StatsLinksMaxNum = 4; this.StatsLinkNameUrl = new NotificationList <StatsLinkNameUrl>(); this.StatsLinkNameUrl.Add(new StatsLinkNameUrl("Metabans", "http://metabans.com/search/%player_name%")); this.PluginMaxRuntime_s = 59; this.PluginMaxRuntime_m = 0; this.UsePluginOldStyleLoad = false; }
private void m_proconApplication_BeginRssUpdate(PRoConApplication instance) { if (this.m_isDocumentReady == true) { this.webBrowser1.Document.InvokeScript("LoadingRssFeed"); } }
public frmManageAccounts(PRoConApplication paProcon, frmMain frmMainWindow) { InitializeComponent(); this.m_paProcon = paProcon; this.m_paProcon.AccountsList.AccountAdded += new AccountDictionary.AccountAlteredHandler(AccountsList_AccountAdded); this.m_paProcon.AccountsList.AccountRemoved += new AccountDictionary.AccountAlteredHandler(AccountsList_AccountRemoved); this.m_frmMainWindow = frmMainWindow; Rectangle recWindow = new Rectangle(); recWindow.Location = new Point(0, 0); recWindow.Height = 540; recWindow.Width = 600; this.Bounds = recWindow; Rectangle recPanels = new Rectangle(); recPanels.Location = new Point(0, 0); recPanels.Height = 500; recPanels.Width = 600; this.pnlChooseAccount.Bounds = this.pnlCreateAccount.Bounds = this.pnlAlterPrivileges.Bounds = this.pnlConfirmation.Bounds = this.pnlEditingUser.Bounds = recPanels; this.uscSetPrivileges.OnCancelPrivileges += new uscPrivilegesSelection.OnCancelPrivilegesDelegate(uscSetPrivileges_OnCancelPrivileges); this.uscSetPrivileges.OnUpdatePrivileges += new uscPrivilegesSelection.OnUpdatePrivilegesDelegate(uscSetPrivileges_OnUpdatePrivileges); this.picDeleteAccount.Image = this.m_frmMainWindow.iglIcons.Images["cross.png"]; this.picCreateNewAccount.Image = this.m_frmMainWindow.iglIcons.Images["new.png"]; this.picRemovePrivileges.Image = this.m_frmMainWindow.iglIcons.Images["key_delete.png"]; this.picEditGlobalPrivileges.Image = this.m_frmMainWindow.iglIcons.Images["key.png"]; }
public frmManageAccounts(PRoConApplication paProcon, frmMain frmMainWindow) { InitializeComponent(); this.m_paProcon = paProcon; this.m_paProcon.AccountsList.AccountAdded += new AccountDictionary.AccountAlteredHandler(AccountsList_AccountAdded); this.m_paProcon.AccountsList.AccountRemoved += new AccountDictionary.AccountAlteredHandler(AccountsList_AccountRemoved); this.m_frmMainWindow = frmMainWindow; Rectangle recWindow = new Rectangle(); recWindow.Location = new Point(0, 0); recWindow.Height = 540; recWindow.Width = 600; this.Bounds = recWindow; Rectangle recPanels = new Rectangle(); recPanels.Location = new Point(0, 0); recPanels.Height = 500; recPanels.Width = 600; this.pnlChooseAccount.Bounds = this.pnlCreateAccount.Bounds = this.pnlAlterPrivileges.Bounds = this.pnlConfirmation.Bounds = this.pnlEditingUser.Bounds = recPanels; this.uscSetPrivileges.OnCancelPrivileges += new uscPrivilegesSelection.OnCancelPrivilegesDelegate(uscSetPrivileges_OnCancelPrivileges); this.uscSetPrivileges.OnUpdatePrivileges += new uscPrivilegesSelection.OnUpdatePrivilegesDelegate(uscSetPrivileges_OnUpdatePrivileges); this.picDeleteAccount.Image = this.m_frmMainWindow.iglIcons.Images["cross.png"]; this.picCreateNewAccount.Image = this.m_frmMainWindow.iglIcons.Images["new.png"]; this.picRemovePrivileges.Image = this.m_frmMainWindow.iglIcons.Images["key_delete.png"]; this.picEditGlobalPrivileges.Image = this.m_frmMainWindow.iglIcons.Images["key.png"]; }
public void Initialize(PRoConApplication praApplication, PRoConClient prcClient) { this.m_praApplication = praApplication; foreach (Account accAccount in this.m_praApplication.AccountsList) { if (this.AccountPrivileges.Contains(accAccount.Name) == false) { AccountPrivilege apPrivs = new AccountPrivilege(accAccount, new CPrivileges()); apPrivs.AccountPrivilegesChanged += new AccountPrivilege.AccountPrivilegesChangedHandler(apPrivs_AccountPrivilegesChanged); this.AccountPrivileges.Add(apPrivs); } else { this.AccountPrivileges[accAccount.Name].AccountPrivilegesChanged += new AccountPrivilege.AccountPrivilegesChangedHandler(apPrivs_AccountPrivilegesChanged); } } this.m_praApplication.AccountsList.AccountAdded += new AccountDictionary.AccountAlteredHandler(AccountsList_AccountAdded); this.m_praApplication.AccountsList.AccountRemoved += new AccountDictionary.AccountAlteredHandler(AccountsList_AccountRemoved); this.m_prcClient = prcClient; this.m_prcClient.SocketException += new PRoConClient.SocketExceptionHandler(m_prcClient_SocketException); this.m_prcClient.ConnectionFailure += new PRoConClient.FailureHandler(m_prcClient_ConnectionFailure); this.m_prcClient.ConnectionClosed += new PRoConClient.EmptyParamterHandler(m_prcClient_ConnectionClosed); this.m_prcClient.Game.Login += new FrostbiteClient.EmptyParamterHandler(m_prcClient_CommandLogin); this.ClientConnected += new LayerAccountHandler(PRoConLayer_ClientConnected); if (this.LayerEnabled == true && this.IsLayerOnline == false) { this.StartLayerListener(); } }
public uscStartPage(PRoConApplication proconApplication) { this.m_isDocumentReady = false; this.m_proconApplication = proconApplication; this.m_proconApplication.Connections.ConnectionAdded += new ConnectionDictionary.ConnectionAlteredHandler(Connections_ConnectionAdded); this.m_proconApplication.Connections.ConnectionRemoved += new ConnectionDictionary.ConnectionAlteredHandler(Connections_ConnectionRemoved); this.m_proconApplication.PackageManager.PackageDownloaded += new PackageManager.PackageEventHandler(PackageManager_PackageDownloaded); this.m_proconApplication.PackageManager.PackageAwaitingRestart += new PackageManager.PackageEventHandler(PackageManager_PackageAwaitingRestart); this.m_proconApplication.PackageManager.PackageDownloadFail += new PackageManager.PackageEventHandler(PackageManager_PackageDownloadFail); this.m_proconApplication.PackageManager.RemotePackagesUpdated += new PackageManager.PackageManagerEventHandler(PackageManager_RemotePackagesUpdated); this.m_proconApplication.PackageManager.PackageBeginningDownload += new PackageManager.PackageEventHandler(PackageManager_PackageBeginningDownload); this.m_proconApplication.PackageManager.PackageInstalling += new PackageManager.PackageEventHandler(PackageManager_PackageInstalling); this.m_proconApplication.BeginRssUpdate += new PRoConApplication.EmptyParameterHandler(m_proconApplication_BeginRssUpdate); this.m_proconApplication.RssUpdateError += new PRoConApplication.EmptyParameterHandler(m_proconApplication_RssUpdateError); this.m_proconApplication.RssUpdateSuccess += new PRoConApplication.RssHandler(m_proconApplication_RssUpdateSuccess); this.m_proconApplication.BeginPromoUpdate += new PRoConApplication.EmptyParameterHandler(m_proconApplication_BeginRssUpdate); this.m_proconApplication.PromoUpdateError += new PRoConApplication.EmptyParameterHandler(m_proconApplication_RssUpdateError); this.m_proconApplication.PromoUpdateSuccess += new PRoConApplication.RssHandler(m_proconApplication_PromoUpdateSuccess); InitializeComponent(); }
static void Main(string[] args) { int iValue; if (args != null && args.Length >= 2) { for (int i = 0; i < args.Length; i = i + 2) { if (String.Compare("-use_core", args[i], true) == 0 && int.TryParse(args[i + 1], out iValue) == true && iValue > 0) { System.Diagnostics.Process.GetCurrentProcess().ProcessorAffinity = (System.IntPtr)iValue; } } } PRoConApplication application = null; if (PRoConApplication.IsProcessOpen() == false) { try { application = new PRoConApplication(true, args); // Note: The license states usage data must be enabled for procon.console.exe support application.OptionsSettings.AllowAnonymousUsageData = true; System.Console.WriteLine("Procon Frostbite"); System.Console.WriteLine("================"); System.Console.WriteLine("By executing this application you agree to the license available at:"); System.Console.WriteLine("\thttp://myrcon.com/licenses/myrcon.pdf"); System.Console.WriteLine("If you do not agree you must immediately exit this application."); System.Console.WriteLine("================"); System.Console.WriteLine("This is a cut down version of PRoCon.exe to be used by GSPs and PRoCon Hosts."); System.Console.WriteLine("Executing this file is the same as \"PRoCon.exe -console 1\""); System.Console.WriteLine("No output is given. This is as cut down as we're gunno get.."); System.Console.WriteLine("\nExecuting procon..."); application.Execute(); GC.Collect(); System.Console.WriteLine("Running... (Press any key to shutdown)"); System.Console.ReadKey(); } catch (Exception e) { FrostbiteConnection.LogError("PRoCon.Console.exe", "", e); } finally { if (application != null) { application.Shutdown(); } } } else { // Possible prevention of a cpu consumption bug I can see at the time of writing. // TCAdmin: Start procon.exe // procon.exe has an update to install // procon.exe loads proconupdater.exe // procon.exe unloads // proconupdater.exe begins update // TCAdmin detects procon.exe shutdown - attempts to reload System.Console.WriteLine("Already running - shutting down"); Thread.Sleep(50); } }
private void m_proconApplication_RssUpdateError(PRoConApplication instance) { if (this.m_isDocumentReady == true) { this.webBrowser1.Document.InvokeScript("UpdateRssMonthlySummaryFeed", new String[] { "" }); this.webBrowser1.Document.InvokeScript("UpdateRssDonationFeed", new String[] { "" }); this.webBrowser1.Document.InvokeScript("UpdateRssFeed", new String[] { "" }); } }
public AutoUpdater(PRoConApplication praApplication, string[] args) { Arguments = args; Application = praApplication; VersionChecker = new CDownloadFile("https://repo.myrcon.com/procon1/version3.php"); VersionChecker.DownloadComplete += new CDownloadFile.DownloadFileEventDelegate(VersionChecker_DownloadComplete); DownloadingLocalizations = new List<CDownloadFile>(); DownloadingGameConfigs = new List<CDownloadFile>(); }
private void m_proconApplication_BeginRssUpdate(PRoConApplication instance) { this.InvokeIfRequired(() => { if (this._isDocumentReady == true && this.webBrowser1.Document != null) { this.webBrowser1.Document.InvokeScript("LoadingRssFeed"); } }); }
public AutoUpdater(PRoConApplication praApplication, string[] args) { AutoUpdater.m_strArgs = args; this.m_praApplication = praApplication; this.VersionChecker = new CDownloadFile("http://www.phogue.net/procon/version3.php"); this.VersionChecker.DownloadComplete += new CDownloadFile.DownloadFileEventDelegate(VersionChecker_DownloadComplete); this.m_lstDownloadingLocalizations = new List<CDownloadFile>(); this.m_lstDownloadingGameConfigs = new List<CDownloadFile>(); }
private void BasicConsole_Load(object sender, EventArgs e) { this.m_praApplication = this.WindowLoaded(false); this.m_praApplication.Connections.ConnectionAdded += new ConnectionDictionary.ConnectionAlteredHandler(Connections_ConnectionAdded); this.m_praApplication.Execute(); if (this.m_praApplication.CustomTitle.Length > 0) { this.Text = this.m_praApplication.CustomTitle; } }
public AutoUpdater(PRoConApplication praApplication, string[] args) { Arguments = args; Application = praApplication; VersionChecker = new CDownloadFile("https://repo.myrcon.com/procon1/version3.php"); VersionChecker.DownloadComplete += new CDownloadFile.DownloadFileEventDelegate(VersionChecker_DownloadComplete); DownloadingLocalizations = new List <CDownloadFile>(); DownloadingGameConfigs = new List <CDownloadFile>(); }
public AutoUpdater(PRoConApplication praApplication, string[] args) { AutoUpdater.m_strArgs = args; this.m_praApplication = praApplication; this.VersionChecker = new CDownloadFile("http://www.phogue.net/procon/version3.php"); this.VersionChecker.DownloadComplete += new CDownloadFile.DownloadFileEventDelegate(VersionChecker_DownloadComplete); this.m_lstDownloadingLocalizations = new List <CDownloadFile>(); this.m_lstDownloadingGameConfigs = new List <CDownloadFile>(); }
public PRoConLayerClient(FrostbiteLayerConnection newConnection, PRoConApplication praApplication, PRoConClient prcClient) { this.IsLoggedIn = false; this.GzipCompression = false; this.ProconEventsUid = String.Empty; if (prcClient.Game != null) { if (prcClient.Game is BFBC2Client) { this.Game = new BFBC2LayerClient(newConnection); } else if (prcClient.Game is MoHClient) { this.Game = new MoHLayerClient(newConnection); } this.m_requestDelegates = new Dictionary<string, RequestPacketHandler>() { { "procon.login.username", this.DispatchProconLoginUsernameRequest }, { "procon.registerUid", this.DispatchProconRegisterUidRequest }, { "procon.version", this.DispatchProconVersionRequest }, { "procon.vars", this.DispatchProconVarsRequest }, { "procon.privileges", this.DispatchProconPrivilegesRequest }, { "procon.compression", this.DispatchProconCompressionRequest }, { "procon.account.listAccounts", this.DispatchProconAccountListAccountsRequest }, { "procon.account.listLoggedIn", this.DispatchProconAccountListLoggedInRequest }, { "procon.account.create", this.DispatchProconAccountCreateRequest }, { "procon.account.delete", this.DispatchProconAccountDeleteRequest }, { "procon.account.setPassword", this.DispatchProconAccountSetPasswordRequest }, { "procon.battlemap.deleteZone", this.DispatchProconBattlemapDeleteZoneRequest }, { "procon.battlemap.createZone", this.DispatchProconBattlemapCreateZoneRequest }, { "procon.battlemap.modifyZoneTags", this.DispatchProconBattlemapModifyZoneTagsRequest }, { "procon.battlemap.modifyZonePoints", this.DispatchProconBattlemapModifyZonePointsRequest }, { "procon.battlemap.listZones", this.DispatchProconBattlemapListZonesRequest }, { "procon.layer.setPrivileges", this.DispatchProconLayerSetPrivilegesRequest }, { "procon.plugin.listLoaded", this.DispatchProconPluginListLoadedRequest }, { "procon.plugin.listEnabled", this.DispatchProconPluginListEnabledRequest }, { "procon.plugin.enable", this.DispatchProconPluginEnableRequest }, { "procon.plugin.setVariable", this.DispatchProconPluginSetVariableRequest }, { "procon.exec", this.DispatchProconExecRequest }, { "procon.packages.install", this.DispatchProconPackagesInstallRequest }, { "procon.admin.say", this.DispatchProconAdminSayRequest }, { "procon.admin.yell", this.DispatchProconAdminYellRequest }, }; if ((this.m_praApplication = praApplication) != null && (this.m_prcClient = prcClient) != null) { this.RegisterEvents(); } } }
public frmOptions(PRoConApplication praApplication, frmMain frmParent) { this.m_isLoadingForm = true; InitializeComponent(); this.m_praApplication = praApplication; this.m_praApplication.CurrentLanguageChanged += new PRoConApplication.CurrentLanguageHandler(m_praApplication_CurrentLanguageChanged); this.m_praApplication.OptionsSettings.AutoApplyUpdatesChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_AutoApplyUpdatesChanged); this.m_praApplication.OptionsSettings.AutoCheckDownloadUpdatesChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_AutoCheckDownloadUpdatesChanged); this.m_praApplication.OptionsSettings.ChatLoggingChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_ChatLoggingChanged); this.m_praApplication.OptionsSettings.PluginsLoggingChanged += new OptionsSettings.OptionsEnabledHandler(OptionsSettings_PluginsLoggingChanged); this.m_praApplication.OptionsSettings.EventsLoggingChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_EventsLoggingChanged); this.m_praApplication.OptionsSettings.ConsoleLoggingChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_ConsoleLoggingChanged); this.m_praApplication.OptionsSettings.ShowTrayIconChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_ShowTrayIconChanged); this.m_praApplication.OptionsSettings.CloseToTrayChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_CloseToTrayChanged); this.m_praApplication.OptionsSettings.MinimizeToTrayChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_MinimizeToTrayChanged); this.m_praApplication.OptionsSettings.RunPluginsInTrustedSandboxChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_RunPluginsInTrustedSandboxChanged); this.m_praApplication.OptionsSettings.AllowAllODBCConnectionsChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_AllowAllODBCConnectionsChanged); this.m_praApplication.OptionsSettings.AllowAllSmtpConnectionsChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_AllowAllSmtpConnectionsChanged); this.m_praApplication.OptionsSettings.TrustedHostsWebsitesPorts.ItemAdded += new NotificationList <PRoCon.Core.Options.TrustedHostWebsitePort> .ItemModifiedHandler(TrustedHostsWebsitesPorts_ItemAdded); this.m_praApplication.OptionsSettings.TrustedHostsWebsitesPorts.ItemRemoved += new NotificationList <PRoCon.Core.Options.TrustedHostWebsitePort> .ItemModifiedHandler(TrustedHostsWebsitesPorts_ItemRemoved); this.m_praApplication.HttpServerOffline += new PRoCon.Core.HttpServer.HttpWebServer.StateChangeHandler(m_praApplication_HttpServerOffline); this.m_praApplication.HttpServerOnline += new PRoCon.Core.HttpServer.HttpWebServer.StateChangeHandler(m_praApplication_HttpServerOnline); this.m_praApplication.OptionsSettings.AdminMoveMessageChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_AdminMoveMessageChanged); this.m_praApplication.OptionsSettings.ChatDisplayAdminNameChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_ChatDisplayAdminNameChanged); this.m_praApplication.OptionsSettings.LayerHideLocalAccountsChanged += new OptionsSettings.OptionsEnabledHandler(OptionsSettings_LayerHideLocalAccountsChanged); this.m_praApplication.OptionsSettings.LayerHideLocalPluginsChanged += new OptionsSettings.OptionsEnabledHandler(OptionsSettings_LayerHideLocalPluginsChanged); this.m_praApplication.OptionsSettings.ShowRoundTimerConstantlyChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_ShowRoundTimerConstantlyChanged); //m_fntComboBoxFont = new Font("Calibri", 10); this.m_frmParent = frmParent; this.picHttpServerServerStatus.Image = this.m_frmParent.picLayerOffline.Image; cboBasicsLanguagePicker.DropDownStyle = ComboBoxStyle.DropDownList; cboBasicsLanguagePicker.DrawMode = DrawMode.OwnerDrawVariable; //this.LoadLocalizationFiles(); this.btnPluginsRemoveTrustedHostDomain.ImageList = this.btnPluginsAddTrustedHostDomain.ImageList = this.m_frmParent.iglIcons; this.btnPluginsAddTrustedHostDomain.ImageKey = "add.png"; this.btnPluginsRemoveTrustedHostDomain.ImageKey = "cross.png"; this.cboBasicsShowWindow.SelectedIndex = frmOptions.INT_OPTIONS_PREFERENCES_SHOWWINDOW_TASKBARANDTRAY; this.cboPluginsSandboxOptions.SelectedIndex = 0; }
private void m_proconApplication_RssUpdateError(PRoConApplication instance) { this.InvokeIfRequired(() => { if (this._isDocumentReady == true && this.webBrowser1.Document != null) { this.webBrowser1.Document.InvokeScript("UpdateRssMonthlySummaryFeed", new object[] { "" }); this.webBrowser1.Document.InvokeScript("UpdateRssDonationFeed", new object[] { "" }); this.webBrowser1.Document.InvokeScript("UpdateRssFeed", new object[] { "" }); } }); }
private void BasicConsole_Load(object sender, EventArgs e) { this.m_praApplication = this.WindowLoaded(false); this.m_praApplication.Connections.ConnectionAdded += new ConnectionDictionary.ConnectionAlteredHandler(Connections_ConnectionAdded); this.m_praApplication.Execute(); if (this.m_praApplication.CustomTitle.Length > 0) { this.Text = this.m_praApplication.CustomTitle; } }
static PRoConApplication procon_WindowLoaded(bool execute) { Program.ProconApplication = new PRoConApplication(false, Program.Args); if (execute == true) { Program.ProconApplication.Execute(); } return(Program.ProconApplication); }
public frmOptions(PRoConApplication praApplication, frmMain frmParent) { this.m_isLoadingForm = true; InitializeComponent(); this.m_praApplication = praApplication; this.m_praApplication.CurrentLanguageChanged += new PRoConApplication.CurrentLanguageHandler(m_praApplication_CurrentLanguageChanged); this.m_praApplication.OptionsSettings.AutoApplyUpdatesChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_AutoApplyUpdatesChanged); this.m_praApplication.OptionsSettings.AutoCheckDownloadUpdatesChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_AutoCheckDownloadUpdatesChanged); this.m_praApplication.OptionsSettings.ChatLoggingChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_ChatLoggingChanged); this.m_praApplication.OptionsSettings.PluginsLoggingChanged += new OptionsSettings.OptionsEnabledHandler(OptionsSettings_PluginsLoggingChanged); this.m_praApplication.OptionsSettings.EventsLoggingChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_EventsLoggingChanged); this.m_praApplication.OptionsSettings.ConsoleLoggingChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_ConsoleLoggingChanged); this.m_praApplication.OptionsSettings.ShowTrayIconChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_ShowTrayIconChanged); this.m_praApplication.OptionsSettings.CloseToTrayChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_CloseToTrayChanged); this.m_praApplication.OptionsSettings.MinimizeToTrayChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_MinimizeToTrayChanged); this.m_praApplication.OptionsSettings.RunPluginsInTrustedSandboxChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_RunPluginsInTrustedSandboxChanged); this.m_praApplication.OptionsSettings.AllowAllODBCConnectionsChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_AllowAllODBCConnectionsChanged); this.m_praApplication.OptionsSettings.TrustedHostsWebsitesPorts.ItemAdded += new NotificationList<PRoCon.Core.Options.TrustedHostWebsitePort>.ItemModifiedHandler(TrustedHostsWebsitesPorts_ItemAdded); this.m_praApplication.OptionsSettings.TrustedHostsWebsitesPorts.ItemRemoved += new NotificationList<PRoCon.Core.Options.TrustedHostWebsitePort>.ItemModifiedHandler(TrustedHostsWebsitesPorts_ItemRemoved); this.m_praApplication.HttpServerOffline += new PRoCon.Core.HttpServer.HttpWebServer.StateChangeHandler(m_praApplication_HttpServerOffline); this.m_praApplication.HttpServerOnline += new PRoCon.Core.HttpServer.HttpWebServer.StateChangeHandler(m_praApplication_HttpServerOnline); this.m_praApplication.OptionsSettings.AdminMoveMessageChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_AdminMoveMessageChanged); this.m_praApplication.OptionsSettings.ChatDisplayAdminNameChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_ChatDisplayAdminNameChanged); this.m_praApplication.OptionsSettings.LayerHideLocalAccountsChanged += new OptionsSettings.OptionsEnabledHandler(OptionsSettings_LayerHideLocalAccountsChanged); this.m_praApplication.OptionsSettings.LayerHideLocalPluginsChanged += new OptionsSettings.OptionsEnabledHandler(OptionsSettings_LayerHideLocalPluginsChanged); this.m_praApplication.OptionsSettings.ShowRoundTimerConstantlyChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_ShowRoundTimerConstantlyChanged); //m_fntComboBoxFont = new Font("Calibri", 10); this.m_frmParent = frmParent; this.picHttpServerServerStatus.Image = this.m_frmParent.picLayerOffline.Image; cboBasicsLanguagePicker.DropDownStyle = ComboBoxStyle.DropDownList; cboBasicsLanguagePicker.DrawMode = DrawMode.OwnerDrawVariable; //this.LoadLocalizationFiles(); this.btnPluginsRemoveTrustedHostDomain.ImageList = this.btnPluginsAddTrustedHostDomain.ImageList = this.m_frmParent.iglIcons; this.btnPluginsAddTrustedHostDomain.ImageKey = "add.png"; this.btnPluginsRemoveTrustedHostDomain.ImageKey = "cross.png"; this.cboBasicsShowWindow.SelectedIndex = frmOptions.INT_OPTIONS_PREFERENCES_SHOWWINDOW_TASKBARANDTRAY; this.cboPluginsSandboxOptions.SelectedIndex = 0; }
public OptionsSettings(PRoConApplication praApplication) { this.m_praApplication = praApplication; this.AutoCheckDownloadUpdates = true; this.LayerHideLocalAccounts = true; this.LayerHideLocalPlugins = true; this.ShowTrayIcon = true; this.TrustedHostsWebsitesPorts = new NotificationList<TrustedHostWebsitePort>(); }
public OptionsSettings(PRoConApplication praApplication) { this.m_praApplication = praApplication; this.AutoCheckDownloadUpdates = true; this.AllowAnonymousUsageData = true; this.LayerHideLocalAccounts = true; this.LayerHideLocalPlugins = true; this.ShowTrayIcon = true; this.TrustedHostsWebsitesPorts = new NotificationList <TrustedHostWebsitePort>(); }
static void Main(string[] args) { PRoConApplication application = null; if (PRoConApplication.IsProcessOpen() == false) { try { application = new PRoConApplication(true, args); // Note: The license states usage data must be enabled for procon.console.exe support application.OptionsSettings.AllowAnonymousUsageData = true; System.Console.WriteLine("Procon Frostbite"); System.Console.WriteLine("================"); System.Console.WriteLine("By executing this application you agree to the license available at:"); System.Console.WriteLine("\thttp://myrcon.com/licenses/myrcon.pdf"); System.Console.WriteLine("If you do not agree you must immediately exit this application."); System.Console.WriteLine("================"); System.Console.WriteLine("This is a cut down version of PRoCon.exe to be used by GSPs and PRoCon Hosts."); System.Console.WriteLine("Executing this file is the same as \"PRoCon.exe -console 1\""); System.Console.WriteLine("No output is given. This is as cut down as we're gunno get.."); System.Console.WriteLine("\nExecuting procon..."); application.Execute(); GC.Collect(); System.Console.WriteLine("Running... (Press any key to shutdown)"); System.Console.ReadKey(); } catch (Exception e) { FrostbiteConnection.LogError("PRoCon.Console.exe", "", e); } finally { if (application != null) { application.Shutdown(); } } } else { // Possible prevention of a cpu consumption bug I can see at the time of writing. // TCAdmin: Start procon.exe // procon.exe has an update to install // procon.exe loads proconupdater.exe // procon.exe unloads // proconupdater.exe begins update // TCAdmin detects procon.exe shutdown - attempts to reload System.Console.WriteLine("Already running - shutting down"); Thread.Sleep(50); } }
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); } } }
private void frmMain_Load(object sender, EventArgs e) { this.m_paProcon = this.WindowLoaded(false); string licenseAgreementRevision = "October 20, 2011"; if (this.m_paProcon.LicenseAgreements.Contains(licenseAgreementRevision) == false) { new LicenseAgreement(this.m_paProcon, licenseAgreementRevision).ShowDialog(); } this.SetupStartPage(); this.m_paProcon.Connections.ConnectionAdded += new ConnectionDictionary.ConnectionAlteredHandler(Connections_ConnectionAdded); this.m_paProcon.Connections.ConnectionRemoved += new ConnectionDictionary.ConnectionAlteredHandler(Connections_ConnectionRemoved); this.m_paProcon.ShowNotification += new PRoConApplication.ShowNotificationHandler(m_paProcon_ShowNotification); this.m_paProcon.CurrentLanguageChanged += new PRoConApplication.CurrentLanguageHandler(m_paProcon_CurrentLanguageChanged); this.m_paProcon.OptionsSettings.ShowTrayIconChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_ShowTrayIconChanged); this.m_paProcon.AutoUpdater.CustomDownloadError += new AutoUpdater.CustomDownloadErrorHandler(AutoUpdater_CustomDownloadError); this.m_paProcon.AutoUpdater.DownloadUnzipComplete += new AutoUpdater.DownloadUnzipCompleteHandler(AutoUpdater_DownloadUnzipComplete); this.m_paProcon.AutoUpdater.CheckingUpdates += new AutoUpdater.CheckingUpdatesHandler(m_paProcon_CheckingUpdates); this.m_paProcon.AutoUpdater.NoVersionAvailable += new AutoUpdater.CheckingUpdatesHandler(m_paProcon_NoVersionAvailable); this.m_paProcon.AutoUpdater.VersionChecker.DownloadError += new CDownloadFile.DownloadFileEventDelegate(VersionChecker_DownloadError); this.m_paProcon.AutoUpdater.UpdateDownloading += new AutoUpdater.UpdateDownloadingHandler(m_paProcon_UpdateDownloading); this.m_paProcon.AutoUpdater.GameConfigUpdated += new AutoUpdater.CheckingUpdatesHandler(m_paProcon_GameConfigUpdated); this.m_paProcon.Execute(); if (this.m_paProcon.CustomTitle.Length > 0) { this.Text = this.m_paProcon.CustomTitle; } this.m_frmManageAccounts = new frmManageAccounts(this.m_paProcon, this); this.m_frmOptions = new frmOptions(this.m_paProcon, this); this.WindowState = this.m_paProcon.SavedWindowState; this.Bounds = this.m_paProcon.SavedWindowBounds; this.Refresh(); //foreach (PRoConClient prcClient in this.m_paProcon.Connections) { // this.Connections_ConnectionAdded(prcClient); //} this.m_paProcon.CurrentLanguage = this.m_paProcon.CurrentLanguage; }
public uscStartPage(PRoConApplication proconApplication) { this._isDocumentReady = false; this._proconApplication = proconApplication; this._proconApplication.Connections.ConnectionAdded += new ConnectionDictionary.ConnectionAlteredHandler(Connections_ConnectionAdded); this._proconApplication.Connections.ConnectionRemoved += new ConnectionDictionary.ConnectionAlteredHandler(Connections_ConnectionRemoved); this._proconApplication.BeginRssUpdate += new PRoConApplication.EmptyParameterHandler(m_proconApplication_BeginRssUpdate); this._proconApplication.RssUpdateError += new PRoConApplication.EmptyParameterHandler(m_proconApplication_RssUpdateError); this._proconApplication.RssUpdateSuccess += new PRoConApplication.RssHandler(m_proconApplication_RssUpdateSuccess); this._proconApplication.BeginPromoUpdate += new PRoConApplication.EmptyParameterHandler(m_proconApplication_BeginRssUpdate); this._proconApplication.PromoUpdateError += new PRoConApplication.EmptyParameterHandler(m_proconApplication_RssUpdateError); this._proconApplication.PromoUpdateSuccess += new PRoConApplication.RssHandler(m_proconApplication_PromoUpdateSuccess); InitializeComponent(); }
static void Main(string[] args) { PRoConApplication application = null; if (PRoConApplication.IsProcessOpen() == false) { try { application = new PRoConApplication(true, args); System.Console.WriteLine("PRoCon Frostbite"); System.Console.WriteLine("================"); System.Console.WriteLine("This is a cut down version of PRoCon.exe to be used by GSPs and PRoCon Hosts."); System.Console.WriteLine("Executing this file is the same as \"PRoCon.exe -console 1\""); System.Console.WriteLine("No output is given. This is as cut down as we're gunno get.."); System.Console.WriteLine("\nExecuting procon..."); application.Execute(); GC.Collect(); System.Console.WriteLine("Running... (Press any key to shutdown)"); System.Console.ReadKey(); } catch (Exception e) { FrostbiteConnection.LogError("PRoCon.Console.exe", "", e); } finally { if (application != null) { application.Shutdown(); } } } else { // Possible prevention of a cpu consumption bug I can see at the time of writing. // TCAdmin: Start procon.exe // procon.exe has an update to install // procon.exe loads proconupdater.exe // procon.exe unloads // proconupdater.exe begins update // TCAdmin detects procon.exe shutdown - attempts to reload System.Console.WriteLine("Already running - shutting down"); Thread.Sleep(50); } }
protected override void OnStart(string[] args) { //Setting the Evironment back to the Basedirectory //because Windows changes it to c://windows/system32 when running as service. Environment.CurrentDirectory = AppDomain.CurrentDomain.BaseDirectory; System.Console.WriteLine(Environment.CurrentDirectory); if (PRoConApplication.IsProcessOpen() == false) { try { application = new PRoConApplication(true, args); // Note: The license states usage data must be enabled for procon.console.exe support application.OptionsSettings.AllowAnonymousUsageData = true; application.Execute(); GC.Collect(); } catch (Exception e) { FrostbiteConnection.LogError("PRoCon.Service.exe", "", e); } } }
protected override void OnStart(string[] args) { //Setting the Evironment back to the Basedirectory //because Windows changes it to c://windows/system32 when running as service. Environment.CurrentDirectory = AppDomain.CurrentDomain.BaseDirectory; System.Console.WriteLine(Environment.CurrentDirectory); int iValue; if (args != null && args.Length >= 2) { for (int i = 0; i < args.Length; i = i + 2) { if (String.Compare("-use_core", args[i], true) == 0 && int.TryParse(args[i + 1], out iValue) == true && iValue > 0) { System.Diagnostics.Process.GetCurrentProcess().ProcessorAffinity = (System.IntPtr)iValue; } } } if (PRoConApplication.IsProcessOpen() == false) { try { application = new PRoConApplication(true, args); // Note: The license states usage data must be enabled for procon.console.exe support //application.OptionsSettings.AllowAnonymousUsageData = true; application.Execute(); GC.Collect(); } catch (Exception e) { FrostbiteConnection.LogError("PRoCon.Service.exe", "", e); } } }
public OptionsSettings(PRoConApplication praApplication) { this.m_praApplication = praApplication; this.AutoCheckDownloadUpdates = true; this.AutoCheckGameConfigsForUpdates = true; this.AllowAnonymousUsageData = true; this.EnableAdminReason = false; this.LayerHideLocalAccounts = true; this.LayerHideLocalPlugins = true; this.ShowCfmMsgRoundRestartNext = true; this.ShowDICESpecialOptions = false; this.ShowTrayIcon = true; this.TrustedHostsWebsitesPorts = new NotificationList<TrustedHostWebsitePort>(); this.StatsLinksMaxNum = 4; this.StatsLinkNameUrl = new NotificationList<StatsLinkNameUrl>(); this.StatsLinkNameUrl.Add(new StatsLinkNameUrl("Metabans", "http://metabans.com/search/%player_name%")); this.PluginMaxRuntime_s = 59; this.PluginMaxRuntime_m = 0; this.UsePluginOldStyleLoad = false; }
static void Main(string[] args) { int iValue; if (args != null && args.Length >= 2) { for (int i = 0; i < args.Length; i = i + 2) { if (String.Compare("-use_core", args[i], true) == 0 && int.TryParse(args[i + 1], out iValue) == true && iValue > 0) { System.Diagnostics.Process.GetCurrentProcess().ProcessorAffinity = (System.IntPtr)iValue; } } } PRoConApplication application = null; if (PRoConApplication.IsProcessOpen() == false) { try { application = new PRoConApplication(true, args); System.Console.WriteLine("Procon Frostbite"); System.Console.WriteLine("================"); System.Console.WriteLine("By executing this application you agree to the license available at:"); System.Console.WriteLine("\thttps://myrcon.net/licenses/myrcon.pdf"); System.Console.WriteLine("If you do not agree you must immediately exit this application."); System.Console.WriteLine("================"); System.Console.WriteLine("This is a cut down version of PRoCon.exe to be used by GSPs and PRoCon Hosts."); System.Console.WriteLine("Executing this file is the same as \"PRoCon.exe -console 1\""); System.Console.WriteLine("No output is given. This is as cut down as we're gunno get.."); System.Console.WriteLine("\nExecuting procon..."); application.Execute(); GC.Collect(); System.Console.WriteLine("Running... (Press any key to shutdown)"); System.Console.ReadKey(); } catch (Exception e) { FrostbiteConnection.LogError("PRoCon.Console.exe", "", e); } finally { if (application != null) { application.Shutdown(); } } } else { // Possible prevention of a cpu consumption bug I can see at the time of writing. // TCAdmin: Start procon.exe // procon.exe has an update to install // procon.exe loads proconupdater.exe // procon.exe unloads // proconupdater.exe begins update // TCAdmin detects procon.exe shutdown - attempts to reload System.Console.WriteLine("Already running - shutting down"); Thread.Sleep(50); } }
private void m_proconApplication_PromoUpdateSuccess(PRoConApplication instance, XmlDocument rssDocument) { this.ReplacePromoContent(rssDocument); }
private void m_proconApplication_PromoUpdateSuccess(PRoConApplication instance, XmlDocument rssDocument) { this.InvokeIfRequired(() => this.ReplacePromoContent(rssDocument)); }
private void frmMain_Load(object sender, EventArgs e) { this.m_paProcon = this.WindowLoaded(false); string licenseAgreementRevision = "October 20, 2011"; if (this.m_paProcon.LicenseAgreements.Contains(licenseAgreementRevision) == false) { new LicenseAgreement(this.m_paProcon, licenseAgreementRevision).ShowDialog(); } this.SetupStartPage(); this.m_paProcon.Connections.ConnectionAdded += new ConnectionDictionary.ConnectionAlteredHandler(Connections_ConnectionAdded); this.m_paProcon.Connections.ConnectionRemoved += new ConnectionDictionary.ConnectionAlteredHandler(Connections_ConnectionRemoved); this.m_paProcon.ShowNotification += new PRoConApplication.ShowNotificationHandler(m_paProcon_ShowNotification); this.m_paProcon.CurrentLanguageChanged += new PRoConApplication.CurrentLanguageHandler(m_paProcon_CurrentLanguageChanged); this.m_paProcon.OptionsSettings.ShowTrayIconChanged += new PRoCon.Core.Options.OptionsSettings.OptionsEnabledHandler(OptionsSettings_ShowTrayIconChanged); this.m_paProcon.AutoUpdater.CustomDownloadError += new AutoUpdater.CustomDownloadErrorHandler(AutoUpdater_CustomDownloadError); this.m_paProcon.AutoUpdater.DownloadUnzipComplete += new AutoUpdater.DownloadUnzipCompleteHandler(AutoUpdater_DownloadUnzipComplete); this.m_paProcon.AutoUpdater.CheckingUpdates += new AutoUpdater.CheckingUpdatesHandler(m_paProcon_CheckingUpdates); this.m_paProcon.AutoUpdater.NoVersionAvailable += new AutoUpdater.CheckingUpdatesHandler(m_paProcon_NoVersionAvailable); this.m_paProcon.AutoUpdater.VersionChecker.DownloadError += new CDownloadFile.DownloadFileEventDelegate(VersionChecker_DownloadError); this.m_paProcon.AutoUpdater.UpdateDownloading += new AutoUpdater.UpdateDownloadingHandler(m_paProcon_UpdateDownloading); this.m_paProcon.AutoUpdater.GameConfigUpdated += new AutoUpdater.CheckingUpdatesHandler(m_paProcon_GameConfigUpdated); this.m_paProcon.Execute(); if (this.m_paProcon.CustomTitle.Length > 0) { this.Text = this.m_paProcon.CustomTitle; } this.m_frmManageAccounts = new frmManageAccounts(this.m_paProcon, this); this.m_frmOptions = new frmOptions(this.m_paProcon, this); this.WindowState = this.m_paProcon.SavedWindowState; this.Bounds = this.m_paProcon.SavedWindowBounds; this.Refresh(); //foreach (PRoConClient prcClient in this.m_paProcon.Connections) { // this.Connections_ConnectionAdded(prcClient); //} this.m_paProcon.CurrentLanguage = this.m_paProcon.CurrentLanguage; }
static void Main(string[] args) { Program.m_Args = args; if (PRoConApplication.IsProcessOpen() == false) { if (Directory.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updates")) == true) { AutoUpdater.m_strArgs = args; AutoUpdater.BeginUpdateProcess(null); } else { //PRoConApplication paProcon = null; try { bool blBasicConsole = false; bool blGspUpdater = false; int iValue; if (args != null && args.Length >= 2) { for (int i = 0; i < args.Length; i = i + 2) { if (String.Compare("-console", args[i], true) == 0 && int.TryParse(args[i + 1], out iValue) == true && iValue == 1) { blBasicConsole = true; } if (String.Compare("-gspupdater", args[i], true) == 0 && int.TryParse(args[i + 1], out iValue) == true && iValue == 1) { blGspUpdater = true; } } } //Thread.Sleep(5000); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (blGspUpdater == true) { Application.Run(new GspUpdater()); } else { if (blBasicConsole == true) { BasicConsole basicWindow = new BasicConsole(); basicWindow.WindowLoaded += new BasicConsole.WindowLoadedHandler(procon_WindowLoaded); Application.Run(basicWindow); } else { frmMain mainWindow = new frmMain(args); mainWindow.WindowLoaded += new frmMain.WindowLoadedHandler(procon_WindowLoaded); Application.Run(mainWindow); } } } catch (Exception e) { FrostbiteConnection.LogError("Application error", String.Empty, e); MessageBox.Show("PRoCon ran into a critical error, but hopefully it logged that error in DEBUG.txt. Please post/pm/email this to phogue at www.phogue.net."); } finally { if (Program.m_application != null) { Program.m_application.Shutdown(); } } } } else { // Possible prevention of a cpu consumption bug I can see at the time of writing. // TCAdmin: Start procon.exe // procon.exe has an update to install // procon.exe loads proconupdater.exe // procon.exe unloads // proconupdater.exe begins update // TCAdmin detects procon.exe shutdown - attempts to reload Thread.Sleep(50); } }
/* * public static void BeginUpdateProcess() { * * // Check if the autoupdater needs updating.. if not then we'll forget about it. * * string strUpdatesFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updates"); * * if (Directory.Exists(strUpdatesFolder) == true) { * * int iDeleteChecker = 0; * * string strCurrentProconUpdaterPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PRoConUpdater.exe"); * // Overwrite proconupdater.exe * * if (File.Exists(Path.Combine(strUpdatesFolder, "PRoConUpdater.exe")) == true) { * * do { * try { * File.Copy(Path.Combine(strUpdatesFolder, "PRoConUpdater.exe"), strCurrentProconUpdaterPath, true); * * File.Delete(Path.Combine(strUpdatesFolder, "PRoConUpdater.exe")); * } * catch (Exception) { } * * Thread.Sleep(100); * iDeleteChecker++; * } while (File.Exists(Path.Combine(strUpdatesFolder, "PRoConUpdater.exe")) == true && iDeleteChecker < 10); * } * * if (File.Exists(strCurrentProconUpdaterPath) == true) { * * if (AutoUpdater.m_strArgs.Length == 0) { * System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe"); * } * else { * System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe", String.Join(" ", AutoUpdater.m_strArgs)); * } * * Application.Exit(); * } * } * } */ public static void BeginUpdateProcess(PRoConApplication praApplication) { // Check if the autoupdater needs updating.. if not then we'll forget about it. string strUpdatesFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updates"); if (Directory.Exists(strUpdatesFolder) == true) { AssemblyName proconUpdaterAssemblyName = null; AssemblyName proconUpdaterUpdatesDirAssemblyName = null; if (File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PRoConUpdater.exe")) == true) { proconUpdaterAssemblyName = AssemblyName.GetAssemblyName(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PRoConUpdater.exe")); } if (File.Exists(Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updates"), "PRoConUpdater.exe")) == true) { proconUpdaterUpdatesDirAssemblyName = AssemblyName.GetAssemblyName(Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updates"), "PRoConUpdater.exe")); } // If the old updater is.. old =) if ((proconUpdaterAssemblyName == null && proconUpdaterUpdatesDirAssemblyName != null) || (proconUpdaterAssemblyName != null && proconUpdaterUpdatesDirAssemblyName != null && proconUpdaterUpdatesDirAssemblyName.Version.CompareTo(proconUpdaterAssemblyName.Version) > 0)) { //int iDeleteChecker = 0; string strCurrentProconUpdaterPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PRoConUpdater.exe"); // Overwrite proconupdater.exe //do { // //if (iDeleteChecker > 0) { // // MessageBox.Show("Please close the PRoConUpdater to continue the update process.."); // //} // try { // //File.Delete(strCurrentProconUpdaterPath); // } // catch (Exception) { } // Thread.Sleep(100); // iDeleteChecker++; //} while (File.Exists(strCurrentProconUpdaterPath) == true && iDeleteChecker < 5); try { try { File.Copy(Path.Combine(strUpdatesFolder, "PRoConUpdater.exe"), strCurrentProconUpdaterPath, true); File.Delete(Path.Combine(strUpdatesFolder, "PRoConUpdater.exe")); } catch (Exception) { } if (Arguments != null && Arguments.Length == 0) { Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe"); } else { Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe", String.Join(" ", Arguments)); } if (praApplication != null) { praApplication.Shutdown(); } System.Windows.Forms.Application.Exit(); } catch (Exception) { } } else { // Same or newer version, we're running with the same autoupdater.exe if (Arguments != null && Arguments.Length == 0) { Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe"); } else { Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe", String.Join(" ", Arguments)); } if (praApplication != null) { praApplication.Shutdown(); } //System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe"); System.Windows.Forms.Application.Exit(); } } }
static PRoConApplication procon_WindowLoaded(bool execute) { Program.m_application = new PRoConApplication(false, Program.m_Args); if (execute == true) { Program.m_application.Execute(); } return Program.m_application; }
public uscServerConnection(PRoConApplication paProcon, PRoConClient prcConnection, frmMain frmParent, frmManageAccounts frmAccounts) { //public uscServerConnection(PRoConApplication paProcon, ProConClient prcConnection, frmMain frmParent, frmManageAccounts frmAccounts, uscServerPlayerTreeview uscServerPlayerTree, string strHost, UInt16 iu16Port, string strUsername, string strPassword) { InitializeComponent(); this.m_praApplication = paProcon; this.m_prcConnection = prcConnection; this.m_prcConnection.GameTypeDiscovered += new PRoConClient.EmptyParamterHandler(m_prcConnection_GameTypeDiscovered); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); this.m_cpPrivileges = new CPrivileges(CPrivileges.FullPrivilegesFlags); this.m_frmParent = frmParent; this.m_frmAccounts = frmAccounts; this.tbcClientTabs.ImageList = this.m_frmParent.iglIcons; this.uscLogin.BackgroundHostPort = prcConnection.HostNamePort; if (prcConnection.State != ConnectionState.Connected) { this.uscLogin.Dock = DockStyle.Fill; this.uscLogin.Show(); } else { this.uscLogin.Hide(); } this.uscLists.OnTabChange += new OnTabChangeDelegate(uscLists_OnTabChange); this.tabPlayerList.ImageKey = "mouse.png"; this.tabLists.ImageKey = "table.png"; this.tabChat.ImageKey = "comments.png"; this.tabEvents.ImageKey = "flag_blue.png"; this.tabMapView.ImageKey = "map-pin.png"; this.tabServerSettings.ImageKey = "server_edit.png"; this.tabPlugins.ImageKey = "plugin.png"; this.tabAccounts.ImageKey = "vcard.png"; this.tabConsole.ImageKey = "application_xp_terminal.png"; #region Map Controls this.SettingLoading = this.m_frmParent.picAjaxStyleLoading.Image; this.SettingSuccess = this.m_frmParent.picAjaxStyleSuccess.Image; this.SettingFail = this.m_frmParent.picAjaxStyleFail.Image; this.btnRestartRound.Image = this.m_frmParent.iglIcons.Images["arrow-retweet.png"]; this.btnNextRound.Image = this.m_frmParent.iglIcons.Images["arrow-step-over.png"]; this.AsyncSettingControls.Add("admin.runNextRound", new AsyncStyleSetting(this.picNextRound, null, new Control[] { this.btnNextRound }, true)); this.AsyncSettingControls.Add("admin.restartRound", new AsyncStyleSetting(this.picRestartRound, null, new Control[] { this.btnRestartRound }, true)); #endregion this.uscPlugins.GetPluginDetails += new uscPluginPanel.GetPluginDetailsDelegate(uscPlugins_GetPluginDetails); this.uscPlugins.SetPluginVariable += new uscPluginPanel.SetPluginVariableDelegate(uscPlugins_SetPluginVariable); this.uscPlugins.PluginEnabled += new uscPluginPanel.PluginEnabledDelegate(uscPlugins_PluginEnabled); this.uscPlugins.PluginLoaded += new uscPluginPanel.PluginEventDelegate(uscPlugins_PluginLoaded); this.uscPlugins.PluginVariablesAltered += new uscPluginPanel.PluginEventDelegate(uscPlugins_PluginVariablesAltered); this.uscPlugins.ReloadPlugins += new uscPluginPanel.EventDelegate(uscPlugins_ReloadPlugins); this.uscPlugins.OnTabChange += new OnTabChangeDelegate(uscPlugins_OnTabChange); this.uscAccounts.ManageAccountsRequest += new uscAccountsPanel.ManageAccountsRequestDelegate(uscAccounts_ManageAccountsRequest); this.uscServerConsole.SendCommand += new uscConsolePanel.SendCommandDelegate(uscServerConsole_SendCommand); this.uscServerConsole.SendListCommand += new uscConsolePanel.SendListCommandDelegate(uscServerConsole_SendListCommand); this.uscServerConsole.OnTabChange += new OnTabChangeDelegate(uscServerConsole_OnTabChange); this.m_tabParentLayerControl = new TabPage("Parent Layer Control"); this.m_tabParentLayerControl.Name = "tabLayerControl"; this.m_tabParentLayerControl.Padding = new Padding(8); this.m_tabParentLayerControl.UseVisualStyleBackColor = true; this.m_uscParentLayerControl = new uscParentLayerControl(); this.m_uscParentLayerControl.Dock = DockStyle.Fill; this.m_uscParentLayerControl.BackColor = Color.Transparent; //this.m_uscParentLayerControl.SendCommand += new uscParentLayerControl.SendCommandDelegate(m_uscParentLayerControl_SendCommand); this.m_uscParentLayerControl.Initialize(this.m_frmParent, this); this.m_tabParentLayerControl.Controls.Add(m_uscParentLayerControl); this.m_uscParentLayerControl.OnTabChange += new OnTabChangeDelegate(m_uscParentLayerControl_OnTabChange); this.uscPlugins.Initialize(this.m_frmParent, this); this.uscPlugins.SetConnection(this.m_prcConnection); this.uscLogin.Initalize(this.m_frmParent, this); this.uscLogin.SetConnection(this.m_prcConnection); this.uscLogin.SetLocalization(this.m_prcConnection.Language); this.uscMap.SetConnection(this.m_prcConnection); this.uscEvents.SetConnection(this.m_prcConnection); this.uscLists.SetConnection(this.m_prcConnection); this.uscSettings.SetConnection(this.m_prcConnection); this.uscServerConsole.SetConnection(this.m_prcConnection); this.uscChat.SetConnection(this.m_prcConnection); this.uscPlayers.SetConnection(this.m_prcConnection); this.m_uscParentLayerControl.SetConnection(this.m_prcConnection); this.uscAccounts.SetConnection(this.m_praApplication, this.m_prcConnection); }
public PRoConClient(PRoConApplication praApplication, string hostName, ushort port, string username, string password) { this.HostName = hostName; this.Port = port; this.Password = password; this.m_strUsername = username; //this.m_uscParent = frmParent; this.Parent = praApplication; this.m_strProconEventsUid = String.Empty; m_dicForwardedPackets = new Dictionary<UInt32, SOriginalForwardedPacket>(); this.Tasks = new List<Task>(); this.VersionNumber = String.Empty; this.Layer = new PRoConLayer(); this.m_dicUsernamesToUids = new Dictionary<string, string>() { { "SYSOP", "" } }; this.InstigatingAccountName = String.Empty; this.m_tsPluginMaxRuntime = new TimeSpan(0, this.Parent.OptionsSettings.PluginMaxRuntime_m, this.Parent.OptionsSettings.PluginMaxRuntime_s); }
static void Main(string[] args) { Program.Args = args; bool dotNetCheck = CheckNetVersion("3.5"); if (PRoConApplication.IsProcessOpen() == false && dotNetCheck == true) { if (Directory.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updates")) == true) { AutoUpdater.Arguments = args; AutoUpdater.BeginUpdateProcess(null); } else { try { bool isBasicConsole = false; bool isGspUpdater = false; if (args != null && args.Length >= 2) { for (int i = 0; i < args.Length; i = i + 2) { int value; if (String.Compare("-console", args[i], System.StringComparison.OrdinalIgnoreCase) == 0 && int.TryParse(args[i + 1], out value) == true && value == 1) { isBasicConsole = true; } if (String.Compare("-gspupdater", args[i], System.StringComparison.OrdinalIgnoreCase) == 0 && int.TryParse(args[i + 1], out value) == true && value == 1) { isGspUpdater = true; } if (String.Compare("-use_core", args[i], System.StringComparison.OrdinalIgnoreCase) == 0 && int.TryParse(args[i + 1], out value) == true && value > 0) { System.Diagnostics.Process.GetCurrentProcess().ProcessorAffinity = (System.IntPtr)value; } } } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (isGspUpdater == true) { Application.Run(new GspUpdater()); } else { if (isBasicConsole == true) { BasicConsole basicWindow = new BasicConsole(); basicWindow.WindowLoaded += new BasicConsole.WindowLoadedHandler(procon_WindowLoaded); Application.Run(basicWindow); } else { frmMain mainWindow = new frmMain(args); mainWindow.WindowLoaded += new frmMain.WindowLoadedHandler(procon_WindowLoaded); Application.Run(mainWindow); } } } catch (Exception e) { FrostbiteConnection.LogError("Application error", String.Empty, e); MessageBox.Show("Procon ran into a critical error, but hopefully it logged that error in DEBUG.txt. Please post this to the forums at https://myrcon.net/"); } finally { if (Program.ProconApplication != null) { Program.ProconApplication.Shutdown(); } } } } else { // Possible prevention of a cpu consumption bug I can see at the time of writing. // TCAdmin: Start procon.exe // procon.exe has an update to install // procon.exe loads proconupdater.exe // procon.exe unloads // proconupdater.exe begins update // TCAdmin detects procon.exe shutdown - attempts to reload Thread.Sleep(50); } }
public void SetConnection(PRoConApplication praApplication, PRoConClient prcClient) { if ((this.m_praApplication = praApplication) != null && (this.m_prcClient = prcClient) != null) { //this.m_prcClient.ProconPrivileges += new PRoConClient.ProconPrivilegesHandler(m_prcClient_ProconPrivileges); if (this.m_prcClient.Game != null) { this.m_prcClient_GameTypeDiscovered(prcClient); } else { this.m_prcClient.GameTypeDiscovered += new PRoConClient.EmptyParamterHandler(m_prcClient_GameTypeDiscovered); } } }
public LicenseAgreement(PRoConApplication app, string agreementRevision) { this.m_app = app; this.m_agreementRevision = agreementRevision; InitializeComponent(); this.rtbLicense.ReadOnly = false; this.rtbLicense.Rtf = @"{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033\deflangfe2052{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;} {\*\generator Riched20 6.3.9600}{\*\mmathPr\mdispDef1\mwrapIndent1440 }\viewkind4\uc1 \pard\nowidctlpar\sl276\slmult1\cf1\b\f0\fs22 Procon Frostbite 1.1 and subsequent releases - End User License Agreement\b0\par Revised: April 7, 2015\par \par THIS IS A LEGAL AGREEMENT between 'you', the individual, company, or organisation utilising Procon Frostbite Software (hereinafter Procon Software) and Myrcon, an Adelaide, Australia based company.\par \par USE OF PROCON SOFTWARE INDICATES YOUR ACCEPTANCE OF THESE TERMS.\par As used in this Agreement, the term 'Procon Software' means Procon Frostbite 1.1 and subsequent releases of the software, both client and server, as made available from myrcon.com together with any and all enhancements, upgrades, or updates that may be provided to you through myrcon.com. Including, but not limited to, all files and their content including all data and source code provided through myrcon.com or transmitted by Myrcon or an authorised agent thereof.\par \par \b\fs24 1. APPLICABLE LAW\par \b0\fs22 All terms in this Agreement relating to ownership, distribution, prohibited conduct, or upgrades to Procon Software, will be handled by Myrcon or an authorised agent under the laws of South Australia, Australia.\par \par As such, all terms in this Agreement relating to Procon Software sales, billing, compliance with licensing, including related issues such as piracy or banning of servers, will be handled by Myrcon, or an authorised agent thereof, in accordance with the laws of South Australia, Australia.\par \par \b\fs24 2. OWNERSHIP\par \b0\fs22 Ownership of Procon Software and any accompanying documentation shall at all times remain with Myrcon. This Agreement does not constitute the sale of Procon Software or any accompanying documentation, or any portion thereof. Without limiting the generality of the foregoing, you do not receive any rights to any patents, copyrights, trade secrets, trademarks or other intellectual property rights relating to Procon Software or any accompanying documentation. All rights not expressly granted to you under this Agreement are reserved by Myrcon.\par \par \b\fs24 3. DEFINITIONS\par \fs22 3.1 Procon Client and Server\par \b0 Procon Software consists of both a Procon Client and Procon Server application. The Procon Server is the application which acts as a host and allows two or more client connections to communicate with one another and issue commands over a network to a game server. The Procon Client is the application which connects to the Procon Server and contains end-user functionality which includes initiating a data stream for communication and/or control with another client connection or server.\par \b\par 3.2 Procon Software Development Kit (Procon SDK)\par \b0 Procon software may also consist of a Software Development Kit or SDK. The Procon SDK is a set of development tools and documentation which allows software engineers to create customized or integrated applications typically as part of an existing product or service. The Procon SDK includes API information, sample code, tools, documentation, and other related items.\par \par \b 3.3 Procon Virtual Server\par \b0 A Procon Virtual Server is any instance within the Procon Server application (binary executable) which allows the Procon Client application to connect. A single executed Procon Server application (binary executable) will by default create a single Procon Virtual Server. However, the Procon Server application is capable of creating and hosting multiple Procon Virtual Servers within any single running binary executable, where each server contains its own configuration properties which to the end-user may appear to act as a stand-alone server.\par \par \b 3.4 Procon Server Layer\par \b0 A Procon Server layer (or just 'layer') is utilised when Procon Software initiates a connection with a game server for purposes of communicating and/or controlling the game server. This does not include any client connections that may be made to the Procon Server Layer and not directly to a game server.\par \par \b 3.5 Commercial Entity\par \b0 A commercial entity is an individual, company, or organisation which demonstrates (typically via but not limited to a website) that it is in business to turn a profit of any kind; be it monetary, from direct sales or rental fees, advertising profit, or through the privileged use of intangible goods and services.\par \par \b 3.6 Virtual Machine\par \b0 A Virtual Machine is a virtualised computing resource of a physical machine or machines. Virtual machines are typically hosted on clustered physical machines or cloud environments. Multiple virtual machines can reside on one physical machine but are completely independant of any other virtual machine and the host.\par \par \ul Example of a Commercial Entity\ulnone :\ul\par \ulnone A hosting company or organisation which charges a monthly fee for the use of a server running Procon Software OR a hosting company or organisation which does NOT charge a monthly fee for the use of a server running Procon Software but earns substantial profit from advertising, or from other products or services of any kind.\par \par \ul Example of a Commercial Entity profiting from advertising\ulnone :\ul\par \ulnone An organisation advertising for products or services offered by a hosting company in exchange for the use of a server running Procon Software means the hosting company will be considered to be a commercial entity, even if they choose not to charge anything at all for the use of any of their servers running Procon Software. This situation is commonly referred to as a clan or guild 'sponsorship'.\par \par \ul Example of a Commercial Entity profiting from intangible goods\ulnone :\ul\par \ulnone A 'payment' is made to an individual or hosting company using virtual currency (gold, etc.) within a popular massively multiplayer online game (MMOG) in exchange for the use of a server running Procon Software means the individual or hosting company will be considered to be a commercial entity.\par \par \b 3.6 Non-Profit Entity\par \b0 A non-profit entity is an individual or organisation which does NOT utilise Procon Software for profit of any kind; be it monetary, from direct sales or rental fees, advertising profit, or intangible goods and services.\par \par \ul Example 1\ulnone : A clan or guild hosting a server running Procon Software for their own private use while complying with all terms and conditions set forth in Section 5.1 of this Agreement. \ul\par \ulnone\par \ul Example 2\ulnone : An individual hosting a server running Procon Software for private use while complying with all terms and conditions set forth in Section 5.1 of this Agreement.\ul\par \ulnone\par \b\fs24 4. LICENSE FEES\par \b0\fs22 Based on the definitions above, license fees may be applicable to entities utilizing Procon Software. License fees are NOT applicable to the Procon Client application that do not directly connect to and/or issue commands to a game server. All Commercial Entities using the Procon Software for any reason must pay a license fee, regardless of whether or not they choose to charge fees for the use of their servers. Non-Profit Entities using the Procon Software do not need to pay a license fee; however, these entities must comply with the terms and conditions set forth in the License Types applicable to Non-Profit Entities below. If you are uncertain as to whether you qualify as a Non-Profit Entity you must contact a Myrcon representative via [email protected]\par \par \b\fs24 5. LICENSE TYPES\par \fs22 5.1. Non-Profit License\par \b0 This license type is for an individual or organisation which is non-profit in nature, and does not require registration on our website nor a license key. An individual or organisation operating under this license may install and use Procon Software on one or more physical or virtual machines, alter or adapt files and source code and otherwise utilise Procon Software as the individual or organisation may desire without paying a license fee, provided that the following conditions are met:\par \par \ul a\ulnone . The individual or organisation must be non-profit in nature. Myrcon, and authorised agents thereof, reserve the right to assess and determine if any individual or organisation is non-profit in nature. If you are uncertain as to whether you qualify as a Non-Profit Entity you must contact a Myrcon representative via [email protected]\par \par \ul b\ulnone . Any software, code, application, or other work product that includes any portion of Procon Software as defined by this license, must acknowledge the use of Procon Software. The acknowledgement must be conspicuous and include the following phrase: 'Procon Software by myrcon.com'. The determination of conspicuous placement of the aforementioned phrase will be in the sole discretion of Myrcon and any authorised agent of Myrcon. \ul\par \ulnone\par \ul c\ulnone . Any software, source code, application, or other work product that includes any portion of Procon Software as defined by this license, must include a copy of this license and will be bound by the same terms included herein.\ul\par \ulnone\par \ul d\ulnone . Any software, source code, application, or other work product that includes any portion of Procon Software as defined and bound by this license and is utilised by a commercial entity will be subject to the conditions, duties, and obligations of a Commercial License. (See Section 5.2)\ul\par \ulnone\par \b 5.2. Commercial License for APHPs (Authorised Procon Host Providers)\b0 : \b\par \b0 An Authorised Procon Host Provider License or APHP License is a license requiring recurring monthly fees. APHP Licenses are issued to Commercial Entities (an individual, company, or organisation) which host servers running Procon Software to others for profit of any kind; be it monetary, from direct sales or rental fees, advertising profit, or through the privileged use of intangible goods and services. APHPs are Commercial Entities which typically charge their customers a monthly fee for the use of a Procon Virtual Server or include the Virtual Server as part of other services or offerings to their customers free of charge. Commercial Entities operating under the Authorised Procon Host Provider License may install and use Procon software on one or more physical or virtual machines, and must adhere to the following conditions:\par \par \ul a\ulnone . APHPs must register for an account by emailing a Myrcon representative via [email protected].\par \par \ul b\ulnone . APHPs are subject to recurring, monthly licensing fees based on the average Procon Server Layer count configured on each Virtual Server hosted by the APHP during the previous month (e.g. - if a Virtual Server reports being configured for 50 Layers during 15 out of 30 days of the previous month, the Virtual Server will be billed at 25 Layers). These licensing fees are completely indifferent to whether or not an APHP's customer, client, or user makes use of their Procon Server Layer in any way.\ul\par \ulnone\par \ul c\ulnone . APHPs are billed monthly, in arrears, by digital invoice delivered via myrcon.harvestapp.com. All invoices are typically sent on the 1st or 2nd day of every month via email and are also posted to the APHP's client dashboard account which is linked to via each electronic invoice.\ul\par \ulnone\par \ul d\ulnone . Payments are due 15 days after any invoice is generated (NET 15). Payment must be made through the APHPs myrcon.harvestapp.com client dashboard or via paypal.com to [email protected]. It is the APHP's responsibility to ensure that their invoice is received; whether by the primary email address registered to the APHP's online account or by a representative of the APHP ensuring that the APHP's online account is logged into or checked each month for new invoices.\ul\par \ulnone\par \ul e\ulnone . APHPs who become 30 or more days past due on their invoice may have their Procon Software License suspended for non payment.\ul\par \ulnone\par \ul f\ulnone . APHPs who consistently fail to pay their invoices on time are subject to having their account or license suspended or revoked.\ul\par \ulnone\par \ul g\ulnone . All license fees are listed in United States Dollars. All invoices for license fee\rquote s will be calculated in (USD) and payments should be made through the APHPs myrcon.harvestapp.com client dashboard or paypal in (USD).\ul\par \ulnone\par h. New APHPs acknowledge that Myrcon requires a onetime \ldblquote Processing Fee\rdblquote of $10.00, paid in advance, for the creation of a new APHP account with myrcon.com. Payment of this fee is consideration and acknowledgment of the receipt, review, and acceptance of all terms and conditions set forth in this License Agreement.\par \par \ul i\ulnone . New APHPs acknowledge that there will be a minimum license fee of $10.00, per month, and includes ten (10) Procon layers, per month. \ul\par \ulnone\par \ul j\ulnone . License Fees are subject to bulk discounts. \ul\par \ulnone Tier 1. The first 200 Procon layers used by a APHP are $1.00 each, per month.\par Tier 2. The next additional 200 Procon layers used by an APHP are $.80 each, per month.\par Tier 3. The next additional 100 Procon layers used by an APHP are $.60 each, per month.\par Tier 4. Procon layers over 500 used by an APHP are $.50 each, per month.\par For example, an APHP that has hosted an average of (210) layers per month would be subject to a ($208) licensing fee; or an average of (600) layers would be subject to a ($470).\par \par \ul k\ulnone . License Fees are subject to change at any time. However, all current, APHPs will be notified at least one full billing period before they are subject to any change in the license fee. Please check the latest EULA for current licensing fees.\ul\par \ulnone\par \ul l\ulnone . APHPs acknowledge that invoices may occasionally reflect inaccurate data due to incorrectly configured layer counts on licensed Virtual Servers (e.g. - test servers accidentally created with high layer counts, or duplicate data reported back to myrcon.com during data center migrations, etc.). As such, invoices are subject to review by Myrcon and their authorised agents at [email protected]. Every effort will be made by Myrcon to determine the best course of action when correcting or modifying an invoice.\ul\par \ulnone\par \ul m\ulnone . APHPs acknowledge that layer count data for each Virtual Server hosted by the APHP is reported daily to Procon 's tracking server located at myrcon.com for the purpose of tracking and billing the APHP accordingly.\ul\par \ulnone\par \ul n\ulnone . APHPs must add command line arguments, or a text file, into their instances of Procon Software upon request to facilitate tracking and identification of APHP license holders.\ul\par \ulnone\par \ul o\ulnone . APHPs may not utilise firewalls or any other tools to prevent communication from their licensed Virtual Servers to Procon 's tracking server located at myrcon.com. All outbound traffic, both TCP and UDP, must be made available to the tracking server AND the organisation must ensure that DNS is functioning properly and is able to resolve the hostname myrcon.com at all times on all physical or virtual machines where Procon Virtual Servers are being hosted.\ul\par \ulnone\par \ul p\ulnone . APHPs may allow resellers to sell their Procon Virtual Servers; however, the APHP must ensure that all of their Virtual Server IPs are licensed at all times. Resellers are not required to register and purchase a separate APHP license for themselves as long as all Virtual Servers sold by the reseller are licensed through the APHP.\ul\par \ulnone\par \ul q\ulnone . APHPs must update all of their Procon Servers within a reasonable time frame following the release of an updated version of Procon Software. All APHPs will be notified of available updates through the email used to register the APHP account. It is the APHPs responsibility to regularly check that email account for such notices and apply updates. Failure to apply updates to Procon Software may result in the suspension of a APHP account and/or license. \ul\par \ulnone\par \b\fs24 6. DISTRIBUTION VIA THE INTERNET\par \b0\fs22 The preferred method of distribution of Procon Software over the Internet is via Procon 's official website at myrcon.com. You may not distribute Procon Software otherwise over the Internet, unless you obtain prior written consent from Myrcon or its authorised agent.\par \par \b\fs24 7. THIRD PARTY DISTRIBUTION PROHIBITED\par \b0\fs22 Distribution of Procon Software by you to third parties (e.g. - publishers, magazines, third party products, etc.) is also hereby expressly prohibited unless you obtain prior written consent from Myrcon or its authorised agent.\par \par \b\fs24 8. TERMINATION\par \b0\fs22 Myrcon reserves the right to terminate your license for Procon Software at any time or for any reason. Your license may also be terminated if you are in breach of any of the terms or conditions set forth in this Agreement. Upon termination, you shall immediately discontinue using Procon Software and destroy all copies and related intellectual property in your possession, custody or control.\par \par \par \b\fs24 9. BILLING/LICENSING\par \b0\fs22 All billing matters for Commercial Entities should be forwarded to [email protected]. Any inquiries relating to licensing must be e-mailed to [email protected].\par \par \b\fs24 10. PRICING\par \b0\fs22 Procon software pricing information for Commercial Entities can be found in the latest version of this EULA on the Myrcon\rquote s website. All prices are listed in United States Dollars (USD).\par \par \b\fs24 11. PROHIBITED CONDUCT\par \b0\fs22 You represent and warrant that you will not violate any of the terms and conditions set forth in this Agreement and that:\par \par \ul a\ulnone . You will not: (I) reverse engineer, decompile, disassemble, derive the source code of, modify, or create derivative works from Procon software; or (II) use, copy, modify, alter, or transfer, electronically or otherwise, Procon Software or any of the accompanying documentation except as expressly permitted in this Agreement; or (III) redistribute, sell, rent, lease, sublicense, or otherwise transfer rights to Procon Software whether in a stand-alone configuration or as incorporated with other software code written by any party except as expressly permitted in this Agreement.\ul\par \ulnone\par \ul b\ulnone . You will not use Procon Software to engage in or allow others to engage in any illegal activity.\ul\par \ulnone\par \ul c\ulnone . You will not engage in use of Procon Software that will interfere with or damage the operation of the services of third parties by overburdening or disabling network resources through automated queries, excessive usage or similar conduct.\ul\par \ulnone\par \ul d\ulnone . You will not use Procon Software to engage in any activity that will violate the rights of third parties, including, without limitation, through the use, public display, public performance, reproduction, distribution, or modification of communications or materials that infringe copyrights, trademarks, publicity rights, privacy rights, other proprietary rights, or rights against defamation of third parties.\ul\par \ulnone\par \ul e\ulnone . You will not transfer Procon Software or utilise Procon Software in combination with third party software authored by you or others to create an integrated software program which you transfer to unrelated third parties unless you obtain prior written consent from MYRCON or an authorised agent of MYRCON.\ul\par \ulnone\b\fs24\par 12. UPGRADES, UPDATES AND ENHANCEMENTS\par \b0\fs22 All upgrades, updates or enhancements of Procon Software shall be deemed to be part of Procon Software and will be subject to this Agreement.\par \par \par \b\fs24 13. LEGENDS AND NOTICES\par \b0\fs22 You agree that you will not remove or alter any trademark, logo, copyright or other proprietary notices, legends, symbols or labels in Procon Software or any accompanying documentation.\par \par \b\fs24 14. TERM AND TERMINATION\par \b0\fs22 This Agreement is effective upon your acceptance as provided herein and will remain in force until terminated. Non-Profit Entities may terminate the licenses granted in this Agreement at any time by destroying Procon Software and any accompanying documentation, together with any and all copies thereof. Commercial Entities may terminate the licenses granted in this Agreement at any time by contacting MYRCON or an authorised agent of MYRCON via [email protected]. The licenses granted in this Agreement will terminate automatically if you breach any of its terms or conditions or any of the terms or conditions of any other agreement between you and MYRCON or an authorised agent of MYRCON.\par \par \b\fs24 15. SOFTWARE SUGGESTIONS\par \b0\fs22 Procon welcomes suggestions for enhancing Procon Software and any accompanying documentation that may result in computer programs, reports, presentations, documents, ideas or inventions relating or useful to Myrcon or Procon Software. You acknowledge that all title, ownership rights, and intellectual property rights concerning such suggestions shall become the exclusive property of Myrcon and may be used for its business purposes in its sole discretion without any payment or accounting to you.\par \par \b\fs24 16. MISCELLANEOUS\par \b0\fs22 This Agreement constitutes the entire agreement between the parties concerning Procon Software, but is subject to change by Myrcon or any authorised agent of Myrcon. If any provision in this Agreement should be held illegal or unenforceable by a court of competent jurisdiction, such provision shall be modified to the extent necessary to render it enforceable without losing its intent, or severed from this Agreement if no such modification is possible, and other provisions of this Agreement shall remain in full force and effect. A waiver by either party of any term or condition of this Agreement or any breach thereof, in any one instance, shall not waive such term or condition or any subsequent breach thereof. Any waiver of any term of this agreement must be in writing.\par \par \b\fs24 17. DISCLAIMER OF WARRANTY\par \b0\fs22 PROCON SOFTWARE IS PROVIDED ON AN 'AS IS' BASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTIES THAT IT IS FREE OF DEFECTS, VIRUS FREE, ABLE TO OPERATE ON AN UNINTERRUPTED BASIS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE AND AGREEMENT. NO USE OF PROCON SOFTWARE IS Authorised HEREUNDER EXCEPT UNDER THIS DISCLAIMER.\par \par \b\fs24 18. LIMITATION OF LIABILITY\par \b0\fs22 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL MYRCON, OR ANY AGENT OF MYRCON, BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR INABILITY TO USE PROCON SOFTWARE, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH THE CLAIM IS BASED. IN ANY CASE, MYRCON, OR ANY AGENT OF , MYRCON, COLLECTIVE LIABILITY UNDER ANY PROVISION OF THIS LICENSE SHALL NOT EXCEED IN THE AGGREGATE THE SUM OF THE FEES (IF ANY) YOU PAID FOR THIS LICENSE.\par \par } "; this.rtbLicense.ReadOnly = true; }
public uscServerConnection(PRoConApplication paProcon, PRoConClient prcConnection, frmMain frmParent, frmManageAccounts frmAccounts) { //public uscServerConnection(PRoConApplication paProcon, ProConClient prcConnection, frmMain frmParent, frmManageAccounts frmAccounts, uscServerPlayerTreeview uscServerPlayerTree, string strHost, UInt16 iu16Port, string strUsername, string strPassword) { InitializeComponent(); this.m_praApplication = paProcon; this.m_prcConnection = prcConnection; this.m_prcConnection.GameTypeDiscovered += new PRoConClient.EmptyParamterHandler(m_prcConnection_GameTypeDiscovered); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); this.m_cpPrivileges = new CPrivileges(CPrivileges.FullPrivilegesFlags); this.m_frmParent = frmParent; this.m_frmAccounts = frmAccounts; this.tbcClientTabs.ImageList = this.m_frmParent.iglIcons; this.uscLogin.BackgroundHostPort = prcConnection.HostNamePort; if (prcConnection.State != ConnectionState.Connected) { this.uscLogin.Dock = DockStyle.Fill; this.uscLogin.Show(); } else { this.uscLogin.Hide(); } this.uscLists.OnTabChange += new OnTabChangeDelegate(uscLists_OnTabChange); this.tabPlayerList.ImageKey = "mouse.png"; this.tabLists.ImageKey = "table.png"; this.tabChat.ImageKey = "comments.png"; this.tabEvents.ImageKey = "flag_blue.png"; this.tabMapView.ImageKey = "map-pin.png"; this.tabServerSettings.ImageKey = "server_edit.png"; this.tabPlugins.ImageKey = "plugin.png"; this.tabAccounts.ImageKey = "vcard.png"; this.tabConsole.ImageKey = "application_xp_terminal.png"; #region Map Controls this.SettingLoading = this.m_frmParent.picAjaxStyleLoading.Image; this.SettingSuccess = this.m_frmParent.picAjaxStyleSuccess.Image; this.SettingFail = this.m_frmParent.picAjaxStyleFail.Image; this.btnRestartRound.Image = this.m_frmParent.iglIcons.Images["arrow-retweet.png"]; this.btnNextRound.Image = this.m_frmParent.iglIcons.Images["arrow-step-over.png"]; this.AsyncSettingControls.Add("admin.runNextRound", new AsyncStyleSetting(this.picNextRound, null, new Control[] { this.btnNextRound }, true)); this.AsyncSettingControls.Add("admin.restartRound", new AsyncStyleSetting(this.picRestartRound, null, new Control[] { this.btnRestartRound }, true)); #endregion this.uscPlugins.GetPluginDetails += new uscPluginPanel.GetPluginDetailsDelegate(uscPlugins_GetPluginDetails); this.uscPlugins.SetPluginVariable += new uscPluginPanel.SetPluginVariableDelegate(uscPlugins_SetPluginVariable); this.uscPlugins.PluginEnabled += new uscPluginPanel.PluginEnabledDelegate(uscPlugins_PluginEnabled); this.uscPlugins.PluginLoaded += new uscPluginPanel.PluginEventDelegate(uscPlugins_PluginLoaded); this.uscPlugins.PluginVariablesAltered += new uscPluginPanel.PluginEventDelegate(uscPlugins_PluginVariablesAltered); this.uscPlugins.ReloadPlugins += new uscPluginPanel.EventDelegate(uscPlugins_ReloadPlugins); this.uscPlugins.OnTabChange += new OnTabChangeDelegate(uscPlugins_OnTabChange); this.uscAccounts.ManageAccountsRequest += new uscAccountsPanel.ManageAccountsRequestDelegate(uscAccounts_ManageAccountsRequest); this.uscServerConsole.SendCommand += new uscConsolePanel.SendCommandDelegate(uscServerConsole_SendCommand); this.uscServerConsole.SendListCommand += new uscConsolePanel.SendListCommandDelegate(uscServerConsole_SendListCommand); this.uscServerConsole.OnTabChange += new OnTabChangeDelegate(uscServerConsole_OnTabChange); this.m_tabParentLayerControl = new TabPage("Parent Layer Control"); this.m_tabParentLayerControl.Name = "tabLayerControl"; this.m_tabParentLayerControl.Padding = new Padding(8); this.m_tabParentLayerControl.UseVisualStyleBackColor = true; this.m_uscParentLayerControl = new uscParentLayerControl(); this.m_uscParentLayerControl.Dock = DockStyle.Fill; this.m_uscParentLayerControl.BackColor = Color.Transparent; //this.m_uscParentLayerControl.SendCommand += new uscParentLayerControl.SendCommandDelegate(m_uscParentLayerControl_SendCommand); this.m_uscParentLayerControl.Initialize(this.m_frmParent, this); this.m_tabParentLayerControl.Controls.Add(m_uscParentLayerControl); this.m_uscParentLayerControl.OnTabChange += new OnTabChangeDelegate(m_uscParentLayerControl_OnTabChange); this.uscPlugins.Initialize(this.m_frmParent, this); this.uscPlugins.SetConnection(this.m_prcConnection); this.uscLogin.Initalize(this.m_frmParent, this); this.uscLogin.SetConnection(this.m_prcConnection); this.uscLogin.SetLocalization(this.m_prcConnection.Language); this.uscMap.SetConnection(this.m_prcConnection); this.uscEvents.SetConnection(this.m_prcConnection); this.uscLists.SetConnection(this.m_prcConnection); this.uscSettings.SetConnection(this.m_prcConnection); this.uscServerConsole.SetConnection(this.m_prcConnection); this.uscChat.SetConnection(this.m_prcConnection); this.uscPlayers.SetConnection(this.m_prcConnection); this.m_uscParentLayerControl.SetConnection(this.m_prcConnection); this.uscAccounts.SetConnection(this.m_praApplication, this.m_prcConnection); }
public LayerClient(ILayerInstance layer, ILayerConnection connection, PRoConApplication application, PRoConClient client) { if (layer == null) throw new ArgumentNullException("layer"); if (connection == null) throw new ArgumentNullException("connection"); if (application == null) throw new ArgumentNullException("application"); if (client == null) throw new ArgumentNullException("client"); this.Layer = layer; this.Application = application; this.Client = client; Privileges = new CPrivileges(); Username = String.Empty; // This is just a default value so we never accidently pass through an empty // String for authentication. We generate a better salt later on. this.Salt = DateTime.Now.ToString("HH:mm:ss ff"); this.IsLoggedIn = false; this.GzipCompression = false; this.ProconEventsUid = String.Empty; if (client.Game != null) { if (client.Game is BFBC2Client) { this.PacketDispatcher = new Bfbc2PacketDispatcher(connection); } else if (client.Game is MoHClient) { this.PacketDispatcher = new MohPacketDispatcher(connection); } else if (client.Game is BF3Client) { this.PacketDispatcher = new Bf3PacketDispatcher(connection); } else if (client.Game is BFHLClient) { this.PacketDispatcher = new BfhlPacketDispatcher(connection); } else if (client.Game is BF4Client) { this.PacketDispatcher = new Bf4PacketDispatcher(connection); } else if (client.Game is MOHWClient) { this.PacketDispatcher = new MohwPacketDispatcher(connection); } this.RequestDelegates = new Dictionary<String, Action<ILayerPacketDispatcher, Packet>>() { { "procon.application.shutdown", this.DispatchProconApplicationShutdownRequest }, { "procon.login.username", this.DispatchProconLoginUsernameRequest }, { "procon.registerUid", this.DispatchProconRegisterUidRequest }, { "procon.version", this.DispatchProconVersionRequest }, { "procon.vars", this.DispatchProconVarsRequest }, { "procon.privileges", this.DispatchProconPrivilegesRequest }, { "procon.compression", this.DispatchProconCompressionRequest }, { "procon.account.listAccounts", this.DispatchProconAccountListAccountsRequest }, { "procon.account.listLoggedIn", this.DispatchProconAccountListLoggedInRequest }, { "procon.account.create", this.DispatchProconAccountCreateRequest }, { "procon.account.delete", this.DispatchProconAccountDeleteRequest }, { "procon.account.setPassword", this.DispatchProconAccountSetPasswordRequest }, { "procon.battlemap.deleteZone", this.DispatchProconBattlemapDeleteZoneRequest }, { "procon.battlemap.createZone", this.DispatchProconBattlemapCreateZoneRequest }, { "procon.battlemap.modifyZoneTags", this.DispatchProconBattlemapModifyZoneTagsRequest }, { "procon.battlemap.modifyZonePoints", this.DispatchProconBattlemapModifyZonePointsRequest }, { "procon.battlemap.listZones", this.DispatchProconBattlemapListZonesRequest }, { "procon.layer.setPrivileges", this.DispatchProconLayerSetPrivilegesRequest }, { "procon.plugin.listLoaded", this.DispatchProconPluginListLoadedRequest }, { "procon.plugin.listEnabled", this.DispatchProconPluginListEnabledRequest }, { "procon.plugin.enable", this.DispatchProconPluginEnableRequest }, { "procon.plugin.setVariable", this.DispatchProconPluginSetVariableRequest }, { "procon.exec", this.DispatchProconExecRequest }, { "procon.admin.say", this.DispatchProconAdminSayRequest }, { "procon.admin.yell", this.DispatchProconAdminYellRequest } ,{ "procon.player.syncPlayTimes", this.DispatchProconPlayerSyncPlayTimesRequest } }; this.RegisterEvents(); } }
/* public static void BeginUpdateProcess() { // Check if the autoupdater needs updating.. if not then we'll forget about it. string strUpdatesFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updates"); if (Directory.Exists(strUpdatesFolder) == true) { int iDeleteChecker = 0; string strCurrentProconUpdaterPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PRoConUpdater.exe"); // Overwrite proconupdater.exe if (File.Exists(Path.Combine(strUpdatesFolder, "PRoConUpdater.exe")) == true) { do { try { File.Copy(Path.Combine(strUpdatesFolder, "PRoConUpdater.exe"), strCurrentProconUpdaterPath, true); File.Delete(Path.Combine(strUpdatesFolder, "PRoConUpdater.exe")); } catch (Exception) { } Thread.Sleep(100); iDeleteChecker++; } while (File.Exists(Path.Combine(strUpdatesFolder, "PRoConUpdater.exe")) == true && iDeleteChecker < 10); } if (File.Exists(strCurrentProconUpdaterPath) == true) { if (AutoUpdater.m_strArgs.Length == 0) { System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe"); } else { System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe", String.Join(" ", AutoUpdater.m_strArgs)); } Application.Exit(); } } } */ public static void BeginUpdateProcess(PRoConApplication praApplication) { // Check if the autoupdater needs updating.. if not then we'll forget about it. string strUpdatesFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updates"); if (Directory.Exists(strUpdatesFolder) == true) { AssemblyName proconUpdaterAssemblyName = null; AssemblyName proconUpdaterUpdatesDirAssemblyName = null; if (File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PRoConUpdater.exe")) == true) { proconUpdaterAssemblyName = AssemblyName.GetAssemblyName(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PRoConUpdater.exe")); } if (File.Exists(Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updates"), "PRoConUpdater.exe")) == true) { proconUpdaterUpdatesDirAssemblyName = AssemblyName.GetAssemblyName(Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Updates"), "PRoConUpdater.exe")); } // If the old updater is.. old =) if ((proconUpdaterAssemblyName == null && proconUpdaterUpdatesDirAssemblyName != null) || (proconUpdaterAssemblyName != null && proconUpdaterUpdatesDirAssemblyName != null && proconUpdaterUpdatesDirAssemblyName.Version.CompareTo(proconUpdaterAssemblyName.Version) > 0)) { //int iDeleteChecker = 0; string strCurrentProconUpdaterPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PRoConUpdater.exe"); // Overwrite proconupdater.exe //do { // //if (iDeleteChecker > 0) { // // MessageBox.Show("Please close the PRoConUpdater to continue the update process.."); // //} // try { // //File.Delete(strCurrentProconUpdaterPath); // } // catch (Exception) { } // Thread.Sleep(100); // iDeleteChecker++; //} while (File.Exists(strCurrentProconUpdaterPath) == true && iDeleteChecker < 5); try { try { File.Copy(Path.Combine(strUpdatesFolder, "PRoConUpdater.exe"), strCurrentProconUpdaterPath, true); File.Delete(Path.Combine(strUpdatesFolder, "PRoConUpdater.exe")); } catch (Exception) { } if (AutoUpdater.m_strArgs != null && AutoUpdater.m_strArgs.Length == 0) { System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe"); } else { System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe", String.Join(" ", AutoUpdater.m_strArgs)); } if (praApplication != null) { praApplication.Shutdown(); } Application.Exit(); } catch (Exception) { } } else { // Same or newer version, we're running with the same autoupdater.exe if (AutoUpdater.m_strArgs != null && AutoUpdater.m_strArgs.Length == 0) { System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe"); } else { System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe", String.Join(" ", AutoUpdater.m_strArgs)); } if (praApplication != null) { praApplication.Shutdown(); } //System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory + "PRoConUpdater.exe"); Application.Exit(); } } }
static void Main(string[] args) { PRoConApplication application = null; if (PRoConApplication.IsProcessOpen() == false) { try { application = new PRoConApplication(true, args); // Note: The license states usage data must be enabled for procon.console.exe support application.OptionsSettings.AllowAnonymousUsageData = true; System.Console.WriteLine("Procon Frostbite for mono"); System.Console.WriteLine("========================="); System.Console.WriteLine("By executing this application you agree to the license available at:"); System.Console.WriteLine("\thttp://myrcon.com/licenses/myrcon.pdf"); System.Console.WriteLine("If you do not agree you must immediately exit this application."); System.Console.WriteLine("================"); System.Console.WriteLine("This is a cut down version of PRoCon.exe to be used by GSPs and PRoCon Hosts."); System.Console.WriteLine("Executing this file is the same as \"PRoCon.exe -console 1\""); System.Console.WriteLine("No output is given. This is as cut down as we're gunno get.."); System.Console.WriteLine("\nExecuting procon..."); application.Execute(); GC.Collect(); System.Console.WriteLine("Running... (Press ctrl-c to shutdown)"); UnixSignal [] signals = new UnixSignal[] { new UnixSignal(Signum.SIGINT), new UnixSignal(Signum.SIGTERM), }; // Wait for a unix signal for (bool exit = false; !exit; ) { try { int id = UnixSignal.WaitAny(signals); if (id >= 0 && id < signals.Length) { if (signals[id].IsSet) exit = true; } } catch (Exception e) { FrostbiteConnection.LogError("PRoCon.Console.exe", "", e); } } } catch (Exception e) { FrostbiteConnection.LogError("PRoCon.Console.exe", "", e); } finally { if (application != null) { application.Shutdown(); } } } else { // Possible prevention of a cpu consumption bug I can see at the time of writing. // TCAdmin: Start procon.exe // procon.exe has an update to install // procon.exe loads proconupdater.exe // procon.exe unloads // proconupdater.exe begins update // TCAdmin detects procon.exe shutdown - attempts to reload System.Console.WriteLine("Already running - shutting down"); Thread.Sleep(50); } }