All pastes #277102 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-12-12 22:19 UTC
rendered paste body
//line is read in

                    for (int col = 0; col < _cells.GetLength(1); col++)
                    {
                        int value = int.Parse(cols[col]);
                        if (value < 10)
                        {
                            _cells[row, col] = new SudokuBoardCell(true, value, value);
                        }
                        else
                            _cells[row, col] = new SudokuBoardCell(true, 0, value/10);
                        }
                    line = rdr.ReadLine();

// table is filled
        for (int row = 0; row < 9; row++)
        {
            TableRow trow = new TableRow();
            Table1.Rows.Add(trow);
            for (int col = 0; col < 9; col++)
            {
                TableCell tcell = new TableCell();
                SudokuButton sb = new SudokuButton(row, col);
                sb.ImageUrl = string.Format(path, board.Cells[row,col].Value);
                sb.Width = sb.Height = Unit.Pixel(50);
                tcell.Controls.Add(sb);
                trow.Cells.Add(tcell);
                sb.OnClientClick = " return movePopup(this);";
            }


//need to make values higher than 10 non-clickable??