diff --git a/.idea/.idea.apprepodbmgr/.idea/contentModel.xml b/.idea/.idea.apprepodbmgr/.idea/contentModel.xml
index 06c7972..f51bf47 100644
--- a/.idea/.idea.apprepodbmgr/.idea/contentModel.xml
+++ b/.idea/.idea.apprepodbmgr/.idea/contentModel.xml
@@ -597,17 +597,7 @@
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/apprepodbmgr.Core/Context.cs b/apprepodbmgr.Core/Context.cs
index 9606aac..c9938b3 100644
--- a/apprepodbmgr.Core/Context.cs
+++ b/apprepodbmgr.Core/Context.cs
@@ -40,7 +40,7 @@ namespace apprepodbmgr.Core
public static List Files;
public static List Folders;
public static List Symlinks;
- public static Dictionary Hashes;
+ public static Dictionary Hashes;
public static Dictionary FoldersDict;
public static Dictionary SymlinksDict;
public static string Path;
diff --git a/apprepodbmgr.Core/DBOps.cs b/apprepodbmgr.Core/DBOps.cs
index 1a2d5b7..95a1d70 100644
--- a/apprepodbmgr.Core/DBOps.cs
+++ b/apprepodbmgr.Core/DBOps.cs
@@ -67,7 +67,7 @@ namespace apprepodbmgr.Core
public long Length { get; set; }
}
- public struct DbOsFile
+ public struct DbAppFile
{
public ulong Id;
public string Path;
@@ -101,11 +101,11 @@ namespace apprepodbmgr.Core
dbCore = core;
}
- public bool GetAllOSes(out List entries)
+ public bool GetAllApps(out List entries)
{
entries = new List();
- const string SQL = "SELECT * from oses";
+ const string SQL = "SELECT * from apps";
IDbCommand dbcmd = dbCon.CreateCommand();
IDbDataAdapter dataAdapter = dbCore.GetNewDataAdapter();
@@ -145,7 +145,7 @@ namespace apprepodbmgr.Core
return true;
}
- IDbCommand GetOsCommand(DbEntry entry)
+ IDbCommand GetAppCommand(DbEntry entry)
{
IDbCommand dbcmd = dbCon.CreateCommand();
@@ -241,14 +241,14 @@ namespace apprepodbmgr.Core
return dbcmd;
}
- public bool AddOs(DbEntry entry, out long id)
+ public bool AddApp(DbEntry entry, out long id)
{
- IDbCommand dbcmd = GetOsCommand(entry);
+ IDbCommand dbcmd = GetAppCommand(entry);
IDbTransaction trans = dbCon.BeginTransaction();
dbcmd.Transaction = trans;
const string SQL =
- "INSERT INTO oses (developer, product, version, languages, architecture, machine, format, description, oem, upgrade, `update`, source, files, netinstall, xml, json, mdid)" +
+ "INSERT INTO apps (developer, product, version, languages, architecture, machine, format, description, oem, upgrade, `update`, source, files, netinstall, xml, json, mdid)" +
" VALUES (@developer, @product, @version, @languages, @architecture, @machine, @format, @description, @oem, @upgrade, @update, @source, @files, @netinstall, @xml, @json, @mdid)";
dbcmd.CommandText = SQL;
@@ -501,7 +501,7 @@ namespace apprepodbmgr.Core
return true;
}
- IDbCommand GetOsFileCommand(DbOsFile person)
+ IDbCommand GetAppFileCommand(DbAppFile person)
{
IDbCommand dbcmd = dbCon.CreateCommand();
@@ -548,14 +548,14 @@ namespace apprepodbmgr.Core
return dbcmd;
}
- public bool AddFileToOs(DbOsFile file, long os)
+ public bool AddFileToApp(DbAppFile file, long app)
{
- IDbCommand dbcmd = GetOsFileCommand(file);
+ IDbCommand dbcmd = GetAppFileCommand(file);
IDbTransaction trans = dbCon.BeginTransaction();
dbcmd.Transaction = trans;
string sql =
- $"INSERT INTO `os_{os}` (`path`, `sha256`, `length`, `creation`, `access`, `modification`, `attributes`)" +
+ $"INSERT INTO `app_{app}` (`path`, `sha256`, `length`, `creation`, `access`, `modification`, `attributes`)" +
" VALUES (@path, @sha256, @length, @creation, @access, @modification, @attributes)";
dbcmd.CommandText = sql;
@@ -567,7 +567,7 @@ namespace apprepodbmgr.Core
return true;
}
- IDbCommand GetFolderCommand(DbFolder person)
+ IDbCommand GetFolderCommand(DbFolder folder)
{
IDbCommand dbcmd = dbCon.CreateCommand();
@@ -589,11 +589,11 @@ namespace apprepodbmgr.Core
param6.DbType = DbType.String;
param7.DbType = DbType.Int32;
- param1.Value = person.Path;
- param4.Value = person.CreationTimeUtc.ToString("yyyy-MM-dd HH:mm");
- param5.Value = person.LastAccessTimeUtc.ToString("yyyy-MM-dd HH:mm");
- param6.Value = person.LastWriteTimeUtc.ToString("yyyy-MM-dd HH:mm");
- param7.Value = (int)person.Attributes;
+ param1.Value = folder.Path;
+ param4.Value = folder.CreationTimeUtc.ToString("yyyy-MM-dd HH:mm");
+ param5.Value = folder.LastAccessTimeUtc.ToString("yyyy-MM-dd HH:mm");
+ param6.Value = folder.LastWriteTimeUtc.ToString("yyyy-MM-dd HH:mm");
+ param7.Value = (int)folder.Attributes;
dbcmd.Parameters.Add(param1);
dbcmd.Parameters.Add(param4);
@@ -604,86 +604,32 @@ namespace apprepodbmgr.Core
return dbcmd;
}
- public bool AddFolderToOs(DbFolder folder, long os)
+ public bool AddFolderToApp(DbFolder folder, long app)
{
IDbCommand dbcmd = GetFolderCommand(folder);
IDbTransaction trans = dbCon.BeginTransaction();
dbcmd.Transaction = trans;
- string sql = $"INSERT INTO `os_{os}_folders` (`path`, `creation`, `access`, `modification`, `attributes`)" +
- " VALUES (@path, @creation, @access, @modification, @attributes)";
-
- dbcmd.CommandText = sql;
-
- dbcmd.ExecuteNonQuery();
- trans.Commit();
- dbcmd.Dispose();
-
- return true;
- }
-
- public bool RemoveOs(long id)
- {
- IDbCommand dbcmd = dbCon.CreateCommand();
- IDbTransaction trans = dbCon.BeginTransaction();
- dbcmd.Transaction = trans;
-
- string sql = $"DROP TABLE IF EXISTS `os_{id}`;";
-
- dbcmd.CommandText = sql;
-
- dbcmd.ExecuteNonQuery();
- trans.Commit();
- dbcmd.Dispose();
-
- dbcmd = dbCon.CreateCommand();
- trans = dbCon.BeginTransaction();
- dbcmd.Transaction = trans;
-
- sql = $"DROP TABLE IF EXISTS `os_{id}_folders`;";
-
- dbcmd.CommandText = sql;
-
- dbcmd.ExecuteNonQuery();
- trans.Commit();
- dbcmd.Dispose();
-
- dbcmd = dbCon.CreateCommand();
- trans = dbCon.BeginTransaction();
- dbcmd.Transaction = trans;
-
- sql = $"DROP TABLE IF EXISTS `os_{id}_symlinks`;";
-
- dbcmd.CommandText = sql;
-
- dbcmd.ExecuteNonQuery();
- trans.Commit();
- dbcmd.Dispose();
-
- dbcmd = dbCon.CreateCommand();
- trans = dbCon.BeginTransaction();
- dbcmd.Transaction = trans;
-
- sql = $"DELETE FROM oses WHERE id = '{id}';";
-
- dbcmd.CommandText = sql;
-
- dbcmd.ExecuteNonQuery();
- trans.Commit();
- dbcmd.Dispose();
-
- return true;
- }
-
- public bool CreateTableForOs(long id)
- {
- IDbCommand dbcmd = dbCon.CreateCommand();
- IDbTransaction trans = dbCon.BeginTransaction();
- dbcmd.Transaction = trans;
-
string sql =
- string.Format("DROP TABLE IF EXISTS `os_{0}`;\n\n" + "CREATE TABLE IF NOT EXISTS `os_{0}` (\n" + " `id` INTEGER PRIMARY KEY AUTOINCREMENT,\n" + " `path` VARCHAR(8192) NOT NULL,\n" + " `sha256` VARCHAR(64) NOT NULL,\n\n" + " `length` BIGINT NOT NULL,\n" + " `creation` DATETIME NULL,\n" + " `access` DATETIME NULL,\n" + " `modification` DATETIME NULL,\n" + " `attributes` INTEGER NULL);\n\n" + "CREATE UNIQUE INDEX `os_{0}_id_UNIQUE` ON `os_{0}` (`id` ASC);\n\n" + "CREATE INDEX `os_{0}_path_idx` ON `os_{0}` (`path` ASC);",
- id);
+ $"INSERT INTO `app_{app}_folders` (`path`, `creation`, `access`, `modification`, `attributes`)" +
+ " VALUES (@path, @creation, @access, @modification, @attributes)";
+
+ dbcmd.CommandText = sql;
+
+ dbcmd.ExecuteNonQuery();
+ trans.Commit();
+ dbcmd.Dispose();
+
+ return true;
+ }
+
+ public bool RemoveApp(long id)
+ {
+ IDbCommand dbcmd = dbCon.CreateCommand();
+ IDbTransaction trans = dbCon.BeginTransaction();
+ dbcmd.Transaction = trans;
+
+ string sql = $"DROP TABLE IF EXISTS `app_{id}`;";
dbcmd.CommandText = sql;
@@ -695,9 +641,31 @@ namespace apprepodbmgr.Core
trans = dbCon.BeginTransaction();
dbcmd.Transaction = trans;
- sql =
- string.Format("DROP TABLE IF EXISTS `os_{0}_folders`;\n\n" + "CREATE TABLE IF NOT EXISTS `os_{0}_folders` (\n" + " `id` INTEGER PRIMARY KEY AUTOINCREMENT,\n" + " `path` VARCHAR(8192) NOT NULL,\n" + " `creation` DATETIME NULL,\n" + " `access` DATETIME NULL,\n" + " `modification` DATETIME NULL,\n" + " `attributes` INTEGER NULL);\n\n" + "CREATE UNIQUE INDEX `os_{0}_folders_id_UNIQUE` ON `os_{0}_folders` (`id` ASC);\n\n" + "CREATE INDEX `os_{0}_folders_path_idx` ON `os_{0}_folders` (`path` ASC);",
- id);
+ sql = $"DROP TABLE IF EXISTS `app_{id}_folders`;";
+
+ dbcmd.CommandText = sql;
+
+ dbcmd.ExecuteNonQuery();
+ trans.Commit();
+ dbcmd.Dispose();
+
+ dbcmd = dbCon.CreateCommand();
+ trans = dbCon.BeginTransaction();
+ dbcmd.Transaction = trans;
+
+ sql = $"DROP TABLE IF EXISTS `app_{id}_symlinks`;";
+
+ dbcmd.CommandText = sql;
+
+ dbcmd.ExecuteNonQuery();
+ trans.Commit();
+ dbcmd.Dispose();
+
+ dbcmd = dbCon.CreateCommand();
+ trans = dbCon.BeginTransaction();
+ dbcmd.Transaction = trans;
+
+ sql = $"DELETE FROM apps WHERE id = '{id}';";
dbcmd.CommandText = sql;
@@ -708,7 +676,56 @@ namespace apprepodbmgr.Core
return true;
}
- public bool ExistsFileInOs(string hash, long osId)
+ public bool CreateTableForApp(long id)
+ {
+ IDbCommand dbcmd = dbCon.CreateCommand();
+ IDbTransaction trans = dbCon.BeginTransaction();
+ dbcmd.Transaction = trans;
+
+ string sql = $"DROP TABLE IF EXISTS `app_{id}`;\n\n" +
+ $"CREATE TABLE IF NOT EXISTS `app_{id}` (\n" +
+ " `id` INTEGER PRIMARY KEY AUTOINCREMENT,\n" +
+ " `path` VARCHAR(8192) NOT NULL,\n" +
+ " `sha256` VARCHAR(64) NOT NULL,\n\n" +
+ " `length` BIGINT NOT NULL,\n" +
+ " `creation` DATETIME NULL,\n" +
+ " `access` DATETIME NULL,\n" +
+ " `modification` DATETIME NULL,\n" +
+ " `attributes` INTEGER NULL);\n\n" +
+ $"CREATE UNIQUE INDEX `app_{id}_id_UNIQUE` ON `app_{id}` (`id` ASC);\n\n" +
+ $"CREATE INDEX `app_{id}_path_idx` ON `app_{id}` (`path` ASC);";
+
+ dbcmd.CommandText = sql;
+
+ dbcmd.ExecuteNonQuery();
+ trans.Commit();
+ dbcmd.Dispose();
+
+ dbcmd = dbCon.CreateCommand();
+ trans = dbCon.BeginTransaction();
+ dbcmd.Transaction = trans;
+
+ sql = $"DROP TABLE IF EXISTS `os_{id}_folders`;\n\n" +
+ $"CREATE TABLE IF NOT EXISTS `os_{id}_folders` (\n" +
+ " `id` INTEGER PRIMARY KEY AUTOINCREMENT,\n" +
+ " `path` VARCHAR(8192) NOT NULL,\n" +
+ " `creation` DATETIME NULL,\n" +
+ " `access` DATETIME NULL,\n" +
+ " `modification` DATETIME NULL,\n" +
+ " `attributes` INTEGER NULL);\n\n" +
+ $"CREATE UNIQUE INDEX `os_{id}_folders_id_UNIQUE` ON `os_{id}_folders` (`id` ASC);\n\n" +
+ $"CREATE INDEX `os_{id}_folders_path_idx` ON `os_{id}_folders` (`path` ASC);";
+
+ dbcmd.CommandText = sql;
+
+ dbcmd.ExecuteNonQuery();
+ trans.Commit();
+ dbcmd.Dispose();
+
+ return true;
+ }
+
+ public bool ExistsFileInApp(string hash, long appId)
{
IDbCommand dbcmd = dbCon.CreateCommand();
IDbDataParameter param1 = dbcmd.CreateParameter();
@@ -717,7 +734,7 @@ namespace apprepodbmgr.Core
param1.DbType = DbType.String;
param1.Value = hash;
dbcmd.Parameters.Add(param1);
- dbcmd.CommandText = $"SELECT * FROM `os_{osId}` WHERE sha256 = @hash";
+ dbcmd.CommandText = $"SELECT * FROM `app_{appId}` WHERE sha256 = @hash";
DataSet dataSet = new DataSet();
IDbDataAdapter dataAdapter = dbCore.GetNewDataAdapter();
dataAdapter.SelectCommand = dbcmd;
@@ -738,7 +755,7 @@ namespace apprepodbmgr.Core
param1.DbType = DbType.String;
param1.Value = mdid;
dbcmd.Parameters.Add(param1);
- dbcmd.CommandText = "SELECT * FROM `oses` WHERE mdid = @mdid";
+ dbcmd.CommandText = "SELECT * FROM `apps` WHERE mdid = @mdid";
DataSet dataSet = new DataSet();
IDbDataAdapter dataAdapter = dbCore.GetNewDataAdapter();
dataAdapter.SelectCommand = dbcmd;
@@ -750,11 +767,11 @@ namespace apprepodbmgr.Core
return false;
}
- public bool GetAllFilesInOs(out List entries, long id)
+ public bool GetAllFilesInApp(out List entries, long id)
{
- entries = new List();
+ entries = new List();
- string sql = $"SELECT * from os_{id}";
+ string sql = $"SELECT * from app_{id}";
IDbCommand dbcmd = dbCon.CreateCommand();
IDbDataAdapter dataAdapter = dbCore.GetNewDataAdapter();
@@ -766,7 +783,7 @@ namespace apprepodbmgr.Core
foreach(DataRow dRow in dataTable.Rows)
{
- DbOsFile fEntry = new DbOsFile
+ DbAppFile fEntry = new DbAppFile
{
Id = ulong.Parse(dRow["id"].ToString()),
Path = dRow["path"].ToString(),
@@ -788,7 +805,7 @@ namespace apprepodbmgr.Core
{
entries = new List();
- string sql = $"SELECT * from os_{id}_folders";
+ string sql = $"SELECT * from app_{id}_folders";
IDbCommand dbcmd = dbCon.CreateCommand();
IDbDataAdapter dataAdapter = dbCore.GetNewDataAdapter();
@@ -854,11 +871,11 @@ namespace apprepodbmgr.Core
return true;
}
- public bool HasSymlinks(long osId)
+ public bool HasSymlinks(long appId)
{
IDbCommand dbcmd = dbCon.CreateCommand();
dbcmd.CommandText =
- $"SELECT COUNT(*) FROM sqlite_master WHERE type = 'table' AND name = 'os_{osId}_symlinks'";
+ $"SELECT COUNT(*) FROM sqlite_master WHERE type = 'table' AND name = 'app_{appId}_symlinks'";
object count = dbcmd.ExecuteScalar();
dbcmd.Dispose();
@@ -871,11 +888,13 @@ namespace apprepodbmgr.Core
IDbTransaction trans = dbCon.BeginTransaction();
dbcmd.Transaction = trans;
- string sql =
- string.Format("DROP TABLE IF EXISTS `os_{0}_symlinks`;\n\n" + "CREATE TABLE IF NOT EXISTS `os_{0}_symlinks` (\n" + " `path` VARCHAR(8192) PRIMARY KEY,\n" + " `target` VARCHAR(8192) NOT NULL);\n\n" + "CREATE UNIQUE INDEX `os_{0}_symlinks_path_UNIQUE` ON `os_{0}_symlinks` (`path` ASC);\n\n" + "CREATE INDEX `os_{0}_symlinks_target_idx` ON `os_{0}_symlinks` (`target` ASC);",
- id);
-
- dbcmd.CommandText = sql;
+ dbcmd.CommandText =
+ $"DROP TABLE IF EXISTS `app_{id}_symlinks`;\n\n" +
+ $"CREATE TABLE IF NOT EXISTS `app_{id}_symlinks` (\n" +
+ " `path` VARCHAR(8192) PRIMARY KEY,\n" +
+ " `target` VARCHAR(8192) NOT NULL);\n\n" +
+ $"CREATE UNIQUE INDEX `app_{id}_symlinks_path_UNIQUE` ON `app_{id}_symlinks` (`path` ASC);\n\n" +
+ $"CREATE INDEX `app_{id}_symlinks_target_idx` ON `app_{id}_symlinks` (`target` ASC);";
dbcmd.ExecuteNonQuery();
trans.Commit();
@@ -884,7 +903,7 @@ namespace apprepodbmgr.Core
return true;
}
- public bool AddSymlinkToOs(string path, string target, long os)
+ public bool AddSymlinkToApp(string path, string target, long app)
{
IDbCommand dbcmd = dbCon.CreateCommand();
@@ -906,7 +925,7 @@ namespace apprepodbmgr.Core
IDbTransaction trans = dbCon.BeginTransaction();
dbcmd.Transaction = trans;
- string sql = $"INSERT INTO `os_{os}_symlinks` (`path`, `target`)" + " VALUES (@path, @target)";
+ string sql = $"INSERT INTO `app_{app}_symlinks` (`path`, `target`)" + " VALUES (@path, @target)";
dbcmd.CommandText = sql;
@@ -921,7 +940,7 @@ namespace apprepodbmgr.Core
{
entries = new Dictionary();
- string sql = $"SELECT * from os_{id}_symlinks";
+ string sql = $"SELECT * from app_{id}_symlinks";
IDbCommand dbcmd = dbCon.CreateCommand();
IDbDataAdapter dataAdapter = dbCore.GetNewDataAdapter();
diff --git a/apprepodbmgr.Core/SQLite.cs b/apprepodbmgr.Core/SQLite.cs
index 7d768f8..fb6d39c 100644
--- a/apprepodbmgr.Core/SQLite.cs
+++ b/apprepodbmgr.Core/SQLite.cs
@@ -105,9 +105,9 @@ namespace apprepodbmgr.Core
dbCmd.ExecuteNonQuery();
#if DEBUG
- Console.WriteLine("Creating oses table");
+ Console.WriteLine("Creating applications table");
#endif
- dbCmd.CommandText = Schema.OSesTableSql;
+ dbCmd.CommandText = Schema.AppsTableSql;
dbCmd.ExecuteNonQuery();
#if DEBUG
diff --git a/apprepodbmgr.Core/Schema.cs b/apprepodbmgr.Core/Schema.cs
index 6094890..a0cac17 100644
--- a/apprepodbmgr.Core/Schema.cs
+++ b/apprepodbmgr.Core/Schema.cs
@@ -49,11 +49,11 @@ namespace apprepodbmgr.Core
"CREATE INDEX `files_virus_idx` ON `files` (`virus` ASC);\n\n" +
"CREATE INDEX `files_length_idx` ON `files` (`length` ASC);";
- public const string OSesTableSql = "-- -----------------------------------------------------\n" +
- "-- Table `oses`\n" +
+ public const string AppsTableSql = "-- -----------------------------------------------------\n" +
+ "-- Table `apps`\n" +
"-- -----------------------------------------------------\n" +
- "DROP TABLE IF EXISTS `oses` ;\n\n" +
- "CREATE TABLE IF NOT EXISTS `oses` (\n" +
+ "DROP TABLE IF EXISTS `apps` ;\n\n" +
+ "CREATE TABLE IF NOT EXISTS `apps` (\n" +
" `id` INTEGER PRIMARY KEY AUTOINCREMENT,\n" +
" `mdid` CHAR(40) NOT NULL,\n" +
" `developer` VARCHAR(45) NOT NULL,\n" +
@@ -72,14 +72,14 @@ namespace apprepodbmgr.Core
" `netinstall` BOOLEAN NOT NULL,\n" +
" `xml` BLOB NULL,\n" +
" `json` BLOB NULL);\n\n" +
- "CREATE UNIQUE INDEX `oses_id_UNIQUE` ON `oses` (`id` ASC);\n\n" +
- "CREATE UNIQUE INDEX `oses_mdid_UNIQUE` ON `oses` (`mdid` ASC);\n\n" +
- "CREATE INDEX `oses_developer_idx` ON `oses` (`developer` ASC);\n\n" +
- "CREATE INDEX `oses_product_idx` ON `oses` (`product` ASC);\n\n" +
- "CREATE INDEX `oses_version_idx` ON `oses` (`version` ASC);\n\n" +
- "CREATE INDEX `oses_architecture_idx` ON `oses` (`architecture` ASC);\n\n" +
- "CREATE INDEX `oses_format_idx` ON `oses` (`format` ASC);\n\n" +
- "CREATE INDEX `oses_machine_idx` ON `oses` (`machine` ASC);\n\n" +
- "CREATE INDEX `oses_description_idx` ON `oses` (`description` ASC);";
+ "CREATE UNIQUE INDEX `apps_id_UNIQUE` ON `apps` (`id` ASC);\n\n" +
+ "CREATE UNIQUE INDEX `apps_mdid_UNIQUE` ON `apps` (`mdid` ASC);\n\n" +
+ "CREATE INDEX `apps_developer_idx` ON `apps` (`developer` ASC);\n\n" +
+ "CREATE INDEX `apps_product_idx` ON `apps` (`product` ASC);\n\n" +
+ "CREATE INDEX `apps_version_idx` ON `apps` (`version` ASC);\n\n" +
+ "CREATE INDEX `apps_architecture_idx` ON `apps` (`architecture` ASC);\n\n" +
+ "CREATE INDEX `apps_format_idx` ON `apps` (`format` ASC);\n\n" +
+ "CREATE INDEX `apps_machine_idx` ON `apps` (`machine` ASC);\n\n" +
+ "CREATE INDEX `apps_description_idx` ON `apps` (`description` ASC);";
}
}
\ No newline at end of file
diff --git a/apprepodbmgr.Core/Settings.cs b/apprepodbmgr.Core/Settings.cs
index 241f50f..7658c7b 100644
--- a/apprepodbmgr.Core/Settings.cs
+++ b/apprepodbmgr.Core/Settings.cs
@@ -102,7 +102,7 @@ namespace apprepodbmgr.Core
? ((NSString)obj).ToString()
: Path
.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
- "osrepo");
+ "apprepo");
Current.UnArchiverPath = parsedPreferences.TryGetValue("UnArchiverPath", out obj)
? ((NSString)obj).ToString()
@@ -166,7 +166,7 @@ namespace apprepodbmgr.Core
return;
}
- RegistryKey key = parentKey.OpenSubKey("OSRepoDBMgr");
+ RegistryKey key = parentKey.OpenSubKey("AppRepoDBMgr");
if(key == null)
{
SetDefaultSettings();
@@ -195,7 +195,7 @@ namespace apprepodbmgr.Core
string configPath =
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config");
string settingsPath =
- Path.Combine(configPath, "OSRepoDBMgr.xml");
+ Path.Combine(configPath, "AppRepoDBMgr.xml");
if(!Directory.Exists(configPath))
{
@@ -269,7 +269,7 @@ namespace apprepodbmgr.Core
RegistryKey parentKey = Registry
.CurrentUser.OpenSubKey("SOFTWARE", true)
?.CreateSubKey("Canary Islands Computer Museum");
- RegistryKey key = parentKey?.CreateSubKey("OSRepoDBMgr");
+ RegistryKey key = parentKey?.CreateSubKey("AppRepoDBMgr");
if(key != null)
{
@@ -294,7 +294,7 @@ namespace apprepodbmgr.Core
string configPath =
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config");
string settingsPath =
- Path.Combine(configPath, "OSRepoDBMgr.xml");
+ Path.Combine(configPath, "AppRepoDBMgr.xml");
if(!Directory.Exists(configPath)) Directory.CreateDirectory(configPath);
@@ -322,7 +322,7 @@ namespace apprepodbmgr.Core
DatabasePath =
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "apprepodbmgr.db"),
RepositoryPath =
- Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "osrepo"),
+ Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "apprepo"),
UnArchiverPath = null,
CompressionAlgorithm = AlgoEnum.GZip,
UseAntivirus = false,
diff --git a/apprepodbmgr.Core/Workers/Compression.cs b/apprepodbmgr.Core/Workers/Compression.cs
index 47b4f84..ac85142 100644
--- a/apprepodbmgr.Core/Workers/Compression.cs
+++ b/apprepodbmgr.Core/Workers/Compression.cs
@@ -133,17 +133,17 @@ namespace apprepodbmgr.Core
{
if(File.Exists(destination))
{
- Failed?.Invoke("OS already exists.");
+ Failed?.Invoke("Application already exists.");
return;
}
- Failed?.Invoke("OS already exists in the database but not in the repository, check for inconsistencies.");
+ Failed?.Invoke("Application already exists in the database but not in the repository, check for inconsistencies.");
return;
}
if(File.Exists(destination))
{
- Failed?.Invoke("OS already exists in the repository but not in the database, check for inconsistencies.");
+ Failed?.Invoke("Application already exists in the repository but not in the database, check for inconsistencies.");
return;
}
@@ -174,12 +174,12 @@ namespace apprepodbmgr.Core
}
long totalSize = 0, currentSize = 0;
- foreach(KeyValuePair file in Context.Hashes) totalSize += file.Value.Length;
+ foreach(KeyValuePair file in Context.Hashes) totalSize += file.Value.Length;
#if DEBUG
stopwatch.Restart();
#endif
- foreach(KeyValuePair file in Context.Hashes)
+ foreach(KeyValuePair file in Context.Hashes)
{
UpdateProgress?.Invoke("Compressing...", file.Value.Path, currentSize, totalSize);
@@ -291,7 +291,7 @@ namespace apprepodbmgr.Core
jms.Position = 0;
}
- FinishedWithText?.Invoke($"Correctly added operating system with MDID {mdid}");
+ FinishedWithText?.Invoke($"Correctly added application with MDID {mdid}");
}
catch(ThreadAbortException) { }
catch(Exception ex)
@@ -613,7 +613,7 @@ namespace apprepodbmgr.Core
UpdateProgress?.Invoke("", "Asking DB for files...", 1, 100);
- dbCore.DbOps.GetAllFilesInOs(out List files, Context.DbInfo.Id);
+ dbCore.DbOps.GetAllFilesInApp(out List files, Context.DbInfo.Id);
UpdateProgress?.Invoke("", "Asking DB for folders...", 2, 100);
@@ -645,11 +645,11 @@ namespace apprepodbmgr.Core
#endif
counter = 3;
- Context.Hashes = new Dictionary();
+ Context.Hashes = new Dictionary();
#if DEBUG
stopwatch.Restart();
#endif
- foreach(DbOsFile file in files)
+ foreach(DbAppFile file in files)
{
UpdateProgress?.Invoke("", $"Adding {file.Path}...", counter, 3 + files.Count);
@@ -688,7 +688,7 @@ namespace apprepodbmgr.Core
static Stream Zf_HandleOpen(string entryName)
{
- DbOsFile file;
+ DbAppFile file;
if(!Context.Hashes.TryGetValue(entryName, out file))
if(!Context.Hashes.TryGetValue(entryName.Replace('/', '\\'), out file))
throw new ArgumentException("Cannot find requested zip entry in hashes dictionary");
diff --git a/apprepodbmgr.Core/Workers/Database.cs b/apprepodbmgr.Core/Workers/Database.cs
index 8b14b00..edbe61d 100644
--- a/apprepodbmgr.Core/Workers/Database.cs
+++ b/apprepodbmgr.Core/Workers/Database.cs
@@ -36,43 +36,38 @@ namespace apprepodbmgr.Core
{
public static partial class Workers
{
- public static void GetAllOSes()
+ public static void GetAllApps()
{
try
{
#if DEBUG
stopwatch.Restart();
#endif
- dbCore.DbOps.GetAllOSes(out List oses);
+ dbCore.DbOps.GetAllApps(out List apps);
#if DEBUG
stopwatch.Stop();
- Console.WriteLine("Core.GetAllOSes(): Took {0} seconds to get OSes from database",
+ Console.WriteLine("Core.GetAllApps(): Took {0} seconds to get apps from database",
stopwatch.Elapsed.TotalSeconds);
#endif
- if(AddOS != null)
+ if(AddApp != null)
{
#if DEBUG
stopwatch.Restart();
#endif
int counter = 0;
// TODO: Check file name and existence
- foreach(DbEntry os in oses)
+ foreach(DbEntry app in apps)
{
- UpdateProgress?.Invoke("Populating OSes table", $"{os.Developer} {os.Product}", counter,
- oses.Count);
- string destination = Path.Combine(Settings.Current.RepositoryPath, os.Mdid[0].ToString(),
- os.Mdid[1].ToString(), os.Mdid[2].ToString(),
- os.Mdid[3].ToString(), os.Mdid[4].ToString(), os.Mdid) +
- ".zip";
-
- AddOS?.Invoke(os);
+ UpdateProgress?.Invoke("Populating apps table", $"{app.Developer} {app.Product}", counter,
+ apps.Count);
+ AddApp?.Invoke(app);
counter++;
}
#if DEBUG
stopwatch.Stop();
- Console.WriteLine("Core.GetAllOSes(): Took {0} seconds to add OSes to the GUI",
+ Console.WriteLine("Core.GetAllApps(): Took {0} seconds to add apps to the GUI",
stopwatch.Elapsed.TotalSeconds);
#endif
}
@@ -99,23 +94,23 @@ namespace apprepodbmgr.Core
#if DEBUG
stopwatch.Restart();
#endif
- Dictionary knownFiles = new Dictionary();
+ Dictionary knownFiles = new Dictionary();
bool unknownFile = false;
- foreach(KeyValuePair kvp in Context.Hashes)
+ foreach(KeyValuePair kvp in Context.Hashes)
{
// Empty file with size zero
if(kvp.Value.Sha256 == "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")
{
- AddFileForOS(kvp.Key, kvp.Value.Sha256, true, kvp.Value.Crack);
+ AddFileForApp(kvp.Key, kvp.Value.Sha256, true, kvp.Value.Crack);
counter++;
continue;
}
UpdateProgress?.Invoke(null, "Checking files in database", counter, Context.Hashes.Count);
- AddFileForOS?.Invoke(kvp.Key, kvp.Value.Sha256, dbCore.DbOps.ExistsFile(kvp.Value.Sha256),
+ AddFileForApp?.Invoke(kvp.Key, kvp.Value.Sha256, dbCore.DbOps.ExistsFile(kvp.Value.Sha256),
kvp.Value.Crack);
if(dbCore.DbOps.ExistsFile(kvp.Value.Sha256))
@@ -137,37 +132,37 @@ namespace apprepodbmgr.Core
return;
}
- UpdateProgress?.Invoke(null, "Retrieving OSes from database", counter, Context.Hashes.Count);
- dbCore.DbOps.GetAllOSes(out List oses);
+ UpdateProgress?.Invoke(null, "Retrieving apps from database", counter, Context.Hashes.Count);
+ dbCore.DbOps.GetAllApps(out List apps);
#if DEBUG
stopwatch.Stop();
- Console.WriteLine("Core.CheckDbForFiles(): Took {0} seconds get all OSes from DB",
+ Console.WriteLine("Core.CheckDbForFiles(): Took {0} seconds get all apps from DB",
stopwatch.Elapsed.TotalSeconds);
#endif
- if(oses != null && oses.Count > 0)
+ if(apps != null && apps.Count > 0)
{
- DbEntry[] osesArray = new DbEntry[oses.Count];
- oses.CopyTo(osesArray);
+ DbEntry[] appsArray = new DbEntry[apps.Count];
+ apps.CopyTo(appsArray);
- long osCounter = 0;
+ long appCounter = 0;
#if DEBUG
stopwatch.Restart();
#endif
- foreach(DbEntry os in osesArray)
+ foreach(DbEntry app in appsArray)
{
- UpdateProgress?.Invoke(null, $"Check OS id {os.Id}", osCounter, osesArray.Length);
+ UpdateProgress?.Invoke(null, $"Check application id {app.Id}", appCounter, appsArray.Length);
counter = 0;
- foreach(KeyValuePair kvp in knownFiles)
+ foreach(KeyValuePair kvp in knownFiles)
{
UpdateProgress2?.Invoke(null, $"Checking for file {kvp.Value.Path}", counter,
knownFiles.Count);
- if(!dbCore.DbOps.ExistsFileInOs(kvp.Value.Sha256, os.Id))
+ if(!dbCore.DbOps.ExistsFileInApp(kvp.Value.Sha256, app.Id))
{
- if(oses.Contains(os)) oses.Remove(os);
+ if(apps.Contains(app)) apps.Remove(app);
// If one file is missing, the rest don't matter
break;
@@ -176,25 +171,18 @@ namespace apprepodbmgr.Core
counter++;
}
- if(oses.Count == 0) break; // No OSes left
+ if(apps.Count == 0) break; // No apps left
}
#if DEBUG
stopwatch.Stop();
- Console.WriteLine("Core.CheckDbForFiles(): Took {0} seconds correlate all files with all known OSes",
+ Console.WriteLine("Core.CheckDbForFiles(): Took {0} seconds correlate all files with all known applications",
stopwatch.Elapsed.TotalSeconds);
#endif
}
- if(AddOS != null)
- foreach(DbEntry os in oses)
- {
- string destination = Path.Combine(Settings.Current.RepositoryPath, os.Mdid[0].ToString(),
- os.Mdid[1].ToString(), os.Mdid[2].ToString(),
- os.Mdid[3].ToString(), os.Mdid[4].ToString(), os.Mdid) +
- ".zip";
-
- AddOS?.Invoke(os);
- }
+ if(AddApp != null)
+ foreach(DbEntry app in apps)
+ AddApp?.Invoke(app);
Finished?.Invoke();
}
@@ -218,7 +206,7 @@ namespace apprepodbmgr.Core
#if DEBUG
stopwatch.Restart();
#endif
- foreach(KeyValuePair kvp in Context.Hashes)
+ foreach(KeyValuePair kvp in Context.Hashes)
{
UpdateProgress?.Invoke(null, "Adding files to database", counter, Context.Hashes.Count);
@@ -247,36 +235,36 @@ namespace apprepodbmgr.Core
stopwatch.Elapsed.TotalSeconds);
#endif
- UpdateProgress?.Invoke(null, "Adding OS information", counter, Context.Hashes.Count);
- dbCore.DbOps.AddOs(Context.DbInfo, out Context.DbInfo.Id);
- UpdateProgress?.Invoke(null, "Creating OS table", counter, Context.Hashes.Count);
- dbCore.DbOps.CreateTableForOs(Context.DbInfo.Id);
+ UpdateProgress?.Invoke(null, "Adding application information", counter, Context.Hashes.Count);
+ dbCore.DbOps.AddApp(Context.DbInfo, out Context.DbInfo.Id);
+ UpdateProgress?.Invoke(null, "Creating application table", counter, Context.Hashes.Count);
+ dbCore.DbOps.CreateTableForApp(Context.DbInfo.Id);
#if DEBUG
stopwatch.Restart();
#endif
counter = 0;
- foreach(KeyValuePair kvp in Context.Hashes)
+ foreach(KeyValuePair kvp in Context.Hashes)
{
- UpdateProgress?.Invoke(null, "Adding files to OS in database", counter, Context.Hashes.Count);
+ UpdateProgress?.Invoke(null, "Adding files to application in database", counter, Context.Hashes.Count);
- dbCore.DbOps.AddFileToOs(kvp.Value, Context.DbInfo.Id);
+ dbCore.DbOps.AddFileToApp(kvp.Value, Context.DbInfo.Id);
counter++;
}
#if DEBUG
stopwatch.Stop();
- Console.WriteLine("Core.AddFilesToDb(): Took {0} seconds to add all files to the OS in the database",
+ Console.WriteLine("Core.AddFilesToDb(): Took {0} seconds to add all files to the application in the database",
stopwatch.Elapsed.TotalSeconds);
stopwatch.Restart();
#endif
counter = 0;
foreach(KeyValuePair kvp in Context.FoldersDict)
{
- UpdateProgress?.Invoke(null, "Adding folders to OS in database", counter,
+ UpdateProgress?.Invoke(null, "Adding folders to application in database", counter,
Context.FoldersDict.Count);
- dbCore.DbOps.AddFolderToOs(kvp.Value, Context.DbInfo.Id);
+ dbCore.DbOps.AddFolderToApp(kvp.Value, Context.DbInfo.Id);
counter++;
}
@@ -291,10 +279,10 @@ namespace apprepodbmgr.Core
foreach(KeyValuePair kvp in Context.SymlinksDict)
{
- UpdateProgress?.Invoke(null, "Adding symbolic links to OS in database", counter,
+ UpdateProgress?.Invoke(null, "Adding symbolic links to application in database", counter,
Context.SymlinksDict.Count);
- dbCore.DbOps.AddSymlinkToOs(kvp.Key, kvp.Value, Context.DbInfo.Id);
+ dbCore.DbOps.AddSymlinkToApp(kvp.Key, kvp.Value, Context.DbInfo.Id);
counter++;
}
@@ -377,17 +365,11 @@ namespace apprepodbmgr.Core
dbCore?.CloseDb();
}
- public static void RemoveOS(long id, string mdid)
+ public static void RemoveApp(long id, string mdid)
{
if(id == 0 || string.IsNullOrWhiteSpace(mdid)) return;
- string destination = Path.Combine(Settings.Current.RepositoryPath, mdid[0].ToString(), mdid[1].ToString(),
- mdid[2].ToString(), mdid[3].ToString(), mdid[4].ToString(),
- mdid) + ".zip";
-
- if(File.Exists(destination)) File.Delete(destination);
-
- dbCore.DbOps.RemoveOs(id);
+ dbCore.DbOps.RemoveApp(id);
}
public static void GetFilesFromDb()
diff --git a/apprepodbmgr.Core/Workers/Delegates.cs b/apprepodbmgr.Core/Workers/Delegates.cs
index 3e187ff..b0daa36 100644
--- a/apprepodbmgr.Core/Workers/Delegates.cs
+++ b/apprepodbmgr.Core/Workers/Delegates.cs
@@ -34,11 +34,11 @@ namespace apprepodbmgr.Core
{
public delegate void AddFileDelegate(DbFile file);
- public delegate void AddFileForOSDelegate(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 file);
- public delegate void AddOSDelegate(DbEntry os);
+ public delegate void AddAppDelegate(DbEntry os);
public delegate void FailedDelegate(string text);
@@ -57,8 +57,8 @@ namespace apprepodbmgr.Core
public static event FailedDelegate Failed;
public static event FinishedWithoutErrorDelegate Finished;
public static event FinishedWithTextDelegate FinishedWithText;
- public static event AddFileForOSDelegate AddFileForOS;
- public static event AddOSDelegate AddOS;
+ public static event AddFileForAppDelegate AddFileForApp;
+ public static event AddAppDelegate AddApp;
public static event AddFileDelegate AddFile;
public static event AddFilesDelegate AddFiles;
public static event ScanFinishedDelegate ScanFinished;
diff --git a/apprepodbmgr.Core/Workers/Files.cs b/apprepodbmgr.Core/Workers/Files.cs
index ef69092..4d7d6e2 100644
--- a/apprepodbmgr.Core/Workers/Files.cs
+++ b/apprepodbmgr.Core/Workers/Files.cs
@@ -106,7 +106,7 @@ namespace apprepodbmgr.Core
{
try
{
- Context.Hashes = new Dictionary();
+ Context.Hashes = new Dictionary();
Context.FoldersDict = new Dictionary();
Context.SymlinksDict = new Dictionary();
List alreadyMetadata = new List();
@@ -423,7 +423,7 @@ namespace apprepodbmgr.Core
fileStream.Close();
string hash = Stringify(sha256Context.Final());
- DbOsFile dbFile = new DbOsFile
+ DbAppFile dbFile = new DbAppFile
{
Attributes = fi.Attributes,
CreationTimeUtc = fi.CreationTimeUtc,
@@ -695,7 +695,7 @@ namespace apprepodbmgr.Core
UpdateProgress?.Invoke("", "Asking DB for files...", 1, 100);
- dbCore.DbOps.GetAllFilesInOs(out List files, Context.DbInfo.Id);
+ dbCore.DbOps.GetAllFilesInApp(out List files, Context.DbInfo.Id);
UpdateProgress?.Invoke("", "Asking DB for folders...", 2, 100);
@@ -762,7 +762,7 @@ namespace apprepodbmgr.Core
#endif
counter = 4;
- foreach(DbOsFile file in files)
+ foreach(DbAppFile file in files)
{
UpdateProgress?.Invoke("", $"Creating {file.Path}...", counter, 4 + files.Count);
@@ -931,7 +931,7 @@ namespace apprepodbmgr.Core
#if DEBUG
stopwatch.Restart();
#endif
- dbCore.DbOps.GetAllOSes(out List oses);
+ dbCore.DbOps.GetAllApps(out List apps);
#if DEBUG
stopwatch.Stop();
Console.WriteLine("Core.CleanFiles(): Took {0} seconds to get OSes from database",
@@ -954,11 +954,11 @@ namespace apprepodbmgr.Core
#if DEBUG
stopwatch2.Restart();
#endif
- foreach(DbEntry os in oses)
+ foreach(DbEntry app in apps)
{
- UpdateProgress2?.Invoke(null, $"Checking OS {counterO} of {oses.Count}", counterO, oses.Count);
+ UpdateProgress2?.Invoke(null, $"Checking OS {counterO} of {apps.Count}", counterO, apps.Count);
- if(dbCore.DbOps.ExistsFileInOs(file.Sha256, os.Id))
+ if(dbCore.DbOps.ExistsFileInApp(file.Sha256, app.Id))
{
fileExists = true;
break;
@@ -968,7 +968,7 @@ namespace apprepodbmgr.Core
}
#if DEBUG
stopwatch2.Stop();
- Console.WriteLine("Core.CleanFiles(): Took {0} seconds to check file in all OSes",
+ Console.WriteLine("Core.CleanFiles(): Took {0} seconds to check file in all applications",
stopwatch2.Elapsed.TotalSeconds);
#endif
diff --git a/apprepodbmgr.Eto/dlgAdd.xeto b/apprepodbmgr.Eto/dlgAdd.xeto
index 570796c..b119023 100644
--- a/apprepodbmgr.Eto/dlgAdd.xeto
+++ b/apprepodbmgr.Eto/dlgAdd.xeto
@@ -102,8 +102,8 @@
-
-
+
+
diff --git a/apprepodbmgr.Eto/dlgAdd.xeto.cs b/apprepodbmgr.Eto/dlgAdd.xeto.cs
index 19970ac..32883b5 100644
--- a/apprepodbmgr.Eto/dlgAdd.xeto.cs
+++ b/apprepodbmgr.Eto/dlgAdd.xeto.cs
@@ -44,11 +44,11 @@ namespace apprepodbmgr.Eto
{
public class dlgAdd : Dialog
{
- public delegate void OnAddedOSDelegate(DbEntry os);
+ public delegate void OnAddedAppDelegate(DbEntry app);
ObservableCollection fileView;
int knownFiles;
- ObservableCollection osView;
+ ObservableCollection appView;
bool stopped;
Thread thdAddFiles;
Thread thdCheckFiles;
@@ -98,85 +98,85 @@ namespace apprepodbmgr.Eto
e.BackgroundColor = ((FileEntry)e.Item).Known ? Colors.Green : Colors.Red;
};
- osView = new ObservableCollection();
+ appView = new ObservableCollection();
- treeOSes.DataStore = osView;
+ treeApps.DataStore = appView;
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new TextBoxCell {Binding = Binding.Property(r => r.developer)},
HeaderText = "Developer"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new TextBoxCell {Binding = Binding.Property(r => r.product)},
HeaderText = "Product"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new TextBoxCell {Binding = Binding.Property(r => r.version)},
HeaderText = "Version"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new TextBoxCell {Binding = Binding.Property(r => r.languages)},
HeaderText = "Languages"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new TextBoxCell {Binding = Binding.Property(r => r.architecture)},
HeaderText = "Architecture"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new TextBoxCell {Binding = Binding.Property(r => r.machine)},
HeaderText = "Machine"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new TextBoxCell {Binding = Binding.Property(r => r.format)},
HeaderText = "Format"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new TextBoxCell {Binding = Binding.Property(r => r.description)},
HeaderText = "Description"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new CheckBoxCell {Binding = Binding.Property(r => r.oem)},
HeaderText = "OEM?"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new CheckBoxCell {Binding = Binding.Property(r => r.upgrade)},
HeaderText = "Upgrade?"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new CheckBoxCell {Binding = Binding.Property(r => r.update)},
HeaderText = "Update?"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new CheckBoxCell {Binding = Binding.Property(r => r.source)},
HeaderText = "Source?"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new CheckBoxCell {Binding = Binding.Property(r => r.files)},
HeaderText = "Files?"
});
- treeOSes.Columns.Add(new GridColumn
+ treeApps.Columns.Add(new GridColumn
{
DataCell = new CheckBoxCell {Binding = Binding.Property(r => r.netinstall)},
HeaderText = "NetInstall?"
});
- treeOSes.AllowMultipleSelection = false;
+ treeApps.AllowMultipleSelection = false;
}
- public event OnAddedOSDelegate OnAddedOS;
+ public event OnAddedAppDelegate OnAddedApp;
void UnarChangeStatus()
{
@@ -293,8 +293,8 @@ namespace apprepodbmgr.Eto
Workers.Finished += ChkFilesFinished;
Workers.UpdateProgress += UpdateProgress;
Workers.UpdateProgress2 += UpdateProgress2;
- Workers.AddFileForOS += AddFile;
- Workers.AddOS += AddOs;
+ Workers.AddFileForApp += AddFile;
+ Workers.AddApp += AddApp;
thdCheckFiles.Start();
});
}
@@ -312,15 +312,15 @@ namespace apprepodbmgr.Eto
Workers.Finished -= ChkFilesFinished;
Workers.UpdateProgress -= UpdateProgress;
Workers.UpdateProgress2 -= UpdateProgress2;
- Workers.AddFileForOS -= AddFile;
- Workers.AddOS -= AddOs;
+ Workers.AddFileForApp -= AddFile;
+ Workers.AddApp -= AddApp;
thdCheckFiles?.Abort();
thdHashFiles = null;
fileView?.Clear();
- if(osView == null) return;
+ if(appView == null) return;
- tabOSes.Visible = false;
- osView.Clear();
+ tabApps.Visible = false;
+ appView.Clear();
});
}
@@ -332,8 +332,8 @@ namespace apprepodbmgr.Eto
Workers.Finished -= ChkFilesFinished;
Workers.UpdateProgress -= UpdateProgress;
Workers.UpdateProgress2 -= UpdateProgress2;
- Workers.AddFileForOS -= AddFile;
- Workers.AddOS -= AddOs;
+ Workers.AddFileForApp -= AddFile;
+ Workers.AddApp -= AddApp;
thdCheckFiles?.Abort();
@@ -418,12 +418,12 @@ namespace apprepodbmgr.Eto
});
}
- void AddOs(DbEntry os)
+ void AddApp(DbEntry app)
{
Application.Instance.Invoke(delegate
{
- tabOSes.Visible = true;
- osView.Add(new DBEntryForEto(os));
+ tabApps.Visible = true;
+ appView.Add(new DBEntryForEto(app));
});
}
@@ -447,10 +447,10 @@ namespace apprepodbmgr.Eto
btnRemoveFile.Visible = false;
btnToggleCrack.Visible = false;
fileView?.Clear();
- if(osView != null)
+ if(appView != null)
{
- tabOSes.Visible = false;
- osView.Clear();
+ tabApps.Visible = false;
+ appView.Clear();
}
txtFormat.ReadOnly = true;
@@ -560,8 +560,8 @@ namespace apprepodbmgr.Eto
{
stopped = true;
- Workers.AddFileForOS -= AddFile;
- Workers.AddOS -= AddOs;
+ Workers.AddFileForApp -= AddFile;
+ Workers.AddApp -= AddApp;
Workers.Failed -= AddFilesToDbFailed;
Workers.Failed -= ChkFilesFailed;
Workers.Failed -= ExtractArchiveFailed;
@@ -670,10 +670,10 @@ namespace apprepodbmgr.Eto
Workers.UpdateProgress2 -= UpdateProgress2;
btnStop.Visible = false;
fileView?.Clear();
- if(osView == null) return;
+ if(appView == null) return;
- tabOSes.Visible = false;
- osView.Clear();
+ tabApps.Visible = false;
+ appView.Clear();
}
void RemoveTempFilesFailed(string text)
@@ -776,16 +776,16 @@ namespace apprepodbmgr.Eto
long counter = 0;
fileView.Clear();
- foreach(KeyValuePair kvp in Context.Hashes)
+ foreach(KeyValuePair kvp in Context.Hashes)
{
UpdateProgress(null, "Updating table", counter, Context.Hashes.Count);
fileView.Add(new FileEntry {Path = kvp.Key, Hash = kvp.Value.Sha256, Known = true});
counter++;
}
- // TODO: Update OS table
+ // TODO: Update application table
- OnAddedOS?.Invoke(Context.DbInfo);
+ OnAddedApp?.Invoke(Context.DbInfo);
lblProgress.Visible = false;
prgProgress.Visible = false;
@@ -1118,14 +1118,14 @@ namespace apprepodbmgr.Eto
string name = ((FileEntry)treeFiles.SelectedItem).Path;
bool known = ((FileEntry)treeFiles.SelectedItem).Known;
- if(!Context.Hashes.TryGetValue(name, out DbOsFile osfile)) return;
+ if(!Context.Hashes.TryGetValue(name, out DbAppFile appFile)) return;
- osfile.Crack = !osfile.Crack;
+ appFile.Crack = !appFile.Crack;
Context.Hashes.Remove(name);
- Context.Hashes.Add(name, osfile);
- ((FileEntry)treeFiles.SelectedItem).IsCrack = osfile.Crack;
+ Context.Hashes.Add(name, appFile);
+ ((FileEntry)treeFiles.SelectedItem).IsCrack = appFile.Crack;
fileView.Remove((FileEntry)treeFiles.SelectedItem);
- fileView.Add(new FileEntry {Path = name, Hash = osfile.Sha256, Known = known, IsCrack = osfile.Crack});
+ fileView.Add(new FileEntry {Path = name, Hash = appFile.Sha256, Known = known, IsCrack = appFile.Crack});
}
void treeFilesSelectionChanged(object sender, EventArgs e)
@@ -1160,8 +1160,8 @@ namespace apprepodbmgr.Eto
CheckBox chkSource;
CheckBox chkNetinstall;
GridView treeFiles;
- TabPage tabOSes;
- GridView treeOSes;
+ TabPage tabApps;
+ GridView treeApps;
Label lblProgress;
ProgressBar prgProgress;
Label lblProgress2;
diff --git a/apprepodbmgr.Eto/dlgMetadata.xeto.cs b/apprepodbmgr.Eto/dlgMetadata.xeto.cs
index c920d94..55e735f 100644
--- a/apprepodbmgr.Eto/dlgMetadata.xeto.cs
+++ b/apprepodbmgr.Eto/dlgMetadata.xeto.cs
@@ -208,7 +208,7 @@ namespace apprepodbmgr.Eto
void FillFilesCombos()
{
- foreach(KeyValuePair files in Context.Hashes) lstFilesForMedia.Add(files.Key);
+ foreach(KeyValuePair files in Context.Hashes) lstFilesForMedia.Add(files.Key);
}
public void FillFields()
diff --git a/apprepodbmgr.Eto/frmMain.xeto b/apprepodbmgr.Eto/frmMain.xeto
index 5c7ba31..25395a1 100644
--- a/apprepodbmgr.Eto/frmMain.xeto
+++ b/apprepodbmgr.Eto/frmMain.xeto
@@ -1,13 +1,13 @@