Example #1
0
        private int SelectGame()
        {
            //initialize game selection form
            FrmSelect select = new FrmSelect();

            //tell selection form the number of entries and pass it the game data
            select.NumEntries = count;
            select.Games      = games;

            if (select.ShowDialog() == DialogResult.OK)
            {
                //set entry # to the selected game
                int pos = select.Selected;
                if (pos <= 0)
                {
                    MessageBox.Show("No game selected");
                }
                //returns position of selected game
                return(pos);
            }
            //returns 0 to show no game was selected
            return(0);
        }
Example #2
0
        private int SelectGame()
        {
            
            //initialize game selection form
            FrmSelect select = new FrmSelect();
            //tell selection form the number of entries and pass it the game data
            select.NumEntries = count;
            select.Games = games;

            if (select.ShowDialog() == DialogResult.OK)
            {
                //set entry # to the selected game
                int pos = select.Selected;
                if (pos <= 0)
                {
                    MessageBox.Show("No game selected");
                }                
                //returns position of selected game
                return pos;
            }
            //returns 0 to show no game was selected
            return 0;
        }