public static void ToFile(this BasicPirateBaySearch.SearchEntry e, FileInfo f) { using (var s = new StreamWriter(f.OpenWrite())) { ToFile(e, s); } }
public static BasicPirateBaySearch.SearchEntry FromFile(this BasicPirateBaySearch.SearchEntry e, FileInfo f) { using (var s = new StreamReader(f.OpenRead())) { FromFile(e, s); } return(e); }
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(); }
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; }