Esempio n. 1
0
        private void buttonLoad_Click(object sender, EventArgs e)
        {
            Stream       stream = File.OpenRead(textBox3.Text);
            StreamReader sr     = new StreamReader(stream);

            KakuroBoard board = new KakuroBoard(sr);

            sr.Close();
            stream.Close();

            board.Show();
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            int nRows, nCols;

            try
            {
                nRows = int.Parse(textBox1.Text);
                nCols = int.Parse(textBox2.Text);
            }
            catch (FormatException)
            {
                MessageBox.Show("Invlaid number of rows or columns specified.");
                return;
            }

            KakuroBoard board = new KakuroBoard(nRows, nCols);

            board.Show();
        }