Example #1
0
 public SystemSettings()
 {
     InitializeComponent();
     SystemConfig = new GetSystemConfig();
     CreateNodes();
     AdjustWindowSize.adjust(this);
     pictureBox1.BringToFront();
     // clientAccessControl1.dgClientAccess.CellClick += dgClientAccessCellClick;
     //SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
     gameSettings1.EnableGameCheckedEvent += EnableGameCheckedEvent;
 }
Example #2
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);
        }