示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            readText();
            if (oThread != null)
            {
                oThread.Abort();
            }
            GameRunner gr = new GameRunner(a, b, c);

            oThread = new Thread(gr.runGame);
            oThread.Start();
            //Close();
        }
示例#2
0
        private void random_Click(object sender, EventArgs e)
        {
            Random r = new Random();

            a = int.Parse(toDouble(r.Next(10) - 5));
            b = int.Parse(toDouble(r.Next(10) - 5));
            c = int.Parse(toDouble(r.Next(10) - 5));
            if (oThread != null)
            {
                oThread.Abort();
            }
            GameRunner gr = new GameRunner(a, b, c);

            oThread = new Thread(gr.runGame);
            oThread.Start();
            //Close();
        }