private async void buttonExec_Click(object sender, EventArgs e) { if (!_diffs.Any() || listViewDiffs.CheckedItems.Count == 0) { MessageBox.Show("Please selected the items that you would be download."); return; } var diffs = listViewDiffs.CheckedItems .OfType <ListViewItem>() .Select(x => _diffs[(int)x.Tag]) .ToList(); labelPercentage.Visible = true; progressBarSkinDownload.Visible = true; labelProgress.Visible = true; await _diffManager.ExecuteDiff(diffs, UpdateProgress); await GetDiff(); labelPercentage.Visible = false; labelProgress.Visible = false; progressBarSkinDownload.Visible = false; }
public async Task TestDiffFtp() { var skinDrive = new FtpSkinDrive(); var diffManager = new DiffManager(skinDrive, @"G:\Steam\steamapps\common\IL-2 Sturmovik Battle of Stalingrad"); var diffs = await diffManager.GetDiffAsync(); await diffManager.ExecuteDiff(diffs); }