private async Task AddNewTorrentAsync(DownloadingFile newSharedFile, bool start) { filesList.AddLast(newSharedFile); if (start && !fileIsDownloading) { fileIsDownloading = true; await newSharedFile.StartAsync().ConfigureAwait(false); } }
private async void StartButton_Click(object sender, EventArgs e) { fileIsDownloading = true; await nowSelected.StartAsync().ConfigureAwait(false); }