public static string ShowForm()
 {
     using (NamePromptForm form = new NamePromptForm())
     {
         form.ShowDialog();
         return(form._playerName);
     }
 }
Esempio n. 2
0
        void ShowNamePromptForm()
        {
            string playerName = NamePromptForm.ShowForm();

            if (string.IsNullOrWhiteSpace(playerName))
            {
                playerName = "Unknown";
            }

            this.Model.SavePlayer(playerName);
        }