public SettingsExpertForm(GeneralOptions go) { InitializeComponent(); // Read Settings _go = go; }
public eMailSettingsForm(ICore pipeProxy, GeneralOptions go) { InitializeComponent(); _pipeProxy = pipeProxy; _go = go; }
public CredentialsForm(GeneralOptions go) { InitializeComponent(); options = go; domainNameTxt.Text = go.domainName; userNameTxt.Text = go.userName; passwordTxt.Text = confirmPasswordTxt.Text = go.password; fallbackToSourceChk.Visible = fallbackToSourceChk.Enabled = false; // This option is not valid for general network credentials }
/// <summary> /// Capture the eMail Settings from the GUI page and optionally write to the config file /// </summary> /// <param name="go">General Options object to write to</param> private void WriteSettings(GeneralOptions go) { go.eMailSettings.eMailBasicSettings.smtpServer = smtpServer.Text; go.eMailSettings.eMailBasicSettings.port = int.Parse(portNo.Text); go.eMailSettings.eMailBasicSettings.ssl = sslChk.Checked; go.eMailSettings.eMailBasicSettings.fromAddress = fromAddress.Text; go.eMailSettings.eMailBasicSettings.toAddresses = toAddress.Text; go.eMailSettings.successEvent = sendSuccessChk.Checked; go.eMailSettings.failedEvent = sendFailedChk.Checked; go.eMailSettings.cancelledEvent = sendCancelledChk.Checked; go.eMailSettings.startEvent = sendStartChk.Checked; go.eMailSettings.downloadFailedEvent = sendDownloadErrorChk.Checked; go.eMailSettings.queueEvent = sendQueueChk.Checked; go.eMailSettings.eMailBasicSettings.userName = userName.Text; go.eMailSettings.eMailBasicSettings.password = passWord.Text; }
/// <summary> /// Creates a new Config File and a new MCEBuddyConf object with parameters copied from the individual options objects passed. /// If no config file is specified, default values are initialized and no config file is written /// </summary> /// <param name="configFile">Config file to write to</param> /// <param name="go">GeneralOptions parameters</param> /// <param name="mjoList">List of MonitorJobOption parameters</param> /// <param name="cjoList">List of ConversionJobOption parameters</param> public MCEBuddyConf(GeneralOptions go, List<MonitorJobOptions> mjoList, List<ConversionJobOptions> cjoList, string configFile = "") { if (configFile == null) configFile = ""; // don't use null as it leads to excessive reads / writes of win.ini mceBuddyConfSettings.conversionTasks = new List<ConversionJobOptions>(); mceBuddyConfSettings.monitorTasks = new List<MonitorJobOptions>(); mceBuddyConfSettings.generalOptions = new GeneralOptions(); mceBuddyConfSettings.generalOptions = go.Clone(); foreach (MonitorJobOptions mjo in mjoList) AddOrUpdateMonitorTask(mjo, false); foreach (ConversionJobOptions cjo in cjoList) AddOrUpdateConversionTask(cjo, false); if (!String.IsNullOrEmpty(configFile)) { configIni = new Ini(configFile); WriteSettings(); } }
/// <summary> /// Update the General Options, optionally write to file /// </summary> /// <param name="go">General options settings</param> /// <param name="write">Write to configuration file immediately</param> public void UpdateGeneralOptions(GeneralOptions go, bool write) { // Clone it, to avoid conflict mceBuddyConfSettings.generalOptions = go.Clone(); if (write) WriteGeneralSettings(configIni); }
public GeneralOptions generalOptions; // General settings for MCEBuddy public ConfSettings(List<ConversionJobOptions> cjo, List<MonitorJobOptions> mjo, GeneralOptions go) { conversionTasks = cjo; monitorTasks = mjo; generalOptions = go; }
public ConfSettings(List <ConversionJobOptions> cjo, List <MonitorJobOptions> mjo, GeneralOptions go) { conversionTasks = cjo; monitorTasks = mjo; generalOptions = go; }
/// <summary> /// Read eMail settings from the General Options memory object into the GUI page /// </summary> /// <param name="go">General Options to read settings from</param> private void ReadSettings(GeneralOptions go) { smtpServer.Text = go.eMailSettings.eMailBasicSettings.smtpServer; portNo.Text = go.eMailSettings.eMailBasicSettings.port.ToString(); sslChk.Checked = go.eMailSettings.eMailBasicSettings.ssl; fromAddress.Text = go.eMailSettings.eMailBasicSettings.fromAddress; toAddress.Text = go.eMailSettings.eMailBasicSettings.toAddresses; sendSuccessChk.Checked = go.eMailSettings.successEvent; sendFailedChk.Checked = go.eMailSettings.failedEvent; sendCancelledChk.Checked = go.eMailSettings.cancelledEvent; sendStartChk.Checked = go.eMailSettings.startEvent; sendDownloadErrorChk.Checked = go.eMailSettings.downloadFailedEvent; sendQueueChk.Checked = go.eMailSettings.queueEvent; userName.Text = go.eMailSettings.eMailBasicSettings.userName; passWord.Text = go.eMailSettings.eMailBasicSettings.password; confirmPassword.Text = go.eMailSettings.eMailBasicSettings.password; }
void eMail_SendTest(GeneralOptions go) { bool success = false; try { success = _pipeProxy.TestEmailSettings(go.eMailSettings.eMailBasicSettings); if (!success) MessageBox.Show(Localise.GetPhrase("Send eMail test failed! Please check your settings and internet connectivity"), Localise.GetPhrase("Test eMail Failed")); else MessageBox.Show(Localise.GetPhrase("Send eMail test successful"), Localise.GetPhrase("Test eMail Success")); } catch (Exception e) { MessageBox.Show(Localise.GetPhrase("Unable to communicate with engine."), Localise.GetPhrase("Communication Error"), MessageBoxButtons.OK, MessageBoxIcon.Error); Log.WriteSystemEventLog(Localise.GetPhrase("MCEBuddy GUI: Unable to get pipe active status"), EventLogEntryType.Warning); Log.WriteSystemEventLog(e.ToString(), EventLogEntryType.Warning); } // Enable the controls foreach (Control ctl in this.Controls) ctl.Enabled = true; testSettings.Text = Localise.GetPhrase("Test"); _testThread = null; // This is done }