Exemple #1
0
        private void CreateNodes()
        {
            TreeNode nodeParent;
            TreeNode nodeChild;

            treeView1.Nodes.Clear();

            CurrentLoginID clid = new CurrentLoginID();

            clid.Get();
            IsUserAccessControl = GetStaffMgmtPermissions.UserAccessPermission(CurrentLoginID.LoginID);
            if (IsUserAccessControl == true)
            {
                nodeParent     = new TreeNode("Client Access Control", 0, 1);
                nodeParent.Tag = clientAccessControl1;
                treeView1.Nodes.Add(nodeParent);
            }

            //North Dakota Settings


            if (SystemConfig.IsND)
            {
                SystemConfig = new GetSystemConfig();
                nodeParent   = new TreeNode("North Dakota Settings", 0, 1);
                ndSettings1.PlayerPinLength = SystemConfig.PinPlayerLen;
                nodeParent.Tag = ndSettings1;
                treeView1.Nodes.Add(nodeParent);
                //ndSettings1.grpBxNDSettings.Enabled = true;
            }
            else
            {
                //ndSettings1.grpBxNDSettings.Enabled = false;
            }

            nodeParent     = new TreeNode("Game Settings", 0, 1);
            nodeParent.Tag = gameSettings1;

            var b3Games = GetAvailableGames.GamesList;

            foreach (var b3GamesInfo in b3Games)
            {
                nodeChild      = nodeParent.Nodes.Add(string.Format(GameSettingsString, b3GamesInfo.DisplayName));
                nodeChild.Name = string.Format(GameSettingsString, b3GamesInfo.DisplayName);
                switch (b3GamesInfo.GameIconName)
                {
                case GameIconNameEnum.CRAZYBOUT:
                    nodeChild.Tag = gameSettingCrazyBout1;
                    break;

                case GameIconNameEnum.JAILBREAK:
                    nodeChild.Tag = gameSettingJailBreak1;
                    break;

                case GameIconNameEnum.MAYAMONEY:
                    nodeChild.Tag = gameSettingMayaMoney1;
                    break;

                case GameIconNameEnum.WILDBALL:
                    nodeChild.Tag = gameSettingWildBall1;
                    break;

                case GameIconNameEnum.SPIRIT76:
                    nodeChild.Tag = gameSettingSpirit761;
                    break;

                case GameIconNameEnum.TIMEBOMB:
                    nodeChild.Tag = gameSettingTimeBomb1;
                    break;
                }
            }

            treeView1.Nodes.Add(nodeParent);

            nodeParent     = new TreeNode("Security Settings", 0, 1);
            nodeParent.Tag = securitySettings1;
            treeView1.Nodes.Add(nodeParent);
        }
Exemple #2
0
        private void ActivatePermission()
        {
            StaffManagementPermisions smgmtp;
            GetStaffMgmtPermissions   gsmgmtp = new GetStaffMgmtPermissions();

            smgmtp = gsmgmtp.GetMgmtStaffPermissions(CurrentUserLoggedIn.id);

            List <Button> MgmtBtnModule = new List <Button>();

            if (smgmtp.MgmtReports == true)
            {
                imgBtn_Reports.Visible = true;
                MgmtBtnModule.Add(imgBtn_Reports);
            }
            else
            {
                imgBtn_Reports.Visible = false;
            }


            if (smgmtp.MgmtSecurity == true)
            {
                imgBtnSecurity.Visible = true;
                MgmtBtnModule.Add(imgBtnSecurity);
            }
            else
            {
                imgBtnSecurity.Visible = false;
            }

            if (smgmtp.MgmtSystemSettings == true)
            {
                imgBtnSettings.Visible = true;
                MgmtBtnModule.Add(imgBtnSettings);
            }
            else
            {
                imgBtnSettings.Visible = false;
            }

            if (smgmtp.MgmtDisputeResolution == true)
            {
                imageButton1.Visible = true;
                MgmtBtnModule.Add(imageButton1);
            }
            else
            {
                imageButton1.Visible = false;
            }

            if (smgmtp.AccountRecovery == true)
            {
                AccountRecoveryButton.Visible = true;
                AccountRecoveryLabel.Visible  = true;
                MgmtBtnModule.Add(AccountRecoveryButton);
            }
            else
            {
                AccountRecoveryButton.Visible = false;
                AccountRecoveryLabel.Visible  = false;
            }

            int count = 0;

            label2.Visible = false; label3.Visible = false; label4.Visible = false; label5.Visible = false;
            foreach (Button btnMainMenu in MgmtBtnModule)
            {
                if (count == 0)
                {
                    btnMainMenu.Location = new Point(163, 122);
                    label5.Text          = btnMainMenu.Tag.ToString();
                    label5.Visible       = true;
                }
                else if (count == 1)
                {
                    btnMainMenu.Location = new Point(439, 122);
                    label2.Text          = btnMainMenu.Tag.ToString();
                    label2.Visible       = true;
                }
                else if (count == 2)
                {
                    btnMainMenu.Location = new Point(710, 122);
                    label3.Text          = btnMainMenu.Tag.ToString();
                    label3.Visible       = true;
                }
                else if (count == 3)
                {
                    btnMainMenu.Location = new Point(163, 295);
                    label4.Text          = btnMainMenu.Tag.ToString();
                    label4.Visible       = true;
                }

                count = count + 1;
            }
        }