private void MainForm_Load(object sender, System.EventArgs e) { var location = _model.Settings.Gui.MainForm.Location; var size = _model.Settings.Gui.MainForm.Size; if (size == Size.Empty) { size = _view.Size; } if (size.Width < 160) { size.Width = 160; } if (size.Height < 32) { size.Height = 32; } if (!IsVisiblePosition(location, size)) { location = new Point(0, 0); } _view.Location = location; _view.Size = size; // Set to maximized if required if (_model.Settings.Gui.MainForm.Maximized) { _view.WindowState = FormWindowState.Maximized; } // Set the font to use _view.Font = _model.Settings.Gui.MainForm.Font; _model.OnStartup(); }