private void Form1_FormClosing(object sender, FormClosingEventArgs e) { _formSettingsService.SaveFormOptionsToFile(this); _controller.CloseDatabaseConnection(); }