Example #1
0
        public void GameUI_Load(object sender, EventArgs e)
        {
            FormBorderStyle = FormBorderStyle.None;
            WindowState     = FormWindowState.Maximized;

            var Chooser = new DeckChoiceUI();

            Chooser.ShowDialog();

            if (Hostname == null)
            {
                Game = new GameBox(Chooser.Deckcode)
                {
                    Location = new Point(0, 0),
                    Width    = Screen.PrimaryScreen.Bounds.Width,
                    Height   = Screen.PrimaryScreen.Bounds.Height,
                    //BackColor = Color.LightYellow,
                }
            }
            ;
            else
            {
                Game = new GameBox(Chooser.Deckcode, Hostname)
                {
                    Location = new Point(0, 0),
                    Width    = Screen.PrimaryScreen.Bounds.Width,
                    Height   = Screen.PrimaryScreen.Bounds.Height,
                    //BackColor = Color.LightYellow,
                }
            };

            Game.Visible = false;
            Game.SendToBack();
            Controls.Add(Game);
            Game.InitUI();
            Game.Visible = true;
        }
    }