public grabber(settings _s) { committedsettings = _s; committedsettings.SettingsChanged += new SettingsChangedHandler(settingsChanged); nextgrab = new System.Timers.Timer(); nextgrab.Elapsed += new System.Timers.ElapsedEventHandler(this.nextgrab_Tick); }
public deft_xmltv_gui(grabber g, settings s) { InitializeComponent(); this.g = g; this.s = s; //#if DEBUG // log.loglevel = log.loglvl.debug; //#else log.loglevel = log.loglvl.debug; //#endif log.notice(""); log.notice("App start"); this.SizeChanged += new System.EventHandler(this.SizeChangedEv); s.AppDataChanged += new AppDataChangedHandler(appDataChanged); s.init(ConstructSettingsFromForm()); /*default values on form sets default values in settings*/ SetFormFromSettings(s.sd); string[] args = Environment.GetCommandLineArgs(); foreach (string arg in args) { if (arg == "-m") { this.ShowInTaskbar = false; this.WindowState = FormWindowState.Minimized; } } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); settings s = new settings(); grabber g = new xmltv_grabber(s); deft_xmltv_gui gui = new deft_xmltv_gui(g, s); if (File.Exists(s.xmltvpath + "xmltv.exe")) { s.SettingsCommit(s.sd); Application.Run(gui); } else { MessageBox.Show("Can't find xmltv.exe!"); } }
/* http://tv.swedb.se/xmltv/channels.xml.gz */ public xmltv_grabber(settings s) : base(s) { }