Example #1
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox1.SelectedItem.ToString() != Options.ConfigName)
     {
         options = SMSSettings.LoadConfig(comboBox1.SelectedItem.ToString());
         Init();
     }
 }
Example #2
0
 public OptionsForm()
 {
     options = new SMSSettings();
     InitializeComponent();
     InitDataGrid();
 }
Example #3
0
 public KannelThreadSession(SMSSettings setts)
 {
     this.settings = setts;
 }
Example #4
0
        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();
            }
        }
Example #5
0
        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;

            }
        }
Example #6
0
 private void InitSettings()
 {
     Settings.Default.Reload();
     smsSetts = SMSSettings.LoadConfig(Settings.Default.kannel_setts);
     if (smsSetts == null)
     {
         smsSetts = new SMSSettings();
         smsSetts.ConfigName = "Default";
     }
 }