public ModTeamsTitles(string teamName, string orgName)
        {
            InitializeComponent();

            TeamName = teamName;
            OrgName  = orgName;

            PromotionsEntity promo = pHelper.PopulatePromotionsList().FirstOrDefault(p => p.Name == OrgName);
            TeamsEntity      team  = teHelper.PopulateTeamsList().FirstOrDefault(t => t.TeamName == TeamName);
            BrandsEntity     brand = bHelper.PopulateBrandsList().FirstOrDefault(b => b.ConnOrgName == promo.Name && b.Name == team.BrandName);

            storeHelper.TitlesList = tHelper.PopulateTitlesList().Where(t => t.OwnerOrgName == promo.Name).ToList();

            if (brand == null)
            {
                List <TitlesEntity> titles      = storeHelper.TitlesList.Where(t => t.Specialization != "Singles Championship").ToList();
                List <TitlesEntity> ownedTitles = storeHelper.TitlesList.Where(t => t.Specialization != "Singles Championship" &&
                                                                               !String.IsNullOrWhiteSpace(t.HolderName1) &&
                                                                               !String.IsNullOrWhiteSpace(t.HolderName2) ||
                                                                               !String.IsNullOrWhiteSpace(t.HolderName3) ||
                                                                               !String.IsNullOrWhiteSpace(t.HolderName4)).ToList();

                foreach (TitlesEntity t in titles)
                {
                    lbAllTeamTitles.Items.Add(t.Name);
                }

                foreach (TitlesEntity ot in ownedTitles)
                {
                    if (lbSelTeamTitles.Items.Count < 7)
                    {
                        lbSelTeamTitles.Items.Add(ot.Name);
                    }
                }
            }
            else
            {
                List <TitlesEntity> titles      = storeHelper.TitlesList.Where(t => t.Specialization != "Singles Championship" && t.BrandName == brand.Name).ToList();
                List <TitlesEntity> ownedTitles = storeHelper.TitlesList.Where(t => t.Specialization != "Singles Championship" &&
                                                                               t.BrandName == brand.Name &&
                                                                               !String.IsNullOrWhiteSpace(t.HolderName1) &&
                                                                               !String.IsNullOrWhiteSpace(t.HolderName2) ||
                                                                               !String.IsNullOrWhiteSpace(t.HolderName3) ||
                                                                               !String.IsNullOrWhiteSpace(t.HolderName4)).ToList();

                foreach (TitlesEntity t in titles)
                {
                    lbAllTeamTitles.Items.Add(t.Name);
                }

                foreach (TitlesEntity ot in ownedTitles)
                {
                    lbSelTeamTitles.Items.Add(ot.Name);
                }
            }
        }
Example #2
0
        public ModTeamsAdjMems(string orgName, string teamName)
        {
            InitializeComponent();

            OrgName  = orgName;
            TeamName = teamName;

            PromotionsEntity promo = pHelper.PopulatePromotionsList().FirstOrDefault(p => p.Name == OrgName);
            TeamsEntity      team  = tHelper.PopulateTeamsList().FirstOrDefault(t => t.TeamName == TeamName);

            storeHelper.BrandsList    = bHelper.PopulateBrandsList().Where(b => b.ConnOrgName == promo.Name).ToList();
            storeHelper.WrestlersList = wHelper.PopulateWrestlersList().Where(w => w.CurrentCompanyName == promo.Name).ToList();

            List <WrestlersEntity> teamW  = storeHelper.WrestlersList.Where(w => w.TeamName != "").ToList();
            List <WrestlersEntity> roster = storeHelper.WrestlersList.Except(teamW).ToList();

            foreach (WrestlersEntity w in roster)
            {
                lbRoster.Items.Add(w.Name);
            }


            foreach (WrestlersEntity w in teamW)
            {
                if (w.TeamName == TeamName)
                {
                    lbSelWrestlers.Items.Add(w.Name);
                }
            }

            lbRoster.Enabled       = false;
            lbSelWrestlers.Enabled = false;
            btnSave.Enabled        = false;
        }
Example #3
0
        public void LoadGame(
            out List <Brands> brands,
            out List <Cards> cards,
            out List <Matches> matches,
            out List <Promotions> promotions,
            out List <Teams> teams,
            out List <TitlesMain> titles,
            out List <WrestlersMain> wrestlers
            )
        {
            BrandHelper     bHelper  = new BrandHelper();
            CardHelper      cHelper  = new CardHelper();
            MatchHelper     mHelper  = new MatchHelper();
            PromotionHelper pHelper  = new PromotionHelper();
            TeamHelper      tHelper  = new TeamHelper();
            TitleHelper     tlHelper = new TitleHelper();
            WrestlerHelper  wHelper  = new WrestlerHelper();

            brands     = bHelper.PopulateBrandsList();
            cards      = cHelper.PopulateCardsList();
            matches    = mHelper.PopulateMatchesList();
            promotions = pHelper.PopulatePromotionsList();
            teams      = tHelper.PopulateTeamsList();
            titles     = tlHelper.PopulateTitlesList();
            wrestlers  = wHelper.PopulateWrestlersList();
        }
Example #4
0
        public AddMatch(string cardName, string orgName, string brandName, int matchNum)
        {
            InitializeComponent();

            CardName  = cardName;
            BrandName = brandName;
            OrgName   = orgName;
            MatchNum  = matchNum;

            storeHelper.WrestlersList = wHelper.PopulateWrestlersList().Where(w => w.CurrentCompanyName == OrgName).ToList();
            storeHelper.TeamsList     = tHelper.PopulateTeamsList().Where(t => t.OrgName == OrgName).ToList();
            storeHelper.TitlesList    = tiHelper.PopulateTitlesList().Where(ti => ti.OwnerOrgName == OrgName).ToList();

            thisCard = cHelper.PopulateCardsList().FirstOrDefault(c => c.CardName == CardName);
            storeHelper.MatchesList = mHelper.PopulateMatchesList().Where(m => m.AttachedCardName == thisCard.CardName).ToList();
        }
        public TeamAddWrestlers(string teamName, string coName)
        {
            InitializeComponent();

            TeamName = teamName;
            CoName   = coName;

            storeHelper.WrestlersList = wHelper.PopulateWrestlersList();
            storeHelper.TeamsList     = tHelper.PopulateTeamsList();

            TeamsEntity currTeam = storeHelper.TeamsList.FirstOrDefault(t => t.TeamName == TeamName);

            List <string> teamMemsList = new List <string>();

            teamMemsList.Add(currTeam.MemberName1);
            teamMemsList.Add(currTeam.MemberName2);
            teamMemsList.Add(currTeam.MemberName3);
            teamMemsList.Add(currTeam.MemberName4);

            List <WrestlersEntity> promoWrest = storeHelper.WrestlersList.Where(w => w.CurrentCompanyName == coName).ToList();

            List <string> allNames = new List <string>();

            foreach (WrestlersEntity all in promoWrest)
            {
                allNames.Add(all.Name);
            }

            List <string> withoutMems = allNames.Except(teamMemsList).ToList();

            foreach (string a in withoutMems)
            {
                lbRoster.Items.Add(a);
            }

            foreach (string team in teamMemsList)
            {
                if (string.IsNullOrWhiteSpace(team))
                {
                }
                else
                {
                    lbSelected.Items.Add(team);
                }
            }
        }
Example #6
0
        public ModTeams(string orgName)
        {
            InitializeComponent();

            OrgName = orgName;

            PromotionsEntity promo = pHelper.PopulatePromotionsList().FirstOrDefault(p => p.Name == OrgName);

            storeHelper.BrandsList = bHelper.PopulateBrandsList().Where(b => b.ConnOrgName == promo.Name).ToList();
            storeHelper.TeamsList  = tHelper.PopulateTeamsList().Where(t => t.OrgName == promo.Name).ToList();

            foreach (TeamsEntity t in storeHelper.TeamsList)
            {
                cbxTeams.Items.Add(t.TeamName);
            }

            foreach (BrandsEntity b in storeHelper.BrandsList)
            {
                cbxAsscBrand.Items.Add(b.Name);
            }
        }
Example #7
0
        public AddTeam()
        {
            InitializeComponent();

            wrests = wHelper.PopulateWrestlersList();

            if (wrests.Count == 0)
            {
                button4.Enabled        = false;
                btnEditTeam.Enabled    = false;
                btnCreateWrest.Enabled = false;
                tbNewName.Enabled      = false;
                tbWins.Enabled         = false;
                tbLosses.Enabled       = false;
                tbDraws.Enabled        = false;
                rbIsCo.Enabled         = false;
                rbIsTitle.Enabled      = false;
            }

            teams = tHelper.PopulateTeamsList();
        }
Example #8
0
        public AddTeam()
        {
            InitializeComponent();

            storeHelper.TeamsList      = tHelper.PopulateTeamsList();
            storeHelper.PromotionsList = pHelper.PopulatePromotionsList();
            storeHelper.TitlesList     = tlHelper.PopulateTitlesList();
            storeHelper.WrestlersList  = wHelper.PopulateWrestlersList();

            isEdit = false;

            foreach (TeamsEntity t in storeHelper.TeamsList)
            {
                lbTeamList.Items.Add(t.TeamName);
            }

            foreach (PromotionsEntity p in storeHelper.PromotionsList)
            {
                cbxAsscCo.Items.Add(p.Name);
            }
        }
        public CurrentRankings(string orgName)
        {
            InitializeComponent();

            OrgName = orgName;

            PromotionsEntity promo = pHelper.PopulatePromotionsList().FirstOrDefault(p => p.Name == OrgName);

            storeHelper.BrandsList = bHelper.PopulateBrandsList().Where(b => b.ConnOrgName == promo.Name).ToList();
            storeHelper.TitlesList = tiHelper.PopulateTitlesList().Where(ti => ti.OwnerOrgName == promo.Name).ToList();

            storeHelper.WrestlersList = wHelper.PopulateWrestlersList().Where(w => w.CurrentCompanyName == promo.Name).Distinct().ToList();
            storeHelper.TeamsList     = tHelper.PopulateTeamsList().Where(t => t.OrgName == promo.Name).Distinct().ToList();

            lblCompanyName.Text = promo.Name;

            cbxBrands.Items.Add("");
            foreach (BrandsEntity b in storeHelper.BrandsList)
            {
                cbxBrands.Items.Add(b.Name);
            }
        }
Example #10
0
        public int CurrentID(
            bool isBrands     = false,
            bool isCards      = false,
            bool isMatches    = false,
            bool isPromotions = false,
            bool isTeams      = false,
            bool isTitles     = false,
            bool isWrestlers  = false
            )
        {
            int currentID = 0;

            if (isBrands)
            {
                BrandHelper         bHelper   = new BrandHelper();
                List <BrandsEntity> allBrands = bHelper.PopulateBrandsList();

                currentID = allBrands.Count() + 1;
            }

            if (isCards)
            {
                CardHelper         cHelper  = new CardHelper();
                List <CardsEntity> allCards = cHelper.PopulateCardsList();

                currentID = allCards.Count() + 1;
            }

            if (isMatches)
            {
                MatchHelper          mHelper    = new MatchHelper();
                List <MatchesEntity> allMatches = mHelper.PopulateMatchesList();

                currentID = allMatches.Count() + 1;
            }

            if (isPromotions)
            {
                PromotionHelper         pHelper   = new PromotionHelper();
                List <PromotionsEntity> allPromos = pHelper.PopulatePromotionsList();

                currentID = allPromos.Count() + 1;
            }

            if (isTeams)
            {
                TeamHelper         tHelper  = new TeamHelper();
                List <TeamsEntity> allTeams = tHelper.PopulateTeamsList();

                currentID = allTeams.Count() + 1;
            }

            if (isTitles)
            {
                TitleHelper         tiHelper  = new TitleHelper();
                List <TitlesEntity> allTitles = tiHelper.PopulateTitlesList();

                currentID = allTitles.Count() + 1;
            }

            if (isWrestlers)
            {
                WrestlerHelper         wHelper   = new WrestlerHelper();
                List <WrestlersEntity> allWrests = wHelper.PopulateWrestlersList();

                currentID = allWrests.Count() + 1;
            }

            return(currentID);
        }
Example #11
0
        public NewCard(string orgName, bool isNewCard = true, string cardName = "", int currWrestNum = 0)
        {
            InitializeComponent();

            this.Invalidate();

            OrgName    = orgName;
            CardName   = cardName;
            bIsNewCard = isNewCard;

            if (bIsNewCard)
            {
                storeHelper.WrestlersList  = wHelper.PopulateWrestlersList();
                storeHelper.TeamsList      = tHelper.PopulateTeamsList();
                storeHelper.TitlesList     = tiHelper.PopulateTitlesList();
                storeHelper.PromotionsList = pHelper.PopulatePromotionsList();
                storeHelper.BrandsList     = bHelper.PopulateBrandsList();
                storeHelper.CardsList      = cHelper.PopulateCardsList();

                //This gets the int id of the most recent card (aka- this one)
                int currCard = storeHelper.CardsList.Count();

                PromotionsEntity promo    = storeHelper.PromotionsList.FirstOrDefault(p => p.Name == OrgName);
                CardsEntity      thisCard = storeHelper.CardsList.FirstOrDefault(c => c.ConnOrgName == promo.Name && c.CardID == currCard);

                List <MatchesEntity> cardM = storeHelper.MatchesList.Where(m => m.AttachedCardName == thisCard.CardName).ToList();

                List <BrandsEntity> brands = storeHelper.BrandsList.Where(b => b.ConnOrgName == promo.Name).ToList();

                if (brands.Count == 0)
                {
                    cbxBrandName.Items.Add("");
                    cbxBrandName.SelectedIndex = 0;
                }
                else
                {
                    cbxBrandName.Items.Add("");
                    foreach (BrandsEntity b in brands)
                    {
                        cbxBrandName.Items.Add(b.Name);
                    }

                    cbxBrandName.SelectedIndex = 0;
                }

                button1.Enabled = false;
            }
            else
            {
                storeHelper.CardsList = cHelper.PopulateCardsList();

                //This gets the int id of the most recent card (aka- this one)
                int currCard = storeHelper.CardsList.Count();

                storeHelper.MatchesList    = mHelper.PopulateMatchesList();
                storeHelper.PromotionsList = pHelper.PopulatePromotionsList();
                storeHelper.BrandsList     = bHelper.PopulateBrandsList();

                PromotionsEntity    promo    = storeHelper.PromotionsList.FirstOrDefault(p => p.Name == OrgName);
                List <BrandsEntity> brands   = storeHelper.BrandsList.Where(b => b.ConnOrgName == promo.Name).ToList();
                CardsEntity         thisCard = storeHelper.CardsList.FirstOrDefault(c => c.ConnOrgName == promo.Name && c.CardID == currCard);

                List <MatchesEntity> cardM = storeHelper.MatchesList.Where(m => m.AttachedCardName == thisCard.CardName).ToList();

                if (brands.Count == 0)
                {
                    cbxBrandName.Items.Add("");
                    cbxBrandName.SelectedItem = "";
                }
                else
                {
                    cbxBrandName.Items.Add("");
                    foreach (BrandsEntity b in brands)
                    {
                        cbxBrandName.Items.Add(b.Name);
                    }
                }

                tbCardTitle.Text     = thisCard.CardName;
                tbCardTitle.Enabled  = false;
                cbxLocation.Text     = thisCard.Location;
                cbxLocation.Enabled  = false;
                cbxBrandName.Text    = thisCard.BrandName;
                cbxBrandName.Enabled = false;


                switch (cardM.Count)
                {
                case 1:
                    btnMatch1.Enabled = true;

                    btnMatch1.Text       = ButtonTextOutput(cardM, 0);
                    btnMatch1Clr.Enabled = true;

                    btnMatch2.Enabled = true;
                    break;

                case 2:
                    btnMatch1.Enabled = true;
                    btnMatch2.Enabled = true;
                    btnMatch3.Enabled = true;

                    btnMatch1.Text = ButtonTextOutput(cardM, 0);
                    btnMatch2.Text = ButtonTextOutput(cardM, 1);

                    btnMatch1Clr.Enabled = true;
                    btnMatch2Clr.Enabled = true;
                    break;

                case 3:
                    btnMatch1.Enabled = true;
                    btnMatch2.Enabled = true;
                    btnMatch3.Enabled = true;
                    btnMatch4.Enabled = true;

                    btnMatch1.Text = ButtonTextOutput(cardM, 0);
                    btnMatch2.Text = ButtonTextOutput(cardM, 1);
                    btnMatch3.Text = ButtonTextOutput(cardM, 2);

                    btnMatch1Clr.Enabled = true;
                    btnMatch2Clr.Enabled = true;
                    btnMatch3Clr.Enabled = true;
                    break;

                case 4:
                    btnMatch1.Enabled = true;
                    btnMatch2.Enabled = true;
                    btnMatch3.Enabled = true;
                    btnMatch4.Enabled = true;
                    btnMatch5.Enabled = true;

                    btnMatch1.Text = ButtonTextOutput(cardM, 0);
                    btnMatch2.Text = ButtonTextOutput(cardM, 1);
                    btnMatch3.Text = ButtonTextOutput(cardM, 2);
                    btnMatch4.Text = ButtonTextOutput(cardM, 3);

                    btnMatch1Clr.Enabled = true;
                    btnMatch2Clr.Enabled = true;
                    btnMatch3Clr.Enabled = true;
                    btnMatch4Clr.Enabled = true;
                    break;

                case 5:
                    btnMatch1.Enabled = true;
                    btnMatch2.Enabled = true;
                    btnMatch3.Enabled = true;
                    btnMatch4.Enabled = true;
                    btnMatch5.Enabled = true;
                    btnMatch6.Enabled = true;

                    btnMatch1.Text = ButtonTextOutput(cardM, 0);
                    btnMatch2.Text = ButtonTextOutput(cardM, 1);
                    btnMatch3.Text = ButtonTextOutput(cardM, 2);
                    btnMatch4.Text = ButtonTextOutput(cardM, 3);
                    btnMatch5.Text = ButtonTextOutput(cardM, 4);

                    btnMatch1Clr.Enabled = true;
                    btnMatch2Clr.Enabled = true;
                    btnMatch3Clr.Enabled = true;
                    btnMatch4Clr.Enabled = true;
                    btnMatch5Clr.Enabled = true;
                    break;

                case 6:
                    btnMatch1.Enabled = true;
                    btnMatch2.Enabled = true;
                    btnMatch3.Enabled = true;
                    btnMatch4.Enabled = true;
                    btnMatch5.Enabled = true;
                    btnMatch6.Enabled = true;
                    btnMatch7.Enabled = true;

                    btnMatch1.Text = ButtonTextOutput(cardM, 0);
                    btnMatch2.Text = ButtonTextOutput(cardM, 1);
                    btnMatch3.Text = ButtonTextOutput(cardM, 2);
                    btnMatch4.Text = ButtonTextOutput(cardM, 3);
                    btnMatch5.Text = ButtonTextOutput(cardM, 4);
                    btnMatch6.Text = ButtonTextOutput(cardM, 5);

                    btnMatch1Clr.Enabled = true;
                    btnMatch2Clr.Enabled = true;
                    btnMatch3Clr.Enabled = true;
                    btnMatch4Clr.Enabled = true;
                    btnMatch5Clr.Enabled = true;
                    btnMatch6Clr.Enabled = true;
                    break;

                case 7:
                    btnMatch1.Enabled = true;
                    btnMatch2.Enabled = true;
                    btnMatch3.Enabled = true;
                    btnMatch4.Enabled = true;
                    btnMatch5.Enabled = true;
                    btnMatch6.Enabled = true;
                    btnMatch7.Enabled = true;
                    btnMatch8.Enabled = true;

                    btnMatch1.Text = ButtonTextOutput(cardM, 0);
                    btnMatch2.Text = ButtonTextOutput(cardM, 1);
                    btnMatch3.Text = ButtonTextOutput(cardM, 2);
                    btnMatch4.Text = ButtonTextOutput(cardM, 3);
                    btnMatch5.Text = ButtonTextOutput(cardM, 4);
                    btnMatch6.Text = ButtonTextOutput(cardM, 5);
                    btnMatch7.Text = ButtonTextOutput(cardM, 6);

                    btnMatch1Clr.Enabled = true;
                    btnMatch2Clr.Enabled = true;
                    btnMatch3Clr.Enabled = true;
                    btnMatch4Clr.Enabled = true;
                    btnMatch5Clr.Enabled = true;
                    btnMatch6Clr.Enabled = true;
                    btnMatch7Clr.Enabled = true;
                    break;

                case 8:
                    btnMatch1.Enabled = true;
                    btnMatch2.Enabled = true;
                    btnMatch3.Enabled = true;
                    btnMatch4.Enabled = true;
                    btnMatch5.Enabled = true;
                    btnMatch6.Enabled = true;
                    btnMatch7.Enabled = true;
                    btnMatch8.Enabled = true;
                    btnMatch9.Enabled = true;

                    btnMatch1.Text = ButtonTextOutput(cardM, 0);
                    btnMatch2.Text = ButtonTextOutput(cardM, 1);
                    btnMatch3.Text = ButtonTextOutput(cardM, 2);
                    btnMatch4.Text = ButtonTextOutput(cardM, 3);
                    btnMatch5.Text = ButtonTextOutput(cardM, 4);
                    btnMatch6.Text = ButtonTextOutput(cardM, 5);
                    btnMatch7.Text = ButtonTextOutput(cardM, 6);
                    btnMatch8.Text = ButtonTextOutput(cardM, 7);

                    btnMatch1Clr.Enabled = true;
                    btnMatch2Clr.Enabled = true;
                    btnMatch3Clr.Enabled = true;
                    btnMatch4Clr.Enabled = true;
                    btnMatch5Clr.Enabled = true;
                    btnMatch6Clr.Enabled = true;
                    btnMatch7Clr.Enabled = true;
                    btnMatch8Clr.Enabled = true;
                    break;

                case 9:
                    btnMatch1.Enabled  = true;
                    btnMatch2.Enabled  = true;
                    btnMatch3.Enabled  = true;
                    btnMatch4.Enabled  = true;
                    btnMatch5.Enabled  = true;
                    btnMatch6.Enabled  = true;
                    btnMatch7.Enabled  = true;
                    btnMatch8.Enabled  = true;
                    btnMatch9.Enabled  = true;
                    btnMatch10.Enabled = true;

                    btnMatch1.Text = ButtonTextOutput(cardM, 0);
                    btnMatch2.Text = ButtonTextOutput(cardM, 1);
                    btnMatch3.Text = ButtonTextOutput(cardM, 2);
                    btnMatch4.Text = ButtonTextOutput(cardM, 3);
                    btnMatch5.Text = ButtonTextOutput(cardM, 4);
                    btnMatch6.Text = ButtonTextOutput(cardM, 5);
                    btnMatch7.Text = ButtonTextOutput(cardM, 6);
                    btnMatch8.Text = ButtonTextOutput(cardM, 7);
                    btnMatch9.Text = ButtonTextOutput(cardM, 8);

                    btnMatch1Clr.Enabled = true;
                    btnMatch2Clr.Enabled = true;
                    btnMatch3Clr.Enabled = true;
                    btnMatch4Clr.Enabled = true;
                    btnMatch5Clr.Enabled = true;
                    btnMatch6Clr.Enabled = true;
                    btnMatch7Clr.Enabled = true;
                    btnMatch8Clr.Enabled = true;
                    btnMatch9Clr.Enabled = true;
                    break;

                case 10:
                    btnMatch1.Enabled  = true;
                    btnMatch2.Enabled  = true;
                    btnMatch3.Enabled  = true;
                    btnMatch4.Enabled  = true;
                    btnMatch5.Enabled  = true;
                    btnMatch6.Enabled  = true;
                    btnMatch7.Enabled  = true;
                    btnMatch8.Enabled  = true;
                    btnMatch9.Enabled  = true;
                    btnMatch10.Enabled = true;
                    btnMatch11.Enabled = true;

                    btnMatch1.Text  = ButtonTextOutput(cardM, 0);
                    btnMatch2.Text  = ButtonTextOutput(cardM, 1);
                    btnMatch3.Text  = ButtonTextOutput(cardM, 2);
                    btnMatch4.Text  = ButtonTextOutput(cardM, 3);
                    btnMatch5.Text  = ButtonTextOutput(cardM, 4);
                    btnMatch6.Text  = ButtonTextOutput(cardM, 5);
                    btnMatch7.Text  = ButtonTextOutput(cardM, 6);
                    btnMatch8.Text  = ButtonTextOutput(cardM, 7);
                    btnMatch9.Text  = ButtonTextOutput(cardM, 8);
                    btnMatch10.Text = ButtonTextOutput(cardM, 9);

                    btnMatch1Clr.Enabled  = true;
                    btnMatch2Clr.Enabled  = true;
                    btnMatch3Clr.Enabled  = true;
                    btnMatch4Clr.Enabled  = true;
                    btnMatch5Clr.Enabled  = true;
                    btnMatch6Clr.Enabled  = true;
                    btnMatch7Clr.Enabled  = true;
                    btnMatch8Clr.Enabled  = true;
                    btnMatch9Clr.Enabled  = true;
                    btnMatch10Clr.Enabled = true;
                    break;

                case 11:
                    btnMatch1.Enabled     = true;
                    btnMatch2.Enabled     = true;
                    btnMatch3.Enabled     = true;
                    btnMatch4.Enabled     = true;
                    btnMatch5.Enabled     = true;
                    btnMatch6.Enabled     = true;
                    btnMatch7.Enabled     = true;
                    btnMatch8.Enabled     = true;
                    btnMatch9.Enabled     = true;
                    btnMatch10.Enabled    = true;
                    btnMatch11.Enabled    = true;
                    btnMatch12.Enabled    = true;
                    btnMatch12Clr.Enabled = true;

                    btnMatch1.Text  = ButtonTextOutput(cardM, 0);
                    btnMatch2.Text  = ButtonTextOutput(cardM, 1);
                    btnMatch3.Text  = ButtonTextOutput(cardM, 2);
                    btnMatch4.Text  = ButtonTextOutput(cardM, 3);
                    btnMatch5.Text  = ButtonTextOutput(cardM, 4);
                    btnMatch6.Text  = ButtonTextOutput(cardM, 5);
                    btnMatch7.Text  = ButtonTextOutput(cardM, 6);
                    btnMatch8.Text  = ButtonTextOutput(cardM, 7);
                    btnMatch9.Text  = ButtonTextOutput(cardM, 8);
                    btnMatch10.Text = ButtonTextOutput(cardM, 9);
                    btnMatch11.Text = ButtonTextOutput(cardM, 10);

                    btnMatch1Clr.Enabled  = true;
                    btnMatch2Clr.Enabled  = true;
                    btnMatch3Clr.Enabled  = true;
                    btnMatch4Clr.Enabled  = true;
                    btnMatch5Clr.Enabled  = true;
                    btnMatch6Clr.Enabled  = true;
                    btnMatch7Clr.Enabled  = true;
                    btnMatch8Clr.Enabled  = true;
                    btnMatch9Clr.Enabled  = true;
                    btnMatch10Clr.Enabled = true;
                    btnMatch11Clr.Enabled = true;
                    break;

                case 12:
                    btnMatch1.Enabled  = true;
                    btnMatch2.Enabled  = true;
                    btnMatch3.Enabled  = true;
                    btnMatch4.Enabled  = true;
                    btnMatch5.Enabled  = true;
                    btnMatch6.Enabled  = true;
                    btnMatch7.Enabled  = true;
                    btnMatch8.Enabled  = true;
                    btnMatch9.Enabled  = true;
                    btnMatch10.Enabled = true;
                    btnMatch11.Enabled = true;
                    btnMatch12.Enabled = true;

                    btnMatch1.Text  = ButtonTextOutput(cardM, 0);
                    btnMatch2.Text  = ButtonTextOutput(cardM, 1);
                    btnMatch3.Text  = ButtonTextOutput(cardM, 2);
                    btnMatch4.Text  = ButtonTextOutput(cardM, 3);
                    btnMatch5.Text  = ButtonTextOutput(cardM, 4);
                    btnMatch6.Text  = ButtonTextOutput(cardM, 5);
                    btnMatch7.Text  = ButtonTextOutput(cardM, 6);
                    btnMatch8.Text  = ButtonTextOutput(cardM, 7);
                    btnMatch9.Text  = ButtonTextOutput(cardM, 8);
                    btnMatch10.Text = ButtonTextOutput(cardM, 9);
                    btnMatch11.Text = ButtonTextOutput(cardM, 10);
                    btnMatch12.Text = ButtonTextOutput(cardM, 11);

                    btnMatch1Clr.Enabled  = true;
                    btnMatch2Clr.Enabled  = true;
                    btnMatch3Clr.Enabled  = true;
                    btnMatch4Clr.Enabled  = true;
                    btnMatch5Clr.Enabled  = true;
                    btnMatch6Clr.Enabled  = true;
                    btnMatch7Clr.Enabled  = true;
                    btnMatch8Clr.Enabled  = true;
                    btnMatch9Clr.Enabled  = true;
                    btnMatch10Clr.Enabled = true;
                    btnMatch11Clr.Enabled = true;
                    btnMatch12Clr.Enabled = true;
                    break;

                default:
                    btnMatch1.Enabled  = true;
                    btnMatch2.Enabled  = false;
                    btnMatch3.Enabled  = false;
                    btnMatch4.Enabled  = false;
                    btnMatch5.Enabled  = false;
                    btnMatch6.Enabled  = false;
                    btnMatch7.Enabled  = false;
                    btnMatch8.Enabled  = false;
                    btnMatch9.Enabled  = false;
                    btnMatch10.Enabled = false;
                    btnMatch11.Enabled = false;
                    btnMatch12.Enabled = false;

                    btnMatch1Clr.Enabled  = false;
                    btnMatch2Clr.Enabled  = false;
                    btnMatch3Clr.Enabled  = false;
                    btnMatch4Clr.Enabled  = false;
                    btnMatch5Clr.Enabled  = false;
                    btnMatch6Clr.Enabled  = false;
                    btnMatch7Clr.Enabled  = false;
                    btnMatch8Clr.Enabled  = false;
                    btnMatch9Clr.Enabled  = false;
                    btnMatch10Clr.Enabled = false;
                    btnMatch11Clr.Enabled = false;
                    btnMatch12Clr.Enabled = false;
                    break;
                }

                button1.Enabled = true;
            }
        }