Example #1
0
        private void AddToolStripMenuItem()
        {
            if (m_parent.Settings.RaffleRunLocation == 2)
            {
                //get the system settings
                string        DisplayText             = (m_parent.Settings.RaffleDrawingSetting == 2) ? "Drawing..." : "Raffle...";
                string        NewItem                 = "Player " + DisplayText; //"Raffle"; //This will be change base on system setting Raffle or Drawing lets use Raffle for now
                ToolStripItem RaffleToolStripMenuItem = new ToolStripMenuItem();
                RaffleToolStripMenuItem.Text   = NewItem;
                RaffleToolStripMenuItem.Click += new EventHandler(RaffleToolStripMenuItem_Click);
                viewToolStripMenuItem.DropDownItems.Add(RaffleToolStripMenuItem);
            }

            //see if we can purge player points (must be internal system)
            if (m_parent.Settings.ThirdPartyPlayerInterfaceID == 0)
            {
                ModuleComm modComm = null;
                m_staffID = 0;

                try
                {
                    modComm   = new ModuleComm();
                    m_staffID = modComm.GetStaffId();
                }
                catch (Exception)
                {
                }

                if (m_staffID != 0)
                {
                    // Get the Purge Points feature permission for Player Center for the staff.
                    GetStaffModuleFeaturesMessage permMsg = new GetStaffModuleFeaturesMessage(m_staffID, (int)EliteModule.PlayerCenter, (int)ModuleFeature.PurgePlayerPoints);

                    try
                    {
                        permMsg.Send();

                        if (permMsg.ModuleFeatureList.Length != 0)
                        {
                            viewToolStripMenuItem.DropDown.Items[2].Visible = true;
                        }
                    }
                    catch (Exception)
                    {
                    }
                }
            }
        }
Example #2
0
        /// <summary>
        /// Gets the current staff's permissions (module & features) from the
        /// server.
        /// </summary>
        private void GetStaffPermissionList()
        {
            // First get all the modules this staff has permission to.
            GetStaffModulesMessage modMsg = new GetStaffModulesMessage(m_currentStaff.Id, 0);

            try
            {
                modMsg.Send();
            }
            catch (Exception e)
            {
                ReformatException(e);
            }

            // Parse which values we retrieved from the server.
            foreach (int moduleId in modMsg.ModuleList)
            {
                m_currentStaff.AddModule((EliteModule)moduleId);
            }

            // Get all the receipt mgmt permissions for the staff.
            GetStaffModuleFeaturesMessage permMsg = new GetStaffModuleFeaturesMessage(m_currentStaff.Id, (int)EliteModule.SecurityCenter, 0);

            try
            {
                permMsg.Send();
            }
            catch (Exception e)
            {
                ReformatException(e);
            }

            // Parse which values we retrieved from the server.
            foreach (int moduleFeatureId in permMsg.ModuleFeatureList)
            {
                m_currentStaff.AddModuleFeature(EliteModule.SecurityCenter, moduleFeatureId);
            }
        }