private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox1.SelectedItem.ToString() != Options.ConfigName) { options = SMSSettings.LoadConfig(comboBox1.SelectedItem.ToString()); Init(); } }
public OptionsForm() { options = new SMSSettings(); InitializeComponent(); InitDataGrid(); }
public KannelThreadSession(SMSSettings setts) { this.settings = setts; }
public static void SaveConfig(string p,SMSSettings setts) { FileStream fs = new FileStream(sPath + p + ".ksf", FileMode.Create); // Construct a SoapFormatter and use it // to serialize the data to the stream. SoapFormatter formatter = new SoapFormatter(); try { setts.ConfigName = p; formatter.Serialize(fs, setts); } catch (SerializationException e) { throw; } finally { fs.Close(); } }
private void prop_Click(object sender, EventArgs e) { OptionsForm of = new OptionsForm(); of.Options = smsSetts; if (of.ShowDialog() == DialogResult.OK) { smsSetts = (SMSSettings)of.Options; //need rescan if(of.CodingChanged && File.Exists(templateFilePath)&&curES!=null) { ResetAll(); if(DialogResult.Yes == MessageBox.Show("Режим транслитерации был изменен. Прочитать шаблон заново?", "Менеджер рассылки", MessageBoxButtons.YesNo, MessageBoxIcon.Information)) { curES.OpenDocument(templateFilePath); Thread th = new Thread(new ThreadStart(ParseExcelDoc)); th.Start(); } } massMsg.TranslitEnabled = smsSetts.NeedTransliteration; } }
private void InitSettings() { Settings.Default.Reload(); smsSetts = SMSSettings.LoadConfig(Settings.Default.kannel_setts); if (smsSetts == null) { smsSetts = new SMSSettings(); smsSetts.ConfigName = "Default"; } }