/* * Has to be called whenever the setting is changed to propagate the changes */ private void UpdateSettings() { Scraper.Stop(); Scraper.ScrapeInterval = Settings.ScraperIntervalTime.Value; Scraper.Start(); Model.Credentials.password = Settings.MatchbookPassword.Value; Model.Credentials.username = Settings.MatchbookUsername.Value; }
public ArbyForm() { InitializeComponent(); Model = new MatchbookModel(); Controller = new MatchbookController(); Controller.Model = Model; Controller.Form = this; Settings = SettingsHelper.GetDefaultSettingsData(); Timer = new UpdateGUITimer(); Scraper = new ScraperTimer(); UpdateSettings(); Timer.Start(); Scraper.Tick += new EventHandler(scraper_Tick); Scraper.Start(); }