private void BtnSetupFolderClick(object sender, EventArgs e) { var folder = tbFolder.Text; Directory.CreateDirectory(folder); _vm = new FormVm(folder); _vm.OnProgerss += _vm_OnProgerss; _vm.OnStatusChanged += _vm_OnStatusChanged; }
private void _vm_OnProgerss(FormVm sender, int siteProgress, int siteTotal, int totalProgress, int totalTotal) { Invoke(new MethodInvoker(delegate { pbCurrent.Maximum = siteTotal; pbTotal.Maximum = totalTotal; pbCurrent.Value = siteProgress; pbTotal.Value = totalProgress; })); }
private void _vm_OnStatusChanged(FormVm sender, string status) { lblStatus.Text = status; RefreshList(); }