public FTPSettingsController(SettingsBL sl) { settingsLogic = sl; settingsForm = new FTPSettingsForm(); settingsLogic.UpdateObject(FTPSettings.Instance); settingsForm.Setting = FTPSettings.Instance; settingsForm.SaveObject += new ObjectEvent(SaveObject); }
public void ShowSettings() { using (FTPSettingsForm fs = new FTPSettingsForm(settings)) { if (fs.ShowDialog() == DialogResult.OK) { settings = fs.GetSettings(); try { SettingsManager.Save(settings); } catch (Exception ex) { MessageBox.Show("Error while saving ftp settings!\r\n\r\n" + ex.Message, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } }