This commit is contained in:
2018-02-23 03:42:57 +00:00
parent 46e86ef1b2
commit cc26497093
13 changed files with 83 additions and 80 deletions

View File

@@ -25,8 +25,8 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// //
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes. // Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project. // Change them to the values specific to your project.

View File

@@ -246,7 +246,8 @@ namespace apprepodbmgr.Core
counter = 0; counter = 0;
foreach(KeyValuePair<string, DbAppFile> kvp in Context.Hashes) foreach(KeyValuePair<string, DbAppFile> kvp in Context.Hashes)
{ {
UpdateProgress?.Invoke(null, "Adding files to application in database", counter, Context.Hashes.Count); UpdateProgress?.Invoke(null, "Adding files to application in database", counter,
Context.Hashes.Count);
dbCore.DbOps.AddFileToApp(kvp.Value, Context.DbInfo.Id); dbCore.DbOps.AddFileToApp(kvp.Value, Context.DbInfo.Id);

View File

@@ -32,14 +32,14 @@ namespace apprepodbmgr.Core
{ {
public static partial class Workers public static partial class Workers
{ {
public delegate void AddAppDelegate(DbEntry os);
public delegate void AddFileDelegate(DbFile file); public delegate void AddFileDelegate(DbFile file);
public delegate void AddFileForAppDelegate(string filename, string hash, bool known, bool isCrack); public delegate void AddFileForAppDelegate(string filename, string hash, bool known, bool isCrack);
public delegate void AddFilesDelegate(List<DbFile> file); public delegate void AddFilesDelegate(List<DbFile> file);
public delegate void AddAppDelegate(DbEntry os);
public delegate void FailedDelegate(string text); public delegate void FailedDelegate(string text);
public delegate void FinishedWithoutErrorDelegate(); public delegate void FinishedWithoutErrorDelegate();

View File

@@ -25,6 +25,7 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// //
using System; using System;
using apprepodbmgr.Core; using apprepodbmgr.Core;
using Eto; using Eto;
@@ -41,11 +42,11 @@ namespace apprepodbmgr.Eto.Desktop
Context.CheckUnar(); Context.CheckUnar();
if(Settings.Current.UseAntivirus) if(Settings.Current.UseAntivirus)
{ {
if(Settings.Current.UseClamd) if(Settings.Current.UseClamd) Workers.InitClamd();
Workers.InitClamd();
if(Settings.Current.UseVirusTotal) if(Settings.Current.UseVirusTotal)
Context.VirusTotalEnabled = Workers.InitVirusTotal(Settings.Current.VirusTotalKey); Context.VirusTotalEnabled = Workers.InitVirusTotal(Settings.Current.VirusTotalKey);
} }
Context.UsableDotNetZip = !Platform.Detect.IsMac && !Platform.Detect.IsIos; Context.UsableDotNetZip = !Platform.Detect.IsMac && !Platform.Detect.IsIos;
new Application(Platform.Detect).Run(new frmMain()); new Application(Platform.Detect).Run(new frmMain());

View File

@@ -25,8 +25,8 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// //
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes. // Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project. // Change them to the values specific to your project.

View File

@@ -25,8 +25,8 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// //
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes. // Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project. // Change them to the values specific to your project.

View File

@@ -46,9 +46,10 @@ namespace apprepodbmgr.Eto
{ {
public delegate void OnAddedAppDelegate(DbEntry app); public delegate void OnAddedAppDelegate(DbEntry app);
ObservableCollection<DBEntryForEto> appView;
ObservableCollection<FileEntry> fileView; ObservableCollection<FileEntry> fileView;
int knownFiles; int knownFiles;
ObservableCollection<DBEntryForEto> appView;
bool stopped; bool stopped;
Thread thdAddFiles; Thread thdAddFiles;
Thread thdCheckFiles; Thread thdCheckFiles;

View File

@@ -40,16 +40,16 @@ namespace apprepodbmgr.Eto
public class frmMain : Form public class frmMain : Form
{ {
int infectedFiles; int infectedFiles;
ObservableCollection<DbFile> lstFiles;
ObservableCollection<DBEntryForEto> lstApps; ObservableCollection<DBEntryForEto> lstApps;
ObservableCollection<DbFile> lstFiles;
DbFile outIter; DbFile outIter;
bool populatingFiles; bool populatingFiles;
bool scanningFiles; bool scanningFiles;
Thread thdCleanFiles; Thread thdCleanFiles;
Thread thdCompressTo; Thread thdCompressTo;
Thread thdPopulateFiles;
Thread thdPopulateApps; Thread thdPopulateApps;
Thread thdPopulateFiles;
Thread thdSaveAs; Thread thdSaveAs;
Thread thdScanFile; Thread thdScanFile;