Exemple #1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (GameUtil.TestConnection())
     {
         FormSetGameFileName frmSetName = new FormSetGameFileName();
         DialogResult        result     = frmSetName.ShowDialog();
         if (result == DialogResult.OK)
         {
             this.ThisGame.gameName        = frmSetName.GameName;
             this.ThisGame.gameBoardXmlStr = GameUtil.ErWeiArrayToXMLStr(this.ThisGame.gameBoard.GameBoardEnityToStringArray(this.ThisGame.gameBoard.Entity));
             if (GameUtil.Add(this.ThisGame))
             {
                 MessageBox.Show("保存成功!");
             }
         }
     }
 }