public TLocalChannel(TLocalChannel localChannel) : this() { Name = localChannel.Name; StoragePath = localChannel.StoragePath; Channel = new TChannel(localChannel.Channel); }
public void Load(string storageName) { try { Trace.Indent(); XDocument DocumentToRead; try { DocumentToRead = XDocument.Load(Path.Combine(StoragePath, storageName)); } catch (Exception ex) { Trace.WriteLine(string.Format("Unable to read Channel \"{0}\" : {1} ", StorageName, ex.Message)); if (LoadCompleted != null) { LoadCompleted(this, EventArgs.Empty); } return; } Channel = new TChannel(DocumentToRead.Root.SafeReadElement("channel")); if (LoadCompleted != null) { LoadCompleted(this, EventArgs.Empty); } } finally { Trace.Unindent(); } }
private void Channel_DownloadCompleted(object sender, ItemsDownloadedEventArgs e) { TChannel CurrentChannel = sender as TChannel; CurrentChannel.DownloadCompleted -= new EventHandler <ItemsDownloadedEventArgs>(Channel_DownloadCompleted); Save(); if (DownloadCompleted != null) { ItemsDownloadedEventArgs Args = new ItemsDownloadedEventArgs(e.RawData, e.ResponseHeaders, e.Data); DownloadCompleted(this, Args); } }
public TChannel(TChannel channel) : this() { Name = channel.Name; Title = channel.Title; Link = new TUri(channel.Link); Description = channel.Description; Category = channel.Category; Language = channel.Language; Copyright = channel.Copyright; LastBuildDate = channel.LastBuildDate; Picture = new TChannelImage(channel.Picture); Items = new TItemCollection(channel.Items); ChannelEncoding = channel.ChannelEncoding; }
public TLocalChannel(TOpmlOutline opmlOutline) : this() { Name = opmlOutline.Title; Channel = new TChannel(opmlOutline); }
public TLocalChannel() { Name = ""; StoragePath = ""; Channel = new TChannel(); }