当前位置: 首页>>代码示例>>C#>>正文


C# CPrivileges类代码示例

本文整理汇总了C#中CPrivileges的典型用法代码示例。如果您正苦于以下问题:C# CPrivileges类的具体用法?C# CPrivileges怎么用?C# CPrivileges使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CPrivileges类属于命名空间,在下文中一共展示了CPrivileges类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetPrivileges

        public void SetPrivileges(CPrivileges cpUpdatedPrivileges) {
            Privileges = cpUpdatedPrivileges;

            if (AccountPrivilegesChanged != null) {
                this.AccountPrivilegesChanged(this);
            }
        }
开发者ID:bensonk,项目名称:Procon-1,代码行数:7,代码来源:AccountPrivilege.cs

示例2: SetPrivileges

        public void SetPrivileges(CPrivileges cpUpdatedPrivileges) {
            this.Privileges = cpUpdatedPrivileges;

            if (this.AccountPrivilegesChanged != null) {
                FrostbiteConnection.RaiseEvent(this.AccountPrivilegesChanged.GetInvocationList(), this);
            }
        }
开发者ID:ratdart,项目名称:Procon-1,代码行数:7,代码来源:AccountPrivilege.cs

示例3: uscPlayerPunishPanel

        public uscPlayerPunishPanel()
        {
            InitializeComponent();

            this.cboTimeMultiplier.SelectedIndex = 0;

            this.m_spPrivileges = new CPrivileges();
            this.m_spPrivileges.PrivilegesFlags = CPrivileges.FullPrivilegesFlags;
        }
开发者ID:eaceaser,项目名称:PRoCon,代码行数:9,代码来源:uscPlayerPunishPanel.cs

示例4: uscPlayerListPanel

        private const int INT_MAX_TEAMS = 5; //0 = neutral, 1, 2, 3, 4..
        
        public uscPlayerListPanel() {
            InitializeComponent();

            this.m_clocLanguage = null;
            this.m_lvwColumnSorter = new PlayerListColumnSorter();
            this.m_frmMain = null;
            this.m_uscConnectionPanel = null;

            this.m_spPrivileges = new CPrivileges();
            this.m_spPrivileges.PrivilegesFlags = CPrivileges.FullPrivilegesFlags;

            this.spltListAdditionalInfo.Panel2Collapsed = true;
            this.spltTwoSplit.Panel2Collapsed = true;
            this.spltFourSplit.Panel2Collapsed = true;
        }
开发者ID:Webs961,项目名称:Procon-1,代码行数:17,代码来源:uscPlayerListPanel.cs

示例5: uscMaplist

        public uscMaplist() {
            InitializeComponent();

            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.DoubleBuffer, true);

            this.AsyncSettingControls.Add("local.playlist.change", new AsyncStyleSetting(this.picMaplistChangePlaylist, this.lsvMaplist, new Control[] { this.pnlMaplistAddMap, this.lsvMaplist }, true));
            this.AsyncSettingControls.Add("local.maplist.change", new AsyncStyleSetting(this.picMaplistAlterMaplist, this.lsvMaplist, new Control[] { this.pnlMaplistAddMap, this.lsvMaplist }, true));

            this.m_blSettingAppendingSingleMap = false;
            this.AsyncSettingControls.Add("local.maplist.append", new AsyncStyleSetting(this.picMaplistAppendMap, this.lsvMaplist, new Control[] { this.lblMaplistPool }, true));
            //this.AsyncSettingControls.Add("local.maplist.setnextlevel", new AsyncStyleSetting(this.picMaplistAppendMap, this.lsvMaplist, new Control[] { this.lblMaplistPool, this.lnkMaplistAddMapToList, this.lnkMaplistSetNextMap }, true));

            this.m_privileges = new CPrivileges(CPrivileges.FullPrivilegesFlags);
        }
开发者ID:NSGod,项目名称:Procon-1,代码行数:16,代码来源:uscMaplist.cs

示例6: m_prcClient_ProconPrivileges

        private void m_prcClient_ProconPrivileges(PRoConClient sender, CPrivileges spPrivs) {
            this.m_spPrivileges = spPrivs;

            this.kbpPunkbusterPunishPanel.Enabled = (!this.m_spPrivileges.CannotPunishPlayers && this.m_spPrivileges.CanIssueLimitedPunkbusterCommands);
            this.kbpPunkbusterPunishPanel.SetPrivileges(this.m_spPrivileges);

            this.kbpBfbcPunishPanel.Enabled = !this.m_spPrivileges.CannotPunishPlayers;
            this.kbpBfbcPunishPanel.SetPrivileges(this.m_spPrivileges);
        }
开发者ID:Webs961,项目名称:Procon-1,代码行数:9,代码来源:uscPlayerListPanel.cs

示例7: sender_ProconPrivileges

 public void sender_ProconPrivileges(PRoConClient sender, CPrivileges spPrivs)
 {
     this.pnlSettingsPanels.Enabled = spPrivs.CanAlterServerSettings;
 }
开发者ID:eaceaser,项目名称:PRoCon,代码行数:4,代码来源:uscServerSettingsPanel.cs

示例8: m_prcClient_ProconPrivileges

        public void m_prcClient_ProconPrivileges(PRoConClient sender, CPrivileges spPrivs) {

            this.m_spPrivileges = spPrivs;

            this.m_dicAsyncSettingControls["local.reservedlist.append"].m_blReEnableControls = this.m_spPrivileges.CanEditReservedSlotsList;
            this.m_dicAsyncSettingControls["local.reservedlist.remove"].m_blReEnableControls = this.m_spPrivileges.CanEditReservedSlotsList;
            if (this.lsvReservedList.SelectedItems.Count > 0) {
                this.btnReservedRemoveSoldier.Enabled = this.m_spPrivileges.CanEditReservedSlotsList;
            } // ELSE It'll already be disabled 
            this.lnkReservedAddSoldierName.Enabled = this.m_spPrivileges.CanEditReservedSlotsList;

            this.m_dicAsyncSettingControls["local.spectatorlist.append"].m_blReEnableControls = this.m_spPrivileges.CanEditReservedSlotsList;
            this.m_dicAsyncSettingControls["local.spectatorlist.remove"].m_blReEnableControls = this.m_spPrivileges.CanEditReservedSlotsList;
            if (this.lsvSpectatorList.SelectedItems.Count > 0)
            {
                this.btnSpectatorRemoveSoldier.Enabled = this.m_spPrivileges.CanEditReservedSlotsList;
            } // ELSE It'll already be disabled 
            this.lnkSpectatorAddSoldierName.Enabled = this.m_spPrivileges.CanEditReservedSlotsList;

            this.m_dicAsyncSettingControls["local.banlist.clearlist"].m_blReEnableControls = this.m_spPrivileges.CanEditBanList;
            this.m_dicAsyncSettingControls["local.banlist.unban"].m_blReEnableControls = this.m_spPrivileges.CanEditBanList;
            this.btnBanlistClearBanlist.Enabled = this.m_spPrivileges.CanEditBanList;

            if (this.lsvBanlist.SelectedItems.Count > 0) {
                this.btnBanlistUnban.Enabled = this.m_spPrivileges.CanEditBanList;
            } // ELSE It'll already be disabled 

            // Manual banning..
            this.rdoBanlistPbGUID.Enabled = this.rdoBanlistPermanent.Enabled = this.m_spPrivileges.CanPermanentlyBanPlayers;

            if (this.rdoBanlistPbGUID.Checked == true && this.rdoBanlistPbGUID.Enabled == false) {
                this.rdoBanlistName.Checked = true;
            }

            if (this.rdoBanlistPermanent.Checked == true && this.rdoBanlistPermanent.Enabled == false) {
                this.rdoBanlistTemporary.Checked = true;
            }

            this.spltBanlistManualBans.Panel2.Enabled = this.m_spPrivileges.CanTemporaryBanPlayers;
        }
开发者ID:NSGod,项目名称:Procon-1,代码行数:40,代码来源:uscListControlPanel.cs

示例9: OnAccountPrivilegesUpdate

 public virtual void OnAccountPrivilegesUpdate(string username, CPrivileges privileges) { }
开发者ID:NSGod,项目名称:Procon-1,代码行数:1,代码来源:PRoConPluginAPI.cs

示例10: OnAccountLogin

 // TO DO: Implement event once available
 public void OnAccountLogin(string strUsername, CPrivileges sprvPrivileges) {
     if (this.IsLoggedIn == true && this.m_blEventsEnabled == true && this.Game != null) {
         this.Game.SendRequest("procon.account.onLogin", strUsername, sprvPrivileges.PrivilegesFlags.ToString());
         //this.send(new Packet(true, false, this.AcquireSequenceNumber, new List<string>() { "procon.account.onLogin", strUsername, sprvPrivileges.PrivilegesFlags.ToString() }));
     }
 }
开发者ID:Gneuh,项目名称:Procon-1,代码行数:7,代码来源:PRoConLayerClient.cs

示例11: InitialSetup

        private void InitialSetup() {
            if (Game != null) {
                IsLoadingSavingConnectionConfig = true;

                AssignEventHandlers();

                // Assume full access until we're told otherwise.
                Layer.Initialize(Parent, this);

                // I may move these events to within Layer, depends on the end of the restructure.
                Layer.LayerOnline += new PRoConLayer.LayerEmptyParameterHandler(Layer_LayerOnline);
                Layer.LayerOffline += new PRoConLayer.LayerEmptyParameterHandler(Layer_LayerOffline);
                Layer.AccountPrivileges.AccountPrivilegeAdded += new AccountPrivilegeDictionary.AccountPrivilegeAlteredHandler(AccountPrivileges_AccountPrivilegeAdded);
                Layer.AccountPrivileges.AccountPrivilegeRemoved += new AccountPrivilegeDictionary.AccountPrivilegeAlteredHandler(AccountPrivileges_AccountPrivilegeRemoved);

                foreach (AccountPrivilege apPriv in Layer.AccountPrivileges) {
                    apPriv.AccountPrivilegesChanged += new AccountPrivilege.AccountPrivilegesChangedHandler(item_AccountPrivilegesChanged);
                }

                Privileges = new CPrivileges(CPrivileges.FullPrivilegesFlags);
                EventsLogging = new EventCaptures(this);
                Console = new ConnectionConsole(this);
                PunkbusterConsole = new PunkbusterConsole(this);
                ChatConsole = new ChatConsole(this);
                PluginConsole = new PluginConsole(this);
                MapGeometry = new MapGeometry(this);
                MapGeometry.MapZones.MapZoneAdded += new MapZoneDictionary.MapZoneAlteredHandler(MapZones_MapZoneAdded);
                MapGeometry.MapZones.MapZoneChanged += new MapZoneDictionary.MapZoneAlteredHandler(MapZones_MapZoneChanged);
                MapGeometry.MapZones.MapZoneRemoved += new MapZoneDictionary.MapZoneAlteredHandler(MapZones_MapZoneRemoved);

                if (CurrentServerInfo == null) {
                    CurrentServerInfo = new CServerInfo();
                }

                ListSettings = new ListsSettings(this);
                ServerSettings = new ServerSettings(this);
                PlayerListSettings = new PlayerListSettings();
                PlayerList = new PlayerDictionary();
                TeamNameList = new List<CTeamName>();
                MapListPool = new NotificationList<CMap>();
                ReservedSlotList = new NotificationList<string>();
                Variables = new VariableDictionary();
                SV_Variables = new VariableDictionary();
                Reasons = new NotificationList<string>();
                FullVanillaBanList = new List<CBanInfo>();
                FullTextChatModerationList = new TextChatModerationDictionary();
                Weapons = new WeaponDictionary();
                Specializations = new SpecializationDictionary();

                if (Regex.Match(HostName, @"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$").Success == true) {
                    Variables.SetVariable("SERVER_COUNTRY", Parent.GetCountryName(HostName));
                    Variables.SetVariable("SERVER_COUNTRY_CODE", Parent.GetCountryCode(HostName));
                }
                else {
                    IPAddress ipServer = FrostbiteConnection.ResolveHostName(HostName);
                    Variables.SetVariable("SERVER_COUNTRY", Parent.GetCountryName(ipServer.ToString()));
                    Variables.SetVariable("SERVER_COUNTRY_CODE", Parent.GetCountryCode(ipServer.ToString()));
                }

                Console.Logging = Parent.OptionsSettings.ConsoleLogging;
                EventsLogging.Logging = Parent.OptionsSettings.EventsLogging;
                ChatConsole.Logging = Parent.OptionsSettings.ChatLogging;
                PluginConsole.Logging = Parent.OptionsSettings.PluginLogging;

                //this.m_blLoadingSavingConnectionConfig = true;

                if (CurrentServerInfo.GameMod == GameMods.None) {
                    ExecuteConnectionConfig(Game.GameType + ".def", 0, null, false);
                }
                else {
                    ExecuteConnectionConfig(Game.GameType + "." + CurrentServerInfo.GameMod + ".def", 0, null, false);
                }

                // load override global_vars.def
                ExecuteGlobalVarsConfig("global_vars.def", 0, null);

                ExecuteConnectionConfig("reasons.cfg", 0, null, false);

                lock (Parent) {
                    if (Username.Length == 0 || Parent.OptionsSettings.LayerHideLocalPlugins == false) {
                        CompilePlugins(Parent.OptionsSettings.PluginPermissions);
                    }
                }

                if (Parent.OptionsSettings.UsePluginOldStyleLoad == true) {
                    ExecuteConnectionConfig(FileHostNamePort + ".cfg", 0, null, false);
                }

                //this.m_blLoadingSavingConnectionConfig = false;

                // this.ManuallyDisconnected = true;

                // this.ConnectionError = false;

                BeginLoginSequence();

                if (Parent.OptionsSettings.UsePluginOldStyleLoad == false) {
                    ExecuteConnectionConfig(FileHostNamePort + ".cfg", 0, null, true);
                }

//.........这里部分代码省略.........
开发者ID:phelom,项目名称:Procon-1,代码行数:101,代码来源:PRoConClient.cs

示例12: m_prcClient_ProconPrivileges

        private void m_prcClient_ProconPrivileges(PRoConClient sender, CPrivileges spPrivs)
        {
            this.m_prcClient.SendProconBattlemapListZonesPacket();
            this.m_prcClient.SendGetProconVarsPacket("ZONE_TAG_LIST");

            if ((this.tsbMapZonesTools.Enabled = spPrivs.CanEditMapZones) == false) {
                this.tsbPointer.Checked = true;
            }
        }
开发者ID:eaceaser,项目名称:PRoCon,代码行数:9,代码来源:uscMapViewer.cs

示例13: uscServerConnection

        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);
        }
开发者ID:ratdart,项目名称:Procon-1,代码行数:100,代码来源:uscServerConnection.cs

示例14: m_prcConnection_ProconPrivileges

        private void m_prcConnection_ProconPrivileges(PRoConClient sender, CPrivileges spPrivs) {
            if (spPrivs.CanIssueLimitedProconPluginCommands == true && this.tbcClientTabs.TabPages.Contains(this.m_tabParentLayerControl) == false) {
                this.tbcClientTabs.TabPages.Add(this.m_tabParentLayerControl);
                this.m_tabParentLayerControl.ImageKey = "sitemap_color.png";

                /*
                this.m_prcConnection.SendCommand(new List<string> { "procon.account.listAccounts" });
                this.m_prcConnection.SendCommand(new List<string> { "procon.account.listLoggedIn" });

                this.m_prcConnection.SendCommand(new List<string> { "procon.plugin.listLoaded" });
                this.m_prcConnection.SendCommand(new List<string> { "procon.plugin.listEnabled" });
                */
            }
            else if (spPrivs.CanIssueLimitedProconCommands == false && this.tbcClientTabs.TabPages.Contains(this.m_tabParentLayerControl) == true) {
                this.tbcClientTabs.TabPages.Remove(this.m_tabParentLayerControl);
            }

            if (this.m_praApplication.OptionsSettings.LayerHideLocalPlugins == true) {
                this.tbcClientTabs.TabPages.Remove(this.tabPlugins);
                // this.tabPlugins.Hide();
            }

            if (this.m_praApplication.OptionsSettings.LayerHideLocalAccounts == true) {
                this.tbcClientTabs.TabPages.Remove(this.tabAccounts);
                // this.tabAccounts.Hide();
            }

            this.pnlMapControls.Visible = spPrivs.CanUseMapFunctions;

            this.m_prcConnection.SendGetProconVarsPacket("TEMP_BAN_CEILING");
            //this.m_prcConnection.SendRequest(new List<string> { "procon.vars", "TEMP_BAN_CEILING" });
        }
开发者ID:ratdart,项目名称:Procon-1,代码行数:32,代码来源:uscServerConnection.cs

示例15: CollectLowestPrivileges

        public CPrivileges CollectLowestPrivileges(string strAccountName) {

            CPrivileges spLowestPrivileges = new CPrivileges();

            if (this.m_paProcon.AccountsList.Contains(strAccountName) == true) {
                spLowestPrivileges.PrivilegesFlags = CPrivileges.FullPrivilegesFlags;

                foreach (PRoConClient prcClient in this.m_paProcon.Connections) {
                    if (prcClient.Layer != null && prcClient.Layer.AccountPrivileges.Contains(strAccountName) == true) {
                        spLowestPrivileges.SetLowestPrivileges(prcClient.Layer.AccountPrivileges[strAccountName].Privileges);
                    }
                }


                //if (this.m_paProcon.AccountsList.Contains(strAccountName) == true) {
                //    foreach (AccountPrivilege apPrivilege in this.m_paProcon.AccountsList[strAccountName].AccountPrivileges) {
                        
                //    }
                //}
            }
            
            return spLowestPrivileges;
        }
开发者ID:ratdart,项目名称:Procon-1,代码行数:23,代码来源:frmManageAccounts.cs


注:本文中的CPrivileges类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。