示例#1
0
 public void RemoveTorrent(string hash, bool deleteFileToo = false)
 {
     using (Core.Sha1Hash sha1hash = new Core.Sha1Hash(hash))
         using (Core.TorrentHandle th = _torrentSession.find_torrent(sha1hash))
         {
             if (th != null && th.is_valid())
             {
                 _torrentSession.remove_torrent(th, Convert.ToInt32(deleteFileToo));
             }
         }
 }
示例#2
0
 public void ResumeTorrent(string hash)
 {
     using (Core.Sha1Hash sha1hash = new Core.Sha1Hash(hash))
         using (Core.TorrentHandle th = _torrentSession.find_torrent(sha1hash))
         {
             if (th != null && th.is_valid())
             {
                 th.resume();
             }
         }
 }