Пример #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            NewCard newCard = new NewCard(OrgName, false, CardName);

            newCard.Show();
            this.Hide();
        }
Пример #2
0
        private void btnMatch12Clr_Click(object sender, EventArgs e)
        {
            DELETEObsoleteMuleMatch(11);
            ResetAllMatches(storeHelper.MatchesList);

            NewCard thisForm = new NewCard(OrgName, false, CardName);

            thisForm.Invalidate();
            btnMatch12.Text = "Match 12";
        }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            IDSetterHelper idHelper = new IDSetterHelper();

            int rnds, rndsMins, mMins, mFalls;

            if (cbxRoundsCount.SelectedItem == null)
            {
                rnds = 0;
            }
            else
            {
                rnds = Convert.ToInt32(cbxRoundsCount.SelectedItem.ToString());
            }

            if (cbxRndsMinPerRnds.SelectedItem == null)
            {
                rndsMins = 0;
            }
            else
            {
                rndsMins = Convert.ToInt32(cbxRndsMinPerRnds.SelectedItem.ToString().ToString());
            }

            if (cbxFallsCount.SelectedItem == null)
            {
                mFalls = 0;
            }
            else
            {
                mFalls = Convert.ToInt32(cbxFallsCount.SelectedItem.ToString().ToString());
            }

            if (cbxMatchMins.SelectedItem == null)
            {
                mMins = 0;
            }
            else
            {
                mMins = Convert.ToInt32(cbxMatchMins.SelectedItem.ToString().ToString());
            }

            string title;

            if (cbxTitles.SelectedItem == null)
            {
                title = "";
            }
            else
            {
                title = cbxTitles.SelectedItem.ToString();
            }

            string part1 = "";
            string part2 = "";
            string part3 = "";
            string part4 = "";
            string part5 = "";
            string part6 = "";
            string part7 = "";
            string part8 = "";

            /*
             *  Singles Match
             *  Tag Team Match
             *  6-Man Tag Match
             *  8-Man Tag Match
             *  Battle Royal
             */

            if (cbxMatchType.SelectedItem.ToString() == "Singles Match")
            {
                if (cbxPart1.SelectedItem == null)
                {
                    cbxPart1.BackColor = Color.MistyRose;
                }
                else
                {
                    part1 = cbxPart1.SelectedItem.ToString();
                }

                if (cbxPart2.SelectedItem == null)
                {
                    cbxPart2.BackColor = Color.MistyRose;
                }
                else
                {
                    part2 = cbxPart2.SelectedItem.ToString();
                }

                part3 = "";
                part4 = "";
                part5 = "";
                part6 = "";
                part7 = "";
                part8 = "";
            }
            else if (cbxMatchType.SelectedItem.ToString() == "Tag Team Match")
            {
                if (cbxPart1.SelectedItem == null)
                {
                    cbxPart1.BackColor = Color.MistyRose;
                }
                else
                {
                    part1 = cbxPart1.SelectedItem.ToString();
                }

                if (cbxPart3.SelectedItem == null)
                {
                    cbxPart3.BackColor = Color.MistyRose;
                }
                else
                {
                    part3 = cbxPart3.SelectedItem.ToString();
                }

                if (cbxPart2.SelectedItem == null)
                {
                    cbxPart2.BackColor = Color.MistyRose;
                }
                else
                {
                    part2 = cbxPart2.SelectedItem.ToString();
                }

                if (cbxPart4.SelectedItem == null)
                {
                    cbxPart4.BackColor = Color.MistyRose;
                }
                else
                {
                    part4 = cbxPart4.SelectedItem.ToString();
                }

                part5 = "";
                part6 = "";
                part7 = "";
                part8 = "";
            }
            else if (cbxMatchType.SelectedItem.ToString() == "6-Man Tag Match")
            {
                if (cbxPart1.SelectedItem == null)
                {
                    cbxPart1.BackColor = Color.MistyRose;
                }
                else
                {
                    part1 = cbxPart1.SelectedItem.ToString();
                }

                if (cbxPart3.SelectedItem == null)
                {
                    cbxPart3.BackColor = Color.MistyRose;
                }
                else
                {
                    part3 = cbxPart3.SelectedItem.ToString();
                }

                if (cbxPart5.SelectedItem == null)
                {
                    cbxPart5.BackColor = Color.MistyRose;
                }
                else
                {
                    part5 = cbxPart5.SelectedItem.ToString();
                }

                if (cbxPart2.SelectedItem == null)
                {
                    cbxPart2.BackColor = Color.MistyRose;
                }
                else
                {
                    part2 = cbxPart2.SelectedItem.ToString();
                }

                if (cbxPart4.SelectedItem == null)
                {
                    cbxPart4.BackColor = Color.MistyRose;
                }
                else
                {
                    part4 = cbxPart4.SelectedItem.ToString();
                }

                if (cbxPart6.SelectedItem == null)
                {
                    cbxPart6.BackColor = Color.MistyRose;
                }
                else
                {
                    part6 = cbxPart6.SelectedItem.ToString();
                }

                part7 = "";
                part8 = "";
            }
            else if (cbxMatchType.SelectedItem.ToString() == "8-Man Tag Match" ||
                     cbxMatchType.SelectedItem.ToString() == "Battle Royal")
            {
                if (cbxPart1.SelectedItem == null)
                {
                    cbxPart1.BackColor = Color.MistyRose;
                }
                else
                {
                    part1 = cbxPart1.SelectedItem.ToString();
                }

                if (cbxPart3.SelectedItem == null)
                {
                    cbxPart3.BackColor = Color.MistyRose;
                }
                else
                {
                    part3 = cbxPart3.SelectedItem.ToString();
                }

                if (cbxPart5.SelectedItem == null)
                {
                    cbxPart5.BackColor = Color.MistyRose;
                }
                else
                {
                    part5 = cbxPart5.SelectedItem.ToString();
                }

                if (cbxPart7.SelectedItem == null)
                {
                    cbxPart7.BackColor = Color.MistyRose;
                }
                else
                {
                    part7 = cbxPart7.SelectedItem.ToString();
                }


                if (cbxPart2.SelectedItem == null)
                {
                    cbxPart2.BackColor = Color.MistyRose;
                }
                else
                {
                    part2 = cbxPart2.SelectedItem.ToString();
                }

                if (cbxPart4.SelectedItem == null)
                {
                    cbxPart4.BackColor = Color.MistyRose;
                }
                else
                {
                    part4 = cbxPart4.SelectedItem.ToString();
                }

                if (cbxPart6.SelectedItem == null)
                {
                    cbxPart6.BackColor = Color.MistyRose;
                }
                else
                {
                    part6 = cbxPart6.SelectedItem.ToString();
                }

                if (cbxPart8.SelectedItem == null)
                {
                    cbxPart8.BackColor = Color.MistyRose;
                }
                else
                {
                    part8 = cbxPart8.SelectedItem.ToString();
                }
            }

            MatchesEntity newMatch = new MatchesEntity()
            {
                MatchID          = idHelper.CurrentID(false, false, true, false, false, false, false),
                CardMatchNumber  = storeHelper.MatchesList.Count() + 1,
                MatchTitle       = tbMatchTitle.Text,
                AttachedCardName = CardName,
                MatchType        = cbxMatchType.SelectedItem.ToString(),
                MatchRules       = cbxMatchRules.SelectedItem.ToString(),

                NumOfRounds  = rnds,
                MinsPerRound = rndsMins,

                MatchMins  = mMins,
                NumOfFalls = mFalls,

                Title = title,

                Participant1 = part1,
                Participant2 = part2,
                Participant3 = part3,
                Participant4 = part4,
                Participant5 = part5,
                Participant6 = part6,
                Participant7 = part7,
                Participant8 = part8
            };

            mHelper.SaveMatchesList(newMatch);

            NewCard n = new NewCard(OrgName, false, thisCard.CardName);

            n.Show();
            this.Hide();
        }