/* 試合制御 */ private void button3_Click(object sender, EventArgs e) { if (this.problem == null) { MessageBox.Show("問題ファイルが無いとダメです。"); return; } if (this.server == null || !this.server.isRunnning()) { MessageBox.Show("サーバが起動していません。"); return; } if (this.playing) { printLog("試合終了"); button3.Text = "開始"; textBox1.AllowDrop = true; this.playing = false; numericUpDown2.Value = this.default_sec; server.gameStop(); timer.Stop(); return; } printLog("試合開始"); this.stime = DateTime.Now; textBox1.AllowDrop = false; button3.Text = "終了"; this.playing = true; string[] tokens = new string[4]; tokens[0] = textBox2.Text; tokens[1] = textBox3.Text; tokens[2] = textBox4.Text; tokens[3] = textBox5.Text; this.default_sec = Decimal.ToInt32(numericUpDown2.Value); server.gameStart(this, this.problem.Raw, tokens, Decimal.ToInt32(this.numericUpDown3.Value)); timer.Start(); }