private void Settings_FormClosing(object sender, FormClosingEventArgs e) { PreferenceManager.Database.FormatTemplate = FormatingTextBox.Text; PreferenceManager.Save(); this.DialogResult = DialogResult.OK; }