mirror of
https://github.com/claunia/apprepodbmgr.git
synced 2025-12-16 19:24:42 +00:00
Refactor
This commit is contained in:
@@ -25,8 +25,8 @@
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
|
||||
@@ -246,7 +246,8 @@ namespace apprepodbmgr.Core
|
||||
counter = 0;
|
||||
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);
|
||||
|
||||
|
||||
@@ -32,14 +32,14 @@ namespace apprepodbmgr.Core
|
||||
{
|
||||
public static partial class Workers
|
||||
{
|
||||
public delegate void AddAppDelegate(DbEntry os);
|
||||
|
||||
public delegate void AddFileDelegate(DbFile file);
|
||||
|
||||
public delegate void AddFileForAppDelegate(string filename, string hash, bool known, bool isCrack);
|
||||
|
||||
public delegate void AddFilesDelegate(List<DbFile> file);
|
||||
|
||||
public delegate void AddAppDelegate(DbEntry os);
|
||||
|
||||
public delegate void FailedDelegate(string text);
|
||||
|
||||
public delegate void FinishedWithoutErrorDelegate();
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using apprepodbmgr.Core;
|
||||
using Eto;
|
||||
@@ -41,11 +42,11 @@ namespace apprepodbmgr.Eto.Desktop
|
||||
Context.CheckUnar();
|
||||
if(Settings.Current.UseAntivirus)
|
||||
{
|
||||
if(Settings.Current.UseClamd)
|
||||
Workers.InitClamd();
|
||||
if(Settings.Current.UseClamd) Workers.InitClamd();
|
||||
if(Settings.Current.UseVirusTotal)
|
||||
Context.VirusTotalEnabled = Workers.InitVirusTotal(Settings.Current.VirusTotalKey);
|
||||
}
|
||||
|
||||
Context.UsableDotNetZip = !Platform.Detect.IsMac && !Platform.Detect.IsIos;
|
||||
|
||||
new Application(Platform.Detect).Run(new frmMain());
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
|
||||
@@ -46,9 +46,10 @@ namespace apprepodbmgr.Eto
|
||||
{
|
||||
public delegate void OnAddedAppDelegate(DbEntry app);
|
||||
|
||||
ObservableCollection<DBEntryForEto> appView;
|
||||
|
||||
ObservableCollection<FileEntry> fileView;
|
||||
int knownFiles;
|
||||
ObservableCollection<DBEntryForEto> appView;
|
||||
bool stopped;
|
||||
Thread thdAddFiles;
|
||||
Thread thdCheckFiles;
|
||||
|
||||
@@ -40,16 +40,16 @@ namespace apprepodbmgr.Eto
|
||||
public class frmMain : Form
|
||||
{
|
||||
int infectedFiles;
|
||||
ObservableCollection<DbFile> lstFiles;
|
||||
|
||||
ObservableCollection<DBEntryForEto> lstApps;
|
||||
ObservableCollection<DbFile> lstFiles;
|
||||
DbFile outIter;
|
||||
bool populatingFiles;
|
||||
bool scanningFiles;
|
||||
Thread thdCleanFiles;
|
||||
Thread thdCompressTo;
|
||||
Thread thdPopulateFiles;
|
||||
Thread thdPopulateApps;
|
||||
Thread thdPopulateFiles;
|
||||
Thread thdSaveAs;
|
||||
Thread thdScanFile;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user