public virtual void OnFileDownloaded(FileDownloadedEventArgs args) { if (FileDownloaded != null) { FileDownloaded(this, args); } }
public virtual void OnFileDownloaded(FileDownloadedEventArgs args) { if (FileDownloaded != null) { FileDownloaded(this, args); } AddLog(args.FileInfo, args.UserId, EventLogController.EventLogType.FILE_DOWNLOADED); }
static void progressMonitor_FileDownloaded(object sender, FileDownloadedEventArgs e) { Debug.WriteLine(string.Format("File \"{0}\" download finished.", e.TorrentFile.Path)); Torrent torrent = e.TorrentManager.Torrent; // Add a file to the torrent. (torrent.Files[1] as TorrentFile).Priority = Priority.Normal; (torrent.Files[2] as TorrentFile).Priority = Priority.Normal; Debug.WriteLine(string.Format("Added two file in the downloading list.")); }
static void progressMonitor_FileDownloaded(object sender, FileDownloadedEventArgs e) { Debug.WriteLine(string.Format("File \"{0}\" download finished.", e.TorrentFile.Path)); Torrent torrent = e.TorrentManager.Torrent; // Add a file to the torrent. (torrent.Files[1] as TorrentFile).Priority = Priority.Normal; (torrent.Files[2] as TorrentFile).Priority = Priority.Normal; Debug.WriteLine(string.Format("Added two file in the downloading list.")); }
private void OnFileDownloaded(FileDownloadedEventArgs e) { EventHandler <FileDownloadedEventArgs> handler = FileDownloaded; handler?.Invoke(this, e); }