示例#1
0
 private void pictureBoxTank_Click(object sender, EventArgs e)
 {
     var newTank = new ChooseTank();
     if (newTank.ShowDialog() == DialogResult.OK)
     {
         Tank temp = Tank;
         Tank = newTank.Tank;
         Tank.Name = temp.Name;
         Tank.ActionBeAttacked = temp.ActionBeAttacked;
         Tank.ActionCannotMoveBackward = temp.ActionCannotMoveBackward;
         Tank.ActionCannotMoveForward = temp.ActionCannotMoveForward;
         Tank.ActionDetected = temp.ActionDetected;
         Tank.ActionNormal = temp.ActionNormal;
         ShowTankInformation();
     }
 }
示例#2
0
 private void buttonNew_Click(object sender, EventArgs e)
 {
     var newTank = new ChooseTank();
     if (newTank.ShowDialog() == DialogResult.OK)
     {
         Tank = newTank.Tank;
         panelTank.Visible = true;
         panelAction.Visible = true;
         buttonSave.Enabled = true;
         ShowTankInformation();
         buttonActionNormal_Click(null, null);
         ShowInstructionInformationList();
         ShowInstructionInformationButton();
     }
 }