Ejemplo n.º 1
0
        public void AddPlayer(Player p)
        {
            int n = table.RowCount;
            int r = table.Rows.Add();

            table.Rows[r].Cells[0].Value = (n + 1).ToString();
            table.Rows[r].Cells[1].Value = p.GetNameWithRate(Type);
            table.Rows[r].Tag = p;
            CountTable();
        }
Ejemplo n.º 2
0
        public void AddPlayer(Player p)
        {
            int c = table.ColumnCount;
            int n = table.RowCount;
            int r = table.Rows.Add();

            DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn()
            {
                HeaderText = (n + 1).ToString(),
                Width = 50,
                SortMode = DataGridViewColumnSortMode.Programmatic,
                MaxInputLength = 3,
                ReadOnly = true,
                Name = "colPlayer" + n.ToString()
            };

            table.Columns.Insert(n + playersStartIndex, col);

            table.Rows[r].Cells[0].Value = (n + 1).ToString();
            table.Rows[r].Cells[1].Value = p.GetNameWithRate(Type);
            table.Rows[r].Tag = p;

            table[n + playersStartIndex, n].Style.BackColor = System.Drawing.SystemColors.WindowFrame;
            CountTable();
        }