예제 #1
0
 public TLocalChannel(TLocalChannel localChannel)
     : this()
 {
     Name        = localChannel.Name;
     StoragePath = localChannel.StoragePath;
     Channel     = new TChannel(localChannel.Channel);
 }
예제 #2
0
        public void ImportOpmlOutline(TOpmlOutline outline, string dataPath)
        {
            switch (outline.OutlineType)
            {
            case "rss":
                TLocalChannel NewChannel = new TLocalChannel(outline);
                NewChannel.StoragePath = dataPath;
                Channels.Add(NewChannel);
                break;

            case "group":
                TConfigGroup NewGroup = new TConfigGroup();
                NewGroup.Name = outline.Title;
                if (outline.Outlines.Count > 0)
                {
                    foreach (TOpmlOutline OutlineItem in outline.Outlines)
                    {
                        NewGroup.ImportOpmlOutline(OutlineItem, dataPath);
                    }
                }
                Groups.Add(NewGroup);
                break;
            }
        }