public int GetPlayerIndexByShirtNo(List <SPlayerInfo> lstPlayer, int iShirtNo)
        {
            int iIndex = -1;

            for (int i = 0; i < lstPlayer.Count; i++)
            {
                SPlayerInfo tmpPlayer = lstPlayer.ElementAt(i);
                if (tmpPlayer.iShirtNumber == iShirtNo)
                {
                    iIndex = i;
                    break;
                }
            }
            return(iIndex);
        }
        private void UpdateUIForActivPlayer(int iTeampos, List <SPlayerInfo> lstActive)
        {
            if (iTeampos == 1)
            {
                btnHActive_1.Text = "";
                btnHActive_2.Text = "";
                btnHActive_3.Text = "";
                btnHActive_4.Text = "";
                btnHActive_5.Text = "";

                for (int i = 0; i < lstActive.Count; i++)
                {
                    SPlayerInfo tmpPlayer    = lstActive.ElementAt(i);
                    int         iShirtNumber = tmpPlayer.iShirtNumber;

                    switch (i)
                    {
                    case 0:
                        btnHActive_1.Text = iShirtNumber.ToString();
                        break;

                    case 1:
                        btnHActive_2.Text = iShirtNumber.ToString();
                        break;

                    case 2:
                        btnHActive_3.Text = iShirtNumber.ToString();
                        break;

                    case 3:
                        btnHActive_4.Text = iShirtNumber.ToString();
                        break;

                    case 4:
                        btnHActive_5.Text = iShirtNumber.ToString();
                        break;

                    default:
                        break;
                    }
                }
            }
            else if (iTeampos == 2)
            {
                btnVActive_1.Text = "";
                btnVActive_2.Text = "";
                btnVActive_3.Text = "";
                btnVActive_4.Text = "";
                btnVActive_5.Text = "";

                for (int i = 0; i < lstActive.Count; i++)
                {
                    SPlayerInfo tmpPlayer    = lstActive.ElementAt(i);
                    int         iShirtNumber = tmpPlayer.iShirtNumber;

                    switch (i)
                    {
                    case 0:
                        btnVActive_1.Text = iShirtNumber.ToString();
                        break;

                    case 1:
                        btnVActive_2.Text = iShirtNumber.ToString();
                        break;

                    case 2:
                        btnVActive_3.Text = iShirtNumber.ToString();
                        break;

                    case 3:
                        btnVActive_4.Text = iShirtNumber.ToString();
                        break;

                    case 4:
                        btnVActive_5.Text = iShirtNumber.ToString();
                        break;

                    default:
                        break;
                    }
                }
            }
        }