예제 #1
0
 private void PrivateStart(object o)
 {
     while (mTorrents.Count > 0)
     {
         Torrent torrent = mTorrents.Dequeue();
         torrent.CheckFileIntegrity(false);
         if (mStartEachTorrentAfterCheck)
         {
             torrent.Start();
         }
     }
     mInProgress = false;
 }
예제 #2
0
	private void openMenuItem_Click(object sender, System.EventArgs e)
	{
		WinForms.OpenFileDialog dialog = new WinForms.OpenFileDialog();
		dialog.Title = "Open torrent file";
		dialog.Filter = @"Torrent file (*.torrent)|*.torrent|All files (*.*)|*.*";
		if (dialog.ShowDialog(this) == WinForms.DialogResult.OK)
		{
			BT.Torrent torrent = btsession.CreateTorrent( dialog.FileName );

			this.torrentListView.Items.Add(new TorrentListViewItem(torrent));

			torrent.PeerConnected += new BT.TorrentPeerConnectedCallback(OnPeerConnected);

			torrent.CheckFileIntegrity( true );
			torrent.Start();
		}
	}