public void ApplyTorrentSettings(TorrentProperties props) { this.TorrentSettings = props; this.Torrent.MaxUploads = props.UploadSlots; this.Torrent.MaxConnections = props.MaxConnections; this.Torrent.DownloadLimit = props.MaxDownloadSpeed; this.Torrent.UploadLimit = props.MaxUploadSpeed; this.CompletionCommand = props.OnFinish; this.RatioLimit = props.RatioLimit; this.UpdateList("TorrentSettings", "MaxDownloadSpeed", "MaxUploadSpeed", "RatioLimit"); }
public TorrentPropertiesEditor(TorrentProperties props) { InitializeComponent(); if (props != null) { this.Title = string.Format("{0} - ({1})", this.Title, "Default options"); this.TorrentProperties = props; } else { throw new System.ArgumentNullException("props"); } }
public TorrentPropertiesEditor(TorrentInfo torrent) { InitializeComponent(); if (torrent != null) { this.ti = torrent; this.TorrentProperties = torrent.TorrentSettings; this.Title = string.Format("{0} - ({1})", this.Title, this.ti.Name); } else { throw new System.ArgumentNullException("torrent"); } }