public RadioSource(RadioPlugin plugin) : base(Catalog.GetString("Internet Radio"), 150) { this.plugin = plugin; stations_file = Path.Combine(Paths.UserPluginDirectory, "radio-stations.xml"); if (!File.Exists(stations_file)) { string default_xml = Resource.GetFileContents("stations.xml"); TextWriter writer = new StreamWriter(stations_file); writer.Write(default_xml); writer.Close(); } stations = Stations.Load(stations_file); stations.Updated += delegate { view.QueueDraw(); }; store = new StationStore(stations); BuildInterface(); }
public RadioSource(RadioPlugin plugin) : base(Catalog.GetString("Internet Radio"), 150) { this.plugin = plugin; stations_file = Path.Combine(Paths.UserPluginDirectory, "radio-stations.xml"); if(!File.Exists(stations_file)) { string default_xml = Resource.GetFileContents("stations.xml"); TextWriter writer = new StreamWriter(stations_file); writer.Write(default_xml); writer.Close(); } stations = Stations.Load(stations_file); stations.Updated += delegate { view.QueueDraw(); }; store = new StationStore(stations); BuildInterface(); }
public StationView(StationStore store) : base(store) { }