diff --git a/WrappersForEto.cs b/WrappersForEto.cs index d5cf9d0..b161a2b 100644 --- a/WrappersForEto.cs +++ b/WrappersForEto.cs @@ -70,9 +70,9 @@ namespace apprepodbmgr.Eto get { return _item.Architecture; } set { } } - public string machine + public string targetos { - get { return _item.Machine; } + get { return _item.TargetOs; } set { } } public string format @@ -110,9 +110,9 @@ namespace apprepodbmgr.Eto get { return _item.Files; } set { } } - public bool netinstall + public bool Installer { - get { return _item.Netinstall; } + get { return _item.Installer; } set { } } public byte[] xml diff --git a/dlgAdd.xeto b/dlgAdd.xeto index b119023..3b1fd8b 100644 --- a/dlgAdd.xeto +++ b/dlgAdd.xeto @@ -43,9 +43,9 @@ - + - + @@ -91,7 +91,7 @@ source - netinstall + installer diff --git a/dlgAdd.xeto.cs b/dlgAdd.xeto.cs index 3d06d35..39b0bb6 100644 --- a/dlgAdd.xeto.cs +++ b/dlgAdd.xeto.cs @@ -31,6 +31,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.IO; +using System.Linq; using System.Threading; using System.Xml.Serialization; using apprepodbmgr.Core; @@ -130,8 +131,8 @@ namespace apprepodbmgr.Eto }); treeApps.Columns.Add(new GridColumn { - DataCell = new TextBoxCell {Binding = Binding.Property(r => r.machine)}, - HeaderText = "Machine" + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.targetos)}, + HeaderText = "Target OS" }); treeApps.Columns.Add(new GridColumn { @@ -170,8 +171,8 @@ namespace apprepodbmgr.Eto }); treeApps.Columns.Add(new GridColumn { - DataCell = new CheckBoxCell {Binding = Binding.Property(r => r.netinstall)}, - HeaderText = "NetInstall?" + DataCell = new CheckBoxCell {Binding = Binding.Property(r => r.Installer)}, + HeaderText = "Installer?" }); treeApps.AllowMultipleSelection = false; @@ -352,7 +353,7 @@ namespace apprepodbmgr.Eto btnToggleCrack.Enabled = true; txtFormat.ReadOnly = false; - txtMachine.ReadOnly = false; + txtTargetOs.ReadOnly = false; txtProduct.ReadOnly = false; txtVersion.ReadOnly = false; txtLanguages.ReadOnly = false; @@ -363,7 +364,7 @@ namespace apprepodbmgr.Eto chkFiles.Enabled = true; chkUpdate.Enabled = true; chkUpgrade.Enabled = true; - chkNetinstall.Enabled = true; + chkInstaller.Enabled = true; chkSource.Enabled = true; btnMetadata.Visible = true; @@ -373,7 +374,7 @@ namespace apprepodbmgr.Eto foreach(string developer in Context.Metadata.Developer) { if(!string.IsNullOrWhiteSpace(txtDeveloper.Text)) txtDeveloper.Text += ","; - txtDeveloper.Text += developer; + txtDeveloper.Text += developer; } if(!string.IsNullOrWhiteSpace(Context.Metadata.Name)) txtProduct.Text = Context.Metadata.Name; @@ -383,21 +384,22 @@ namespace apprepodbmgr.Eto foreach(LanguagesTypeLanguage language in Context.Metadata.Languages) { if(!string.IsNullOrWhiteSpace(txtLanguages.Text)) txtLanguages.Text += ","; - txtLanguages.Text += language; + txtLanguages.Text += language; } if(Context.Metadata.Architectures != null) foreach(ArchitecturesTypeArchitecture architecture in Context.Metadata.Architectures) { if(!string.IsNullOrWhiteSpace(txtArchitecture.Text)) txtArchitecture.Text += ","; - txtArchitecture.Text += architecture; + txtArchitecture.Text += architecture; } - if(Context.Metadata.Systems != null) - foreach(string machine in Context.Metadata.Systems) + if(Context.Metadata.RequiredOperatingSystems != null) + foreach(string targetos in Context + .Metadata.RequiredOperatingSystems.Select(os => os.Name).Distinct()) { - if(!string.IsNullOrWhiteSpace(txtMachine.Text)) txtMachine.Text += ","; - txtMachine.Text += machine; + if(!string.IsNullOrWhiteSpace(txtTargetOs.Text)) txtTargetOs.Text += ","; + txtTargetOs.Text += targetos; } btnMetadata.BackgroundColor = Colors.Green; @@ -414,7 +416,7 @@ namespace apprepodbmgr.Eto Application.Instance.Invoke(delegate { fileView.Add(new FileEntry {Path = filename, Hash = hash, Known = known, IsCrack = isCrack}); - btnPack.Enabled |= !known; + btnPack.Enabled |= !known; if(known) knownFiles++; }); } @@ -455,7 +457,7 @@ namespace apprepodbmgr.Eto } txtFormat.ReadOnly = true; - txtMachine.ReadOnly = true; + txtTargetOs.ReadOnly = true; txtProduct.ReadOnly = true; txtVersion.ReadOnly = true; txtLanguages.ReadOnly = true; @@ -466,10 +468,10 @@ namespace apprepodbmgr.Eto chkFiles.Enabled = false; chkUpdate.Enabled = false; chkUpgrade.Enabled = false; - chkNetinstall.Enabled = false; + chkInstaller.Enabled = false; chkSource.Enabled = false; txtFormat.Text = ""; - txtMachine.Text = ""; + txtTargetOs.Text = ""; txtProduct.Text = ""; txtVersion.Text = ""; txtLanguages.Text = ""; @@ -480,7 +482,7 @@ namespace apprepodbmgr.Eto chkFiles.Checked = false; chkUpdate.Checked = false; chkUpgrade.Checked = false; - chkNetinstall.Checked = false; + chkInstaller.Checked = false; chkSource.Checked = false; if(Context.TmpFolder != null) @@ -506,11 +508,9 @@ namespace apprepodbmgr.Eto Application.Instance.Invoke(delegate { if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner)) - lblProgress.Text = $"{text}: {inner}"; - else if(!string.IsNullOrWhiteSpace(inner)) - lblProgress.Text = inner; - else - lblProgress.Text = text; + lblProgress.Text = $"{text}: {inner}"; + else if(!string.IsNullOrWhiteSpace(inner)) lblProgress.Text = inner; + else lblProgress.Text = text; if(maximum > 0) { if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue || @@ -534,11 +534,9 @@ namespace apprepodbmgr.Eto Application.Instance.Invoke(delegate { if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner)) - lblProgress2.Text = $"{text}: {inner}"; - else if(!string.IsNullOrWhiteSpace(inner)) - lblProgress2.Text = inner; - else - lblProgress2.Text = text; + lblProgress2.Text = $"{text}: {inner}"; + else if(!string.IsNullOrWhiteSpace(inner)) lblProgress2.Text = inner; + else lblProgress2.Text = text; if(maximum > 0) { if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue || @@ -710,7 +708,7 @@ namespace apprepodbmgr.Eto btnClose.Enabled = false; prgProgress.Visible = true; txtFormat.ReadOnly = true; - txtMachine.ReadOnly = true; + txtTargetOs.ReadOnly = true; txtProduct.ReadOnly = true; txtVersion.ReadOnly = true; txtLanguages.ReadOnly = true; @@ -721,7 +719,7 @@ namespace apprepodbmgr.Eto chkFiles.Enabled = false; chkUpdate.Enabled = false; chkUpgrade.Enabled = false; - chkNetinstall.Enabled = false; + chkInstaller.Enabled = false; chkSource.Enabled = false; Workers.UpdateProgress += UpdateProgress; @@ -733,11 +731,11 @@ namespace apprepodbmgr.Eto Context.DbInfo.Developer = txtDeveloper.Text; Context.DbInfo.Format = txtFormat.Text; Context.DbInfo.Languages = txtLanguages.Text; - Context.DbInfo.Machine = txtMachine.Text; + Context.DbInfo.TargetOs = txtTargetOs.Text; Context.DbInfo.Product = txtProduct.Text; Context.DbInfo.Version = txtVersion.Text; Context.DbInfo.Files = chkFiles.Checked.Value; - Context.DbInfo.Netinstall = chkNetinstall.Checked.Value; + Context.DbInfo.Installer = chkInstaller.Checked.Value; Context.DbInfo.Oem = chkOem.Checked.Value; Context.DbInfo.Source = chkSource.Checked.Value; Context.DbInfo.Update = chkUpdate.Checked.Value; @@ -749,9 +747,9 @@ namespace apprepodbmgr.Eto XmlSerializer xs = new XmlSerializer(typeof(CICMMetadataType)); xs.Serialize(ms, Context.Metadata); Context.DbInfo.Xml = ms.ToArray(); - JsonSerializer js = new JsonSerializer(); - ms = new MemoryStream(); - StreamWriter sw = new StreamWriter(ms); + JsonSerializer js = new JsonSerializer(); + ms = new MemoryStream(); + StreamWriter sw = new StreamWriter(ms); js.Serialize(sw, Context.Metadata, typeof(CICMMetadataType)); Context.DbInfo.Json = ms.ToArray(); } @@ -821,7 +819,7 @@ namespace apprepodbmgr.Eto lblProgress.Visible = true; lblProgress2.Visible = true; txtFormat.ReadOnly = true; - txtMachine.ReadOnly = true; + txtTargetOs.ReadOnly = true; txtProduct.ReadOnly = true; txtVersion.ReadOnly = true; txtLanguages.ReadOnly = true; @@ -832,7 +830,7 @@ namespace apprepodbmgr.Eto chkFiles.Enabled = false; chkUpdate.Enabled = false; chkUpgrade.Enabled = false; - chkNetinstall.Enabled = false; + chkInstaller.Enabled = false; chkSource.Enabled = false; Workers.UpdateProgress += UpdateProgress; @@ -845,11 +843,11 @@ namespace apprepodbmgr.Eto Context.DbInfo.Developer = txtDeveloper.Text; Context.DbInfo.Format = txtFormat.Text; Context.DbInfo.Languages = txtLanguages.Text; - Context.DbInfo.Machine = txtMachine.Text; + Context.DbInfo.TargetOs = txtTargetOs.Text; Context.DbInfo.Product = txtProduct.Text; Context.DbInfo.Version = txtVersion.Text; Context.DbInfo.Files = chkFiles.Checked.Value; - Context.DbInfo.Netinstall = chkNetinstall.Checked.Value; + Context.DbInfo.Installer = chkInstaller.Checked.Value; Context.DbInfo.Oem = chkOem.Checked.Value; Context.DbInfo.Source = chkSource.Checked.Value; Context.DbInfo.Update = chkUpdate.Checked.Value; @@ -900,7 +898,7 @@ namespace apprepodbmgr.Eto lblProgress.Visible = false; lblProgress2.Visible = false; txtFormat.ReadOnly = false; - txtMachine.ReadOnly = false; + txtTargetOs.ReadOnly = false; txtProduct.ReadOnly = false; txtVersion.ReadOnly = false; txtLanguages.ReadOnly = false; @@ -911,7 +909,7 @@ namespace apprepodbmgr.Eto chkFiles.Enabled = true; chkUpdate.Enabled = true; chkUpgrade.Enabled = true; - chkNetinstall.Enabled = true; + chkInstaller.Enabled = true; chkSource.Enabled = true; }); } @@ -1058,7 +1056,7 @@ namespace apprepodbmgr.Eto foreach(string developer in Context.Metadata.Developer) { if(!string.IsNullOrWhiteSpace(txtDeveloper.Text)) txtDeveloper.Text += ","; - txtDeveloper.Text += developer; + txtDeveloper.Text += developer; } if(string.IsNullOrWhiteSpace(txtProduct.Text)) @@ -1074,7 +1072,7 @@ namespace apprepodbmgr.Eto foreach(LanguagesTypeLanguage language in Context.Metadata.Languages) { if(!string.IsNullOrWhiteSpace(txtLanguages.Text)) txtLanguages.Text += ","; - txtLanguages.Text += language; + txtLanguages.Text += language; } if(string.IsNullOrWhiteSpace(txtArchitecture.Text)) @@ -1082,15 +1080,16 @@ namespace apprepodbmgr.Eto foreach(ArchitecturesTypeArchitecture architecture in Context.Metadata.Architectures) { if(!string.IsNullOrWhiteSpace(txtArchitecture.Text)) txtArchitecture.Text += ","; - txtArchitecture.Text += architecture; + txtArchitecture.Text += architecture; } - if(string.IsNullOrWhiteSpace(txtMachine.Text)) - if(Context.Metadata.Systems != null) - foreach(string machine in Context.Metadata.Systems) + if(string.IsNullOrWhiteSpace(txtTargetOs.Text)) + if(Context.Metadata.RequiredOperatingSystems != null) + foreach(string targetos in Context.Metadata.RequiredOperatingSystems.Select(os => os.Name) + .Distinct()) { - if(!string.IsNullOrWhiteSpace(txtMachine.Text)) txtMachine.Text += ","; - txtMachine.Text += machine; + if(!string.IsNullOrWhiteSpace(txtTargetOs.Text)) txtTargetOs.Text += ","; + txtTargetOs.Text += targetos; } btnMetadata.BackgroundColor = Colors.Green; @@ -1151,7 +1150,7 @@ namespace apprepodbmgr.Eto TextBox txtVersion; TextBox txtLanguages; TextBox txtArchitecture; - TextBox txtMachine; + TextBox txtTargetOs; TextBox txtFormat; TextBox txtDescription; CheckBox chkOem; @@ -1159,7 +1158,7 @@ namespace apprepodbmgr.Eto CheckBox chkUpgrade; CheckBox chkFiles; CheckBox chkSource; - CheckBox chkNetinstall; + CheckBox chkInstaller; GridView treeFiles; TabPage tabApps; GridView treeApps; diff --git a/frmMain.xeto.cs b/frmMain.xeto.cs index 52b8165..d67446f 100644 --- a/frmMain.xeto.cs +++ b/frmMain.xeto.cs @@ -89,8 +89,8 @@ namespace apprepodbmgr.Eto }); treeApps.Columns.Add(new GridColumn { - DataCell = new TextBoxCell {Binding = Binding.Property(r => r.machine)}, - HeaderText = "Machine" + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.targetos)}, + HeaderText = "Target OS" }); treeApps.Columns.Add(new GridColumn { @@ -129,8 +129,8 @@ namespace apprepodbmgr.Eto }); treeApps.Columns.Add(new GridColumn { - DataCell = new CheckBoxCell {Binding = Binding.Property(r => r.netinstall)}, - HeaderText = "NetInstall?" + DataCell = new CheckBoxCell {Binding = Binding.Property(r => r.Installer)}, + HeaderText = "Installer?" }); treeApps.AllowMultipleSelection = false; @@ -188,8 +188,8 @@ namespace apprepodbmgr.Eto HeaderText = "Virus" }); - treeFiles.AllowMultipleSelection = false; - treeFiles.CellFormatting += (sender, e) => + treeFiles.AllowMultipleSelection = false; + treeFiles.CellFormatting += (sender, e) => { if(((DbFile)e.Item).HasVirus.HasValue) e.BackgroundColor = ((DbFile)e.Item).HasVirus.Value ? Colors.Red : Colors.Green; @@ -267,11 +267,9 @@ namespace apprepodbmgr.Eto Application.Instance.Invoke(delegate { if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner)) - lblProgress.Text = $"{text}: {inner}"; - else if(!string.IsNullOrWhiteSpace(inner)) - lblProgress.Text = inner; - else - lblProgress.Text = text; + lblProgress.Text = $"{text}: {inner}"; + else if(!string.IsNullOrWhiteSpace(inner)) lblProgress.Text = inner; + else lblProgress.Text = text; if(maximum > 0) { if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue || @@ -295,11 +293,9 @@ namespace apprepodbmgr.Eto Application.Instance.Invoke(delegate { if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner)) - lblProgress2.Text = $"{text}: {inner}"; - else if(!string.IsNullOrWhiteSpace(inner)) - lblProgress2.Text = inner; - else - lblProgress2.Text = text; + lblProgress2.Text = $"{text}: {inner}"; + else if(!string.IsNullOrWhiteSpace(inner)) lblProgress2.Text = inner; + else lblProgress2.Text = text; if(maximum > 0) { if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue || @@ -325,7 +321,7 @@ namespace apprepodbmgr.Eto protected void OnBtnAddClicked(object sender, EventArgs e) { - dlgAdd dlgAdd = new dlgAdd(); + dlgAdd dlgAdd = new dlgAdd(); dlgAdd.OnAddedApp += app => { lstApps.Add(new DBEntryForEto(app)); }; dlgAdd.ShowModal(this); } @@ -502,8 +498,8 @@ namespace apprepodbmgr.Eto btnRemove.Visible = false; btnCompress.Visible = false; btnSave.Visible = false; - btnSettings.Enabled = false; - btnStop.Visible = true; + btnSettings.Enabled = false; + btnStop.Visible = true; Workers.Failed += CompressToFailed; Workers.Finished += CompressToFinished; @@ -628,7 +624,7 @@ namespace apprepodbmgr.Eto if(treeFiles.SelectedItem == null) return; DbFile file = Workers.GetDBFile(((DbFile)treeFiles.SelectedItem).Sha256); - outIter = (DbFile)treeFiles.SelectedItem; + outIter = (DbFile)treeFiles.SelectedItem; if(file == null) { @@ -678,20 +674,21 @@ namespace apprepodbmgr.Eto { Application.Instance.Invoke(delegate { - treeFiles.Enabled = true; - btnToggleCrack.Enabled = true; - btnScanWithClamd.Enabled = true; - btnCheckInVirusTotal.Enabled = true; - Workers.Failed -= ClamdFailed; - Workers.ScanFinished -= ClamdFinished; - Workers.UpdateProgress -= UpdateVirusProgress; - lblProgressFiles1.Text = ""; - prgProgressFiles1.Visible = false; - lblProgressFiles1.Visible = false; - if(thdScanFile != null) thdScanFile = null; + treeFiles.Enabled = true; + btnToggleCrack.Enabled = true; + btnScanWithClamd.Enabled = true; + btnCheckInVirusTotal.Enabled = true; + Workers.Failed -= ClamdFailed; + Workers.ScanFinished -= ClamdFinished; + Workers.UpdateProgress -= UpdateVirusProgress; + lblProgressFiles1.Text = ""; + prgProgressFiles1.Visible = false; + lblProgressFiles1.Visible = false; + if(thdScanFile != null) thdScanFile = null; if((!outIter.HasVirus.HasValue || outIter.HasVirus.HasValue && !outIter.HasVirus.Value) && - file.HasVirus.HasValue && file.HasVirus.Value) infectedFiles++; + file.HasVirus.HasValue && + file.HasVirus.Value) infectedFiles++; lstFiles.Remove(outIter); AddFile(file); @@ -705,7 +702,7 @@ namespace apprepodbmgr.Eto if(treeFiles.SelectedItem == null) return; DbFile file = Workers.GetDBFile(((DbFile)treeFiles.SelectedItem).Sha256); - outIter = (DbFile)treeFiles.SelectedItem; + outIter = (DbFile)treeFiles.SelectedItem; if(file == null) { @@ -734,16 +731,16 @@ namespace apprepodbmgr.Eto { Application.Instance.Invoke(delegate { - treeFiles.Enabled = true; - btnToggleCrack.Enabled = true; - btnScanWithClamd.Enabled = true; - btnCheckInVirusTotal.Enabled = true; - prgProgressFiles1.Visible = false; - Workers.Failed -= VirusTotalFailed; - Workers.ScanFinished -= VirusTotalFinished; - Workers.UpdateProgress -= UpdateVirusProgress; - lblProgressFiles1.Text = ""; - if(thdScanFile != null) thdScanFile = null; + treeFiles.Enabled = true; + btnToggleCrack.Enabled = true; + btnScanWithClamd.Enabled = true; + btnCheckInVirusTotal.Enabled = true; + prgProgressFiles1.Visible = false; + Workers.Failed -= VirusTotalFailed; + Workers.ScanFinished -= VirusTotalFinished; + Workers.UpdateProgress -= UpdateVirusProgress; + lblProgressFiles1.Text = ""; + if(thdScanFile != null) thdScanFile = null; MessageBox.Show(text, MessageBoxType.Error); }); } @@ -752,19 +749,20 @@ namespace apprepodbmgr.Eto { Application.Instance.Invoke(delegate { - treeFiles.Enabled = true; - btnToggleCrack.Enabled = true; - btnScanWithClamd.Enabled = true; - btnCheckInVirusTotal.Enabled = true; - Workers.Failed -= VirusTotalFailed; - Workers.ScanFinished -= VirusTotalFinished; - Workers.UpdateProgress -= UpdateVirusProgress; - lblProgressFiles1.Text = ""; - prgProgressFiles1.Visible = false; - if(thdScanFile != null) thdScanFile = null; + treeFiles.Enabled = true; + btnToggleCrack.Enabled = true; + btnScanWithClamd.Enabled = true; + btnCheckInVirusTotal.Enabled = true; + Workers.Failed -= VirusTotalFailed; + Workers.ScanFinished -= VirusTotalFinished; + Workers.UpdateProgress -= UpdateVirusProgress; + lblProgressFiles1.Text = ""; + prgProgressFiles1.Visible = false; + if(thdScanFile != null) thdScanFile = null; if((!outIter.HasVirus.HasValue || outIter.HasVirus.HasValue && !outIter.HasVirus.Value) && - file.HasVirus.HasValue && file.HasVirus.Value) infectedFiles++; + file.HasVirus.HasValue && + file.HasVirus.Value) infectedFiles++; lstFiles.Remove(outIter); AddFile(file); @@ -805,11 +803,9 @@ namespace apprepodbmgr.Eto Application.Instance.Invoke(delegate { if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner)) - lblProgressFiles1.Text = $"{text}: {inner}"; - else if(!string.IsNullOrWhiteSpace(inner)) - lblProgressFiles1.Text = inner; - else - lblProgressFiles1.Text = text; + lblProgressFiles1.Text = $"{text}: {inner}"; + else if(!string.IsNullOrWhiteSpace(inner)) lblProgressFiles1.Text = inner; + else lblProgressFiles1.Text = text; if(maximum > 0) { if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue || @@ -833,11 +829,9 @@ namespace apprepodbmgr.Eto Application.Instance.Invoke(delegate { if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner)) - lblProgressFiles2.Text = $"{text}: {inner}"; - else if(!string.IsNullOrWhiteSpace(inner)) - lblProgressFiles2.Text = inner; - else - lblProgressFiles2.Text = text; + lblProgressFiles2.Text = $"{text}: {inner}"; + else if(!string.IsNullOrWhiteSpace(inner)) lblProgressFiles2.Text = inner; + else lblProgressFiles2.Text = text; if(maximum > 0) { if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue || @@ -971,21 +965,21 @@ namespace apprepodbmgr.Eto { Application.Instance.Invoke(delegate { - treeFiles.Enabled = true; - btnToggleCrack.Enabled = true; - btnScanWithClamd.Enabled = true; - btnCheckInVirusTotal.Enabled = true; - btnScanAllPending.Enabled = true; - Workers.Finished -= AllClamdFinished; - Workers.UpdateProgress -= UpdateVirusProgress2; - Workers.UpdateProgress2 -= UpdateFileProgress; - lblProgressFiles1.Text = ""; - prgProgressFiles1.Visible = false; - lblProgressFiles2.Text = ""; - prgProgressFiles2.Visible = false; - btnStopFiles.Visible = false; - scanningFiles = false; - if(thdScanFile != null) thdScanFile = null; + treeFiles.Enabled = true; + btnToggleCrack.Enabled = true; + btnScanWithClamd.Enabled = true; + btnCheckInVirusTotal.Enabled = true; + btnScanAllPending.Enabled = true; + Workers.Finished -= AllClamdFinished; + Workers.UpdateProgress -= UpdateVirusProgress2; + Workers.UpdateProgress2 -= UpdateFileProgress; + lblProgressFiles1.Text = ""; + prgProgressFiles1.Visible = false; + lblProgressFiles2.Text = ""; + prgProgressFiles2.Visible = false; + btnStopFiles.Visible = false; + scanningFiles = false; + if(thdScanFile != null) thdScanFile = null; OnBtnPopulateFilesClicked(null, new EventArgs()); }); @@ -1033,25 +1027,25 @@ namespace apprepodbmgr.Eto { Application.Instance.Invoke(delegate { - btnCleanFiles.Visible = true; - btnToggleCrack.Visible = true; - btnScanWithClamd.Visible = true; - btnScanAllPending.Visible = true; - btnCheckInVirusTotal.Visible = true; - tabApps.Enabled = true; - treeFiles.Enabled = true; - Workers.Finished -= CleanFilesFinished; - Workers.UpdateProgress -= UpdateFileProgress; - Workers.UpdateProgress2 -= UpdateFileProgress2; - lblProgressFiles1.Text = ""; - prgProgressFiles1.Visible = false; - lblProgressFiles2.Text = ""; - prgProgressFiles2.Visible = false; - btnSettings.Enabled = true; - mnuCompress.Enabled = true; - btnQuit.Enabled = true; - mnuFile.Enabled = true; - if(thdCleanFiles != null) thdCleanFiles = null; + btnCleanFiles.Visible = true; + btnToggleCrack.Visible = true; + btnScanWithClamd.Visible = true; + btnScanAllPending.Visible = true; + btnCheckInVirusTotal.Visible = true; + tabApps.Enabled = true; + treeFiles.Enabled = true; + Workers.Finished -= CleanFilesFinished; + Workers.UpdateProgress -= UpdateFileProgress; + Workers.UpdateProgress2 -= UpdateFileProgress2; + lblProgressFiles1.Text = ""; + prgProgressFiles1.Visible = false; + lblProgressFiles2.Text = ""; + prgProgressFiles2.Visible = false; + btnSettings.Enabled = true; + mnuCompress.Enabled = true; + btnQuit.Enabled = true; + mnuFile.Enabled = true; + if(thdCleanFiles != null) thdCleanFiles = null; OnBtnPopulateFilesClicked(null, new EventArgs()); });