Exemplo n.º 1
0
 internal SettingForm(GameBoardForm io_FormToInitiate)
 {
     m_BoardSizeOptionsIndex = 1;
     r_BoardSizeOptions      = new List <string>();
     r_MainFormReference     = io_FormToInitiate;
     FormClosing            += settingForm_FormClosing;
     boardSizeOption();
     InitializeComponent();
 }
Exemplo n.º 2
0
        public static void StartGame()
        {
            GameBoardForm mainForm     = new GameBoardForm();
            SettingForm   settingsForm = new SettingForm(mainForm);

            settingsForm.ShowDialog();
            while ((settingsForm.FirstPlayerName == string.Empty || settingsForm.SecondPlayerName == string.Empty) && !settingsForm.XButtunClicked)
            {
                settingsForm.ShowDialog();
            }

            if (settingsForm.DialogResult == DialogResult.OK)
            {
                mainForm.ShowDialog();
            }
        }