예제 #1
0
파일: RssForm.cs 프로젝트: Cothn/SPP
        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;
            }
        }
예제 #2
0
 public ConfigurationForm(RssServiceConfigurations configs)
 {
     InitializeComponent();
     this.configs = configs;
 }