Esempio n. 1
0
        /// <summary>
        /// Default contructor
        /// </summary>
        public FormMain()
        {
            InitializeComponent();

            libControl = new Library();
            gameControl = new Game();
            profileControl = new Panel();
            browserControl = new InlineBrowser();
            welcomeControl = new Welcome();
            solverControl = new SolverSectionController();

            libControl.Size = Size;
            gameControl.Size = Size;
            profileControl.Size = Size;
            browserControl.Size = Size;
            welcomeControl.Size = Size;
            solverControl.Size = Size;

            libControl.Dock = DockStyle.Fill;
            gameControl.Dock = DockStyle.Fill;
            profileControl.Dock = DockStyle.Fill;
            browserControl.Dock = DockStyle.Fill;
            welcomeControl.Dock = DockStyle.Fill;
            solverControl.Dock = DockStyle.Fill;

            SetNotVisible();

            Controls.Add(libControl);
            Controls.Add(gameControl);
            Controls.Add(profileControl);
            Controls.Add(browserControl);
            Controls.Add(welcomeControl);
            Controls.Add(solverControl);

            Mode = Modes.Welcome;
        }
Esempio n. 2
0
 /// <summary>
 /// Cleanup
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (solverControl != null)
     {
         solverControl.Dispose();
         solverControl = null;
     }
 }