示例#1
0
 private void GameField_CheckedChanged(object sender, EventArgs e)
 {
     System.Windows.Forms.CheckBox box = (System.Windows.Forms.CheckBox)sender;
     int.TryParse(box.Name, out int Num);
     if (boatPlacer.Place(this, (int)(Num / 10), Num % 10))
     {
         parentForm.BoatPlacerControl(boatPlacer.GetLength());
         boatPlacer.SetLength(0);
     }
     UpdateCheckBoxes();
 }