public RssForm() { InitializeComponent(); webBrowserMainBrowser.ScriptErrorsSuppressed = true; currService = simpleService; ColumnHeader header = new ColumnHeader(); header.Text = "header"; header.Name = "col"; header.Width = 500; listViewTitleList.Scrollable = true; listViewTitleList.View = View.Details; listViewTitleList.Columns.Add(header); if (File.Exists("config.bin")) { BinaryFormatter binFormat = new BinaryFormatter(); using (Stream fStream = new FileStream("config.bin", FileMode.OpenOrCreate)) { try { configs = (RssServiceConfigurations)binFormat.Deserialize(fStream); } catch { configs = new RssServiceConfigurations(); } } } if (configs.mailingInterval != 0) { timerMailingTimer.Interval = configs.mailingInterval * 1000; timerMailingTimer.Enabled = true; } }
public ConfigurationForm(RssServiceConfigurations configs) { InitializeComponent(); this.configs = configs; }