Ejemplo n.º 1
0
        private void btnAddTab_Click(object sender, EventArgs e)
        {
            TypeOfSport sport = null;

            if (fTypeOfSportEdit.New(out sport, Globals.Games))
            {
                TabPage page = new TabPage(sport.Name);
                tcPlayers.TabPages.Add(page);
                framePlayerRating frame = framePlayerRating.CreateControl(sport);
                GameFrames.Add(tcPlayers.TabPages.Count - 1, frame);
                page.Controls.Add(frame);
                frame.Dock = DockStyle.Fill;
                frame.UpdateGrid();
                tcPlayers.SelectedTab = page;
                LocateTabButtons();
            }
        }
Ejemplo n.º 2
0
        public static void ShowPlayersList()
        {
            fPlayersList    form  = new fPlayersList();
            TypeOfSportList games = Globals.Games;

            form.GameFrames.Clear();
#if STANDARD || FEDITION_PLUS || STANDARD_PLUS || FEDITION
//#if FEDITION
            foreach (TypeOfSport sport in games.Values)
            {
                TabPage page = new TabPage(sport.Name);
                form.tcPlayers.TabPages.Add(page);
                framePlayerRating frame = framePlayerRating.CreateControl(sport);
                form.GameFrames.Add(form.tcPlayers.TabPages.Count - 1, frame);
                page.Controls.Add(frame);
                frame.Dock = DockStyle.Fill;
                frame.UpdateGrid();
            }
#endif
            form.RefreshGrids();
            form.LocateTabButtons();
            form.ShowDialog();
        }