예제 #1
0
        /******************************************************************
        *               MAIN MENU - EDIT THE SELECTED TEAM                *
        ******************************************************************/
        private void btnEditTeam_Click(object sender, EventArgs e)
        {
            // local variables...
            string teamName;

            // initalise...
            int teamPositionCounter = 0;
            int teamListViewIndex   = 0;

            // if there are any teams pictures to choose from the listview...
            if (this.lstViewTeams.SelectedIndices.Count > 0)
            {
                // get the correct selected index...
                teamListViewIndex = this.lstViewTeams.SelectedIndices[0];
                teamName          = lstViewTeams.SelectedItems[0].ToString();

                teamName = Regex.Replace(teamName, @"ListViewItem: {", "");
                teamName = Regex.Replace(teamName, @"}", "");

                // find team array position within a particular league...
                teamPositionCounter = Operations.teamArrayPosition(teamPositionCounter, teamName);

                // set the selected index to the counter...
                teamSelected = teamPositionCounter;
            }

            frmEditTeam tempEditTeam = new frmEditTeam();

            tempEditTeam.Show();

            frmKeepMainMenu.Hide();
        }
예제 #2
0
        /******************************************************************
        *                       SEARCH - EDIT TEAM                        *
        ******************************************************************/
        private void btnEditTeam_Click(object sender, EventArgs e)
        {
            frmEditTeam tempEditTeam = new frmEditTeam();

            tempEditTeam.Show();
            frmSearch.frmSearchClose.Hide();
        }
예제 #3
0
        public static frmEditTeam frmKeepEditTeam = null; // need reference to call form back

        // MAIN ENTRY POINT...
        public frmEditTeam()
        {
            InitializeComponent();
            frmKeepEditTeam = this;
        }