• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# CPrivileges类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: uscSetPrivileges_OnUpdatePrivileges

        void uscSetPrivileges_OnUpdatePrivileges(string strAccountName, CPrivileges spUpdatedPrivs) {
            this.ShowPanel(this.pnlEditingUser);

            if (this.m_paProcon.AccountsList.Contains(strAccountName) == true) {

                foreach (PRoConClient prcClient in this.m_paProcon.Connections) {
                    if (prcClient.Layer.AccountPrivileges.Contains(strAccountName) == true) {
                        prcClient.Layer.AccountPrivileges[strAccountName].SetPrivileges(spUpdatedPrivs);
                    }
                }
            }

            //if (this.AccountPrivilegesChanged != null) {
            //    this.AccountPrivilegesChanged(this, new AccountEventArgs(strAccountName, spUpdatedPrivs, ""));
            //}
        }
开发者ID:ratdart,项目名称:Procon-1,代码行数:16,代码来源:frmManageAccounts.cs


示例17: uscPrivileges_OnUpdatePrivileges

        void uscPrivileges_OnUpdatePrivileges(string strAccountName, CPrivileges spUpdatedPrivs) {
            //this.SetLayerAccountPrivileges(strAccountName, spUpdatedPrivs);

            if (this.m_prcClient.Layer.AccountPrivileges.Contains(strAccountName) == true) {
                this.m_prcClient.Layer.AccountPrivileges[strAccountName].SetPrivileges(spUpdatedPrivs);
            }

            this.ShowLayerPanel(this.pnlMainLayerServer);

            this.RefreshLayerPrivilegesPanel();
        }
开发者ID:NSGod,项目名称:Procon-1,代码行数:11,代码来源:uscAccountsPanel.cs


示例18: AccountPrivilege

 public AccountPrivilege(Account accOwner, CPrivileges cpPrivileges) {
     this.Owner = accOwner;
     this.Privileges = cpPrivileges;
 }
开发者ID:ratdart,项目名称:Procon-1,代码行数:4,代码来源:AccountPrivilege.cs


示例19: GetAccountPrivileges

        private CPrivileges GetAccountPrivileges(string strUsername) {

            CPrivileges sprReturn = new CPrivileges();
            sprReturn.PrivilegesFlags = 0;

            if (this.m_prcClient.Layer.AccountPrivileges.Contains(strUsername) == true) {
                sprReturn = this.m_prcClient.Layer.AccountPrivileges[strUsername].Privileges;
                //sprReturn = this.m_praApplication.AccountsList[strUsername].AccountPrivileges[this.m_prcClient.HostNamePort].Privileges;
            }

            if (String.IsNullOrEmpty(strUsername) == true && this.m_prcClient.Variables.IsVariableNullOrEmpty("GUEST_PRIVILEGES") == false) {
                sprReturn.PrivilegesFlags = this.m_prcClient.Variables.GetVariable<UInt32>("GUEST_PRIVILEGES", 0);
            }

            return sprReturn;
        }
开发者ID:Gneuh,项目名称:Procon-1,代码行数:16,代码来源:PRoConLayerClient.cs


示例20: HandleEventPacket

        private bool HandleEventPacket(Packet cpBeforePacketDispatch, bool blCancelPacket) {

            if (cpBeforePacketDispatch.Words.Count >= 1 && String.Compare(cpBeforePacketDispatch.Words[0], "procon.shutdown", true) == 0) {
                //this.SendPacket(new Packet(true, true, cpBeforePacketDispatch.SequenceNumber, new List<string>() { "OK" }));

                this.State = ConnectionState.Error;
                this.Connection_ConnectionFailure(this.Game.Connection, new Exception("The PRoCon layer has been shutdown by the host"));

                this.Shutdown();
                blCancelPacket = true;
            }
            else if (cpBeforePacketDispatch.Words.Count >= 2 && String.Compare(cpBeforePacketDispatch.Words[0], "procon.account.onLogin", true) == 0) {
                //this.SendPacket(new Packet(true, true, cpBeforePacketDispatch.SequenceNumber, new List<string>() { "OK" }));

                // Also able to get their privs as well if needed?
                //this.m_uscParent.OnRemoteAccountLoggedIn(cpBeforePacketDispatch.Words[1], true);

                if (this.RemoteAccountLoggedIn != null) {
                    FrostbiteConnection.RaiseEvent(this.RemoteAccountLoggedIn.GetInvocationList(), this, cpBeforePacketDispatch.Words[1], true);
                }

                blCancelPacket = true;
            }
            else if (cpBeforePacketDispatch.Words.Count >= 2 && String.Compare(cpBeforePacketDispatch.Words[0], "procon.account.onLogout", true) == 0) {
                //this.SendPacket(new Packet(true, true, cpBeforePacketDispatch.SequenceNumber, new List<string>() { "OK" }));

                if (this.RemoteAccountLoggedIn != null) {
                    FrostbiteConnection.RaiseEvent(this.RemoteAccountLoggedIn.GetInvocationList(), this, cpBeforePacketDispatch.Words[1], false);
                }

                blCancelPacket = true;
            }
            else if (cpBeforePacketDispatch.Words.Count >= 3 && String.Compare(cpBeforePacketDispatch.Words[0], "procon.account.onUidRegistered", true) == 0) {

                if (this.m_dicUsernamesToUids.ContainsKey(cpBeforePacketDispatch.Words[2]) == true) {
                    this.m_dicUsernamesToUids[cpBeforePacketDispatch.Words[2]] = cpBeforePacketDispatch.Words[1];
                }
                else {
                    this.m_dicUsernamesToUids.Add(cpBeforePacketDispatch.Words[2], cpBeforePacketDispatch.Words[1]);
                }

                blCancelPacket = true;
            }
            else if (cpBeforePacketDispatch.Words.Count >= 2 && String.Compare(cpBeforePacketDispatch.Words[0], "procon.account.onCreated", true) == 0) {
                //this.SendPacket(new Packet(true, true, cpBeforePacketDispatch.SequenceNumber, new List<string>() { "OK" }));

                if (this.RemoteAccountCreated != null) {
                    FrostbiteConnection.RaiseEvent(this.RemoteAccountCreated.GetInvocationList(), this, cpBeforePacketDispatch.Words[1]);
                }

                blCancelPacket = true;
            }
            else if (cpBeforePacketDispatch.Words.Count >= 2 && String.Compare(cpBeforePacketDispatch.Words[0], "procon.account.onDeleted", true) == 0) {
                //this.SendPacket(new Packet(true, true, cpBeforePacketDispatch.SequenceNumber, new List<string>() { "OK" }));

                if (this.RemoteAccountDeleted != null) {
                    FrostbiteConnection.RaiseEvent(this.RemoteAccountDeleted.GetInvocationList(), this, cpBeforePacketDispatch.Words[1]);
                }

                blCancelPacket = true;
            }
            else if (cpBeforePacketDispatch.Words.Count >= 3 && String.Compare(cpBeforePacketDispatch.Words[0], "procon.account.onAltered", true) == 0) {
                //this.SendPacket(new Packet(true, true, cpBeforePacketDispatch.SequenceNumber, new List<string>() { "OK" }));

                UInt32 ui32Privileges = 0;
                if (UInt32.TryParse(cpBeforePacketDispatch.Words[2], out ui32Privileges) == true) {
                    CPrivileges spPrivs = new CPrivileges();
                    spPrivs.PrivilegesFlags = ui32Privileges;

                    if (this.ProconPrivileges != null && String.Compare(cpBeforePacketDispatch.Words[1], this.Username) == 0) {

                        this.Privileges = spPrivs;

                        FrostbiteConnection.RaiseEvent(this.ProconPrivileges.GetInvocationList(), this, spPrivs);
                    }

                    if (this.RemoteAccountAltered != null) {
                        FrostbiteConnection.RaiseEvent(this.RemoteAccountAltered.GetInvocationList(), this, cpBeforePacketDispatch.Words[1], spPrivs);
                    }

                }

                blCancelPacket = true;
            }

            else if (cpBeforePacketDispatch.Words.Count >= 2 && String.Compare(cpBeforePacketDispatch.Words[0], "procon.packages.onDownloading", true) == 0) {

                if (this.PackageDownloading != null) {
                    FrostbiteConnection.RaiseEvent(this.PackageDownloading.GetInvocationList(), this, cpBeforePacketDispatch.Words[1]);
                }

                blCancelPacket = true;
            }
            else if (cpBeforePacketDispatch.Words.Count >= 2 && String.Compare(cpBeforePacketDispatch.Words[0], "procon.packages.onDownloaded", true) == 0) {

                if (this.PackageDownloaded != null) {
                    FrostbiteConnection.RaiseEvent(this.PackageDownloaded.GetInvocationList(), this, cpBeforePacketDispatch.Words[1]);
                }

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CRSpline类代码示例发布时间:2022-05-24
下一篇:
C# CPos类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap