using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Common; namespace PersonalLaundry { public partial class SettingsForm : Form { OperatorLogin operatorLogin; public SettingsForm(OperatorLogin operatorLogin) { this.operatorLogin = operatorLogin; InitializeComponent(); } private void CloseButton_Click(object sender, EventArgs e) { this.Close(); } private void SettingsForm_Load(object sender, EventArgs e) { this.CompanyNameText.Text = Settings.CompanyName; this.CompanyAddressText.Text = Settings.CompanyAddress; this.CompanyPhoneText.Text = Settings.CompanyPhone; this.CompanyEmailText.Text = Settings.CompanyEmail; this.CompanyVATNumberText.Text = Settings.CompanyVatNumber; this.ServiceUrlText.Text = Settings.ServiceUrl; this.EmailSubjectCountReconIssueText.Text = Settings.EmailSubjectCountReconIssue; this.EmailBodyCountReconIssueText.Text = Settings.EmailBodyCountReconIssue; } private void SettingsForm_FormClosing(object sender, FormClosingEventArgs e) { if (MessageBox.Show("Please click Yes to save settings", "Confirm changes", MessageBoxButtons.YesNo) != System.Windows.Forms.DialogResult.Yes) return; Settings.CompanyName = this.CompanyNameText.Text; Settings.CompanyAddress = this.CompanyAddressText.Text; Settings.CompanyPhone = this.CompanyPhoneText.Text; Settings.CompanyEmail = this.CompanyEmailText.Text; Settings.CompanyVatNumber = this.CompanyVATNumberText.Text; Settings.ServiceUrl = this.ServiceUrlText.Text; Settings.EmailSubjectCountReconIssue = this.EmailSubjectCountReconIssueText.Text; Settings.EmailBodyCountReconIssue = this.EmailBodyCountReconIssueText.Text; MessageBox.Show("Saved!", "Settings"); } } }