Example #1
0
        public MainScreen()
        {
            InitializeComponent();
            scrGame               = new GameScreen(this, -1);
            scrSettings           = new SettingsScreen(this);
            scrGame.MdiParent     = this;
            scrSettings.MdiParent = this;

            //////
            //boot game immediately rather than new game, for testing
            //////

            /*
             * Point p = new Point(65, 10);
             * scrGame.Show();
             * scrGame.Location = p;
             */
        }
Example #2
0
        private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (scrSettings != null)
            {
                scrSettings.Close();
                scrSettings = new SettingsScreen(this)
                {
                    MdiParent = this
                };
                if (scrGame.Visible)
                {
                    scrGame.Hide();
                }

                /*
                 * if (scrGame.WindowState != FormWindowState.Minimized)
                 * { scrGame.WindowState = FormWindowState.Minimized; }
                 */
            }
            Point p = new Point(100, 10);

            scrSettings.Show();
            scrSettings.Location = p;
        }