コード例 #1
0
 private void btnStep_Click(object sender, EventArgs e)
 {
     tmrTime.Stop();
     btnStartStop.Text = Constant.START;
     Biz.GetAllLife();
     Biz.NextGeneration();
 }
コード例 #2
0
 private void btnClear_Click(object sender, EventArgs e)
 {
     tmrTime.Stop();
     btnStartStop.Text = Constant.START;
     isOK = false;
     Biz.InitGrid();
     Biz.GetAllLife();
     for (int i = 0; i < 5; i++)
     {
         FileStream   fs = new FileStream("res" + (i + 1) + ".txt", FileMode.Create, FileAccess.Write);
         StreamWriter sw = new StreamWriter(fs);
         sw.Close();
         fs.Close();
     }
 }
コード例 #3
0
 private void btnStartStop_Click(object sender, EventArgs e)
 {
     if (btnStartStop.Text == Constant.START)
     {
         if (!isOK)
         {
             Biz.RandomSeed();
             isOK = true;
         }
         Biz.GetAllLife();
         tmrTime.Start();
         btnStartStop.Text = Constant.STOP;
     }
     else
     {
         btnStartStop.Text = Constant.START;
         tmrTime.Stop();
     }
 }
コード例 #4
0
 private void FormMain_Load(object sender, EventArgs e)
 {
     Biz.InitGrid();
     Biz.GetAllLife();
 }