예제 #1
0
 public static void ToFile(this BasicPirateBaySearch.SearchEntry e, FileInfo f)
 {
     using (var s = new StreamWriter(f.OpenWrite()))
     {
         ToFile(e, s);
     }
 }
예제 #2
0
        public static BasicPirateBaySearch.SearchEntry FromFile(this BasicPirateBaySearch.SearchEntry e, FileInfo f)
        {
            using (var s = new StreamReader(f.OpenRead()))
            {
                FromFile(e, s);
            }

            return(e);
        }
예제 #3
0
 public static void FromFile(this BasicPirateBaySearch.SearchEntry e, StreamReader s)
 {
     e.CommentText = s.ReadLine();
     e.Leechers    = s.ReadLine();
     e.Link        = s.ReadLine();
     e.Name        = s.ReadLine();
     e.Seeders     = s.ReadLine();
     e.Size        = s.ReadLine();
     e.TorrentLink = s.ReadLine();
 }
예제 #4
0
 public static void ToFile(this BasicPirateBaySearch.SearchEntry e, StreamWriter s)
 {
     s.WriteLines(
         e.CommentText,
         e.Leechers,
         e.Link,
         e.Name,
         e.Seeders,
         e.Size,
         e.TorrentLink
         );
 }
        public override IHTMLOrderedList VisualizedWorkItems(FileInfo[] a)
        {
            var o = new IHTMLOrderedList();

            foreach (var f in a)
            {
                var k = new BasicPirateBaySearch.SearchEntry().FromFile(f);

                var WorkItem = new IHTMLAnchor
                {
                    URL = f.FullName.ToRelativePath(),
                    innerHTML = k.Name
                }.ToString() + " - <b>" + k.SmartName.ToString() + "</b>";

                o.innerHTML += (IHTMLListItem)WorkItem;
            }

            return o;
        }