新建游戏的窗体。
Inheritance: System.Windows.Forms.Form
コード例 #1
0
 /// <summary>
 /// 新建游戏的事件。
 /// </summary>
 private void newGameTSBtn_Click(object sender, EventArgs e)
 {
     if (this.SaveGame(true))
     {
         this.PauseGame();
         using (NewGameForm form = new NewGameForm())
         {
             if (form.ShowDialog() == DialogResult.OK)
             {
                 // 生成拼图形状。
                 JigsawPieceCollection pieces = new JigsawPieceCollection(this.deviceManager.D2DFactory, form.JigsawShape);
                 this.StartGame(pieces, form.JigsawInfo);
             }
             else
             {
                 this.ResumeGame();
             }
         }
     }
 }
コード例 #2
0
		/// <summary>
		/// 新建游戏的事件。
		/// </summary>
		private void newGameTSBtn_Click(object sender, EventArgs e)
		{
			if (this.SaveGame(true))
			{
				this.PauseGame();
				using (NewGameForm form = new NewGameForm())
				{
					if (form.ShowDialog() == DialogResult.OK)
					{
						// 生成拼图形状。
						JigsawPieceCollection pieces = new JigsawPieceCollection(this.deviceManager.D2DFactory, form.JigsawShape);
						this.StartGame(pieces, form.JigsawInfo);
					}
					else
					{
						this.ResumeGame();
					}
				}
			}
		}