コード例 #1
0
ファイル: PlayerStats.cs プロジェクト: UAChronos/RPGSystem
 private void btnEditPlayer_Click(object sender, EventArgs e)
 {
     using (PlayerEditor playerEditor = new PlayerEditor(Player))
     {
         playerEditor.ShowDialog();
     }
 }
コード例 #2
0
ファイル: GameForm.cs プロジェクト: UAChronos/RPGSystem
        /// <summary>
        /// Event handler that executes when user clicks on Add Player tool strip menu item.
        /// </summary>
        ///<para>Add player on game board.</para>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddPlayerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PlayerStats playerStats = new PlayerStats(GameDataService.Instance.GameModel.CreateNewPlayer());

            using (PlayerEditor playerEditor = new PlayerEditor(playerStats.Player))
            {
                playerEditor.ShowDialog();
            }
            flowLayoutPanel1.Controls.Add(playerStats);
        }