Untitled
unknown
plain_text
3 years ago
2.1 kB
5
Indexable
public void startScherm() { lblCurrent.TextAlign = ContentAlignment.MiddleRight; tblBingo.Controls.Clear(); tblBingo.ColumnStyles.Clear(); tblBingo.RowStyles.Clear(); if (tblBingo.Width < intMinWidth) tblBingo.Width = intMinWidth; if (tblBingo.Height < intMinHeight) tblBingo.Height = intMinHeight; float sngColumns = System.Convert.ToSingle (100 / (double)intRows); float sngRows = System.Convert.ToSingle (100 / (double)(intRows + 1)); tblBingo.ColumnCount = intRows; tblBingo.RowCount = intRows + 1; for (int idx = 0; idx <= intRows - 1; idx++) tblBingo.ColumnStyles.Add(new ColumnStyle(SizeType .Percent, sngColumns)); for (int idx = 0; idx <= intRows; idx++) tblBingo.RowStyles.Add(new RowStyle(SizeType .Percent, sngRows)); int intTeller = 0; for (int iNum = 0; iNum <= 50; iNum++) { if (varTeam == true) { if (iNum % 2 == 0) { Console.WriteLine(iNum); for (int iCol = 0; iCol <= intRows - 1; iCol++) { Label lbl = lblLabel(); for (int iRow = 1; iRow <= intRows; iRow++) { lbl = lblLabel(); intTeller++; tblBingo.Controls.Add(lbl, iCol, iRow); if (!dicCards.ContainsKey(lbl.Text = (iNum).ToString())) { dicCards.Add(lbl.Text, lbl); } } } btnReset.PerformClick(); } } if (varTeam == false) { if (iNum % 2 != 0) { Console.WriteLine(iNum); for (int iCol = 0; iCol <= intRows - 1; iCol++) { Label lbl = lblLabel(); for (int iRow = 1; iRow <= intRows; iRow++) { lbl = lblLabel(); intTeller++; tblBingo.Controls.Add(lbl, iCol, iRow); if (!dicCards.ContainsKey(lbl.Text = (iNum).ToString())) { dicCards.Add(lbl.Text, lbl); } } } btnReset.PerformClick(); } } } }
Editor is loading...