3 Commits

10 changed files with 700 additions and 915 deletions

View File

@@ -311,6 +311,7 @@ resharper_bad_switch_braces_indent_highlighting
resharper_bad_symbol_spaces_highlighting = warning
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
resharper_built_in_type_reference_style_highlighting = hint
resharper_can_simplify_dictionary_lookup_with_try_add_highlighting = warning
resharper_check_for_reference_equality_instead_1_highlighting = warning
resharper_check_for_reference_equality_instead_2_highlighting = warning
resharper_check_for_reference_equality_instead_3_highlighting = warning

View File

@@ -33,7 +33,7 @@
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0"/>
<PackageVersion Include="Text.Analyzers" Version="4.14.0"/>
<PackageVersion Include="winfsp.net" Version="2.1.25156"/>
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="3.116.1" Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'" />
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="3.116.1" Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))'"/>
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3"/>
<PackageVersion Include="SabreTools.Hashing" Version="1.2.3"/>

View File

@@ -11,46 +11,32 @@ namespace RomRepoMgr.Core.Resources {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Localization {
private static global::System.Resources.ResourceManager resourceMan;
private static System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
private static System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Localization() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RomRepoMgr.Core.Resources.Localization", typeof(Localization).Assembly);
if (object.Equals(null, resourceMan)) {
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("RomRepoMgr.Core.Resources.Localization", typeof(Localization).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
@@ -59,525 +45,351 @@ namespace RomRepoMgr.Core.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Adding DAT to database....
/// </summary>
internal static string AddingDatToDatabase {
get {
return ResourceManager.GetString("AddingDatToDatabase", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Adding disks....
/// </summary>
internal static string AddingDisks {
get {
return ResourceManager.GetString("AddingDisks", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Adding machines (games)....
/// </summary>
internal static string AddingMachines {
get {
return ResourceManager.GetString("AddingMachines", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Adding medias....
/// </summary>
internal static string AddingMedias {
get {
return ResourceManager.GetString("AddingMedias", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Adding ROMs....
/// </summary>
internal static string AddingRoms {
get {
return ResourceManager.GetString("AddingRoms", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Assertion failed.
/// </summary>
internal static string Assertion_failed {
get {
return ResourceManager.GetString("Assertion_failed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Specified string is not valid Base32 format because character &quot;{0}&quot; does not exist in Base32 alphabet.
/// </summary>
internal static string Base32_Invalid_format {
get {
return ResourceManager.GetString("Base32_Invalid_format", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Specified string is not valid Base32 format because it doesn&apos;t have enough data to construct a complete byte array.
/// </summary>
internal static string Base32_Not_enought_data {
get {
return ResourceManager.GetString("Base32_Not_enought_data", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cannot seek after stream end..
/// </summary>
internal static string Cannot_seek_after_end {
internal static string Base32_Invalid_format {
get {
return ResourceManager.GetString("Cannot_seek_after_end", resourceCulture);
return ResourceManager.GetString("Base32_Invalid_format", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cannot seek before stream start..
/// </summary>
internal static string Cannot_seek_before_start {
get {
return ResourceManager.GetString("Cannot_seek_before_start", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cannot find file with hash {0} in the repository.
/// </summary>
internal static string CannotFindHashInRepository {
internal static string Cannot_seek_after_end {
get {
return ResourceManager.GetString("CannotFindHashInRepository", resourceCulture);
return ResourceManager.GetString("Cannot_seek_after_end", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cannot find lsar executable..
/// </summary>
internal static string CannotFindLsAr {
get {
return ResourceManager.GetString("CannotFindLsAr", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cannot find unar executable at {0}..
/// </summary>
internal static string CannotFindUnArAtPath {
get {
return ResourceManager.GetString("CannotFindUnArAtPath", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cannot find requested zip entry in hashes dictionary.
/// </summary>
internal static string CannotFindZipEntryInDictionary {
get {
return ResourceManager.GetString("CannotFindZipEntryInDictionary", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cannot run lsar..
/// </summary>
internal static string CannotRunLsAr {
get {
return ResourceManager.GetString("CannotRunLsAr", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cannot run unar..
/// </summary>
internal static string CannotRunUnAr {
get {
return ResourceManager.GetString("CannotRunUnAr", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Checking if file is an archive....
/// </summary>
internal static string CheckingIfFIleIsAnArchive {
get {
return ResourceManager.GetString("CheckingIfFIleIsAnArchive", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Compressing {0}....
/// </summary>
internal static string Compressing {
get {
return ResourceManager.GetString("Compressing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Compressing DAT file....
/// </summary>
internal static string CompressingDatFile {
get {
return ResourceManager.GetString("CompressingDatFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Compressing file....
/// </summary>
internal static string CompressingFile {
get {
return ResourceManager.GetString("CompressingFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Copying {0}....
/// </summary>
internal static string Copying {
get {
return ResourceManager.GetString("Copying", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Copying file....
/// </summary>
internal static string CopyingFile {
get {
return ResourceManager.GetString("CopyingFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Could not find ROM set in database..
/// </summary>
internal static string CouldNotFindRomSetInDatabase {
get {
return ResourceManager.GetString("CouldNotFindRomSetInDatabase", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to File exists.
/// </summary>
internal static string DatabaseFileExistsMsgBoxTitle {
get {
return ResourceManager.GetString("DatabaseFileExistsMsgBoxTitle", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to DAT file is already in database, not importing duplicates..
/// </summary>
internal static string DatAlreadyInDatabase {
get {
return ResourceManager.GetString("DatAlreadyInDatabase", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Imported {0} machines with {1} ROMs..
/// </summary>
internal static string DatImportSuccess {
get {
return ResourceManager.GetString("DatImportSuccess", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Enumerating files....
/// </summary>
internal static string EnumeratingFiles {
get {
return ResourceManager.GetString("EnumeratingFiles", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Error: {0}.
/// </summary>
internal static string ErrorWithMessage {
get {
return ResourceManager.GetString("ErrorWithMessage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Exporting ROMs....
/// </summary>
internal static string ExportingRoms {
get {
return ResourceManager.GetString("ExportingRoms", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Extracted contents.
/// </summary>
internal static string ExtractedContents {
get {
return ResourceManager.GetString("ExtractedContents", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Extracting archive contents....
/// </summary>
internal static string ExtractingArchive {
get {
return ResourceManager.GetString("ExtractingArchive", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Finished.
/// </summary>
internal static string Finished {
get {
return ResourceManager.GetString("Finished", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Finishing....
/// </summary>
internal static string Finishing {
get {
return ResourceManager.GetString("Finishing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Found a disk with an unknown machine, this should not happen..
/// </summary>
internal static string FoundDiskWithoutMachine {
get {
return ResourceManager.GetString("FoundDiskWithoutMachine", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Found media with an unknown machine, this should not happen..
/// </summary>
internal static string FoundMediaWithoutMachine {
get {
return ResourceManager.GetString("FoundMediaWithoutMachine", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Found a ROM with an unknown machine, this should not happen..
/// </summary>
internal static string FoundRomWithoutMachine {
get {
return ResourceManager.GetString("FoundRomWithoutMachine", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Getting machine (game) names....
/// </summary>
internal static string GettingMachineNames {
get {
return ResourceManager.GetString("GettingMachineNames", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Hashing DAT file....
/// </summary>
internal static string HashingDatFile {
get {
return ResourceManager.GetString("HashingDatFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Hashing file....
/// </summary>
internal static string HashingFile {
get {
return ResourceManager.GetString("HashingFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Importing {0}....
/// </summary>
internal static string Importing {
get {
return ResourceManager.GetString("Importing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to No checksums found..
/// </summary>
internal static string NoChecksumsFound {
get {
return ResourceManager.GetString("NoChecksumsFound", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Not yet implemented..
/// </summary>
internal static string Not_yet_implemented {
get {
return ResourceManager.GetString("Not_yet_implemented", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Not a CHD file..
/// </summary>
internal static string NotAChdFile {
get {
return ResourceManager.GetString("NotAChdFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Not an AaruFormat file..
/// </summary>
internal static string NotAnAaruFormatFile {
get {
return ResourceManager.GetString("NotAnAaruFormatFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Not the correct lsar executable.
/// </summary>
internal static string NotCorrectLsAr {
get {
return ResourceManager.GetString("NotCorrectLsAr", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Not the correct unar executable.
/// </summary>
internal static string NotCorrectUnAr {
get {
return ResourceManager.GetString("NotCorrectUnAr", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to OK.
/// </summary>
internal static string OK {
get {
return ResourceManager.GetString("OK", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Parsing DAT file....
/// </summary>
internal static string ParsinDatFile {
get {
return ResourceManager.GetString("ParsinDatFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Removing temporary path....
/// </summary>
internal static string RemovingTemporaryPath {
get {
return ResourceManager.GetString("RemovingTemporaryPath", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Retrieving ROMs and disks....
/// </summary>
internal static string RetrievingRomsAndDisks {
get {
return ResourceManager.GetString("RetrievingRomsAndDisks", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Retrieving ROM set from database..
/// </summary>
internal static string RetrievingRomSetFromDatabase {
get {
return ResourceManager.GetString("RetrievingRomSetFromDatabase", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Saving changes to database....
/// </summary>
internal static string SavingChangesToDatabase {
get {
return ResourceManager.GetString("SavingChangesToDatabase", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The input exceeds data types..
/// </summary>
internal static string Spamsum_Input_exceeds_data {
get {
return ResourceManager.GetString("Spamsum_Input_exceeds_data", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to SpamSum does not have a binary representation..
/// </summary>
internal static string Spamsum_no_binary {
get {
return ResourceManager.GetString("Spamsum_no_binary", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to unar path is not set..
/// </summary>
internal static string Assertion_failed {
get {
return ResourceManager.GetString("Assertion_failed", resourceCulture);
}
}
internal static string Spamsum_Input_exceeds_data {
get {
return ResourceManager.GetString("Spamsum_Input_exceeds_data", resourceCulture);
}
}
internal static string Not_yet_implemented {
get {
return ResourceManager.GetString("Not_yet_implemented", resourceCulture);
}
}
internal static string DatabaseFileExistsMsgBoxTitle {
get {
return ResourceManager.GetString("DatabaseFileExistsMsgBoxTitle", resourceCulture);
}
}
internal static string UnArPathNotSet {
get {
return ResourceManager.GetString("UnArPathNotSet", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Unhandled exception occurred..
/// </summary>
internal static string CannotFindUnArAtPath {
get {
return ResourceManager.GetString("CannotFindUnArAtPath", resourceCulture);
}
}
internal static string CannotFindLsAr {
get {
return ResourceManager.GetString("CannotFindLsAr", resourceCulture);
}
}
internal static string CannotRunUnAr {
get {
return ResourceManager.GetString("CannotRunUnAr", resourceCulture);
}
}
internal static string CannotRunLsAr {
get {
return ResourceManager.GetString("CannotRunLsAr", resourceCulture);
}
}
internal static string NotCorrectUnAr {
get {
return ResourceManager.GetString("NotCorrectUnAr", resourceCulture);
}
}
internal static string NotCorrectLsAr {
get {
return ResourceManager.GetString("NotCorrectLsAr", resourceCulture);
}
}
internal static string ParsinDatFile {
get {
return ResourceManager.GetString("ParsinDatFile", resourceCulture);
}
}
internal static string HashingDatFile {
get {
return ResourceManager.GetString("HashingDatFile", resourceCulture);
}
}
internal static string DatAlreadyInDatabase {
get {
return ResourceManager.GetString("DatAlreadyInDatabase", resourceCulture);
}
}
internal static string AddingDatToDatabase {
get {
return ResourceManager.GetString("AddingDatToDatabase", resourceCulture);
}
}
internal static string CompressingDatFile {
get {
return ResourceManager.GetString("CompressingDatFile", resourceCulture);
}
}
internal static string GettingMachineNames {
get {
return ResourceManager.GetString("GettingMachineNames", resourceCulture);
}
}
internal static string AddingMachines {
get {
return ResourceManager.GetString("AddingMachines", resourceCulture);
}
}
internal static string SavingChangesToDatabase {
get {
return ResourceManager.GetString("SavingChangesToDatabase", resourceCulture);
}
}
internal static string RetrievingRomsAndDisks {
get {
return ResourceManager.GetString("RetrievingRomsAndDisks", resourceCulture);
}
}
internal static string AddingRoms {
get {
return ResourceManager.GetString("AddingRoms", resourceCulture);
}
}
internal static string FoundRomWithoutMachine {
get {
return ResourceManager.GetString("FoundRomWithoutMachine", resourceCulture);
}
}
internal static string UnhandledException {
get {
return ResourceManager.GetString("UnhandledException", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Unhandled exception when importing file..
/// </summary>
internal static string RetrievingRomSetFromDatabase {
get {
return ResourceManager.GetString("RetrievingRomSetFromDatabase", resourceCulture);
}
}
internal static string CouldNotFindRomSetInDatabase {
get {
return ResourceManager.GetString("CouldNotFindRomSetInDatabase", resourceCulture);
}
}
internal static string ExportingRoms {
get {
return ResourceManager.GetString("ExportingRoms", resourceCulture);
}
}
internal static string Finished {
get {
return ResourceManager.GetString("Finished", resourceCulture);
}
}
internal static string CannotFindZipEntryInDictionary {
get {
return ResourceManager.GetString("CannotFindZipEntryInDictionary", resourceCulture);
}
}
internal static string CannotFindHashInRepository {
get {
return ResourceManager.GetString("CannotFindHashInRepository", resourceCulture);
}
}
internal static string Compressing {
get {
return ResourceManager.GetString("Compressing", resourceCulture);
}
}
internal static string EnumeratingFiles {
get {
return ResourceManager.GetString("EnumeratingFiles", resourceCulture);
}
}
internal static string Importing {
get {
return ResourceManager.GetString("Importing", resourceCulture);
}
}
internal static string CheckingIfFIleIsAnArchive {
get {
return ResourceManager.GetString("CheckingIfFIleIsAnArchive", resourceCulture);
}
}
internal static string OK {
get {
return ResourceManager.GetString("OK", resourceCulture);
}
}
internal static string ErrorWithMessage {
get {
return ResourceManager.GetString("ErrorWithMessage", resourceCulture);
}
}
internal static string ExtractingArchive {
get {
return ResourceManager.GetString("ExtractingArchive", resourceCulture);
}
}
internal static string RemovingTemporaryPath {
get {
return ResourceManager.GetString("RemovingTemporaryPath", resourceCulture);
}
}
internal static string ExtractedContents {
get {
return ResourceManager.GetString("ExtractedContents", resourceCulture);
}
}
internal static string HashingFile {
get {
return ResourceManager.GetString("HashingFile", resourceCulture);
}
}
internal static string UnknownFile {
get {
return ResourceManager.GetString("UnknownFile", resourceCulture);
}
}
internal static string CompressingFile {
get {
return ResourceManager.GetString("CompressingFile", resourceCulture);
}
}
internal static string Finishing {
get {
return ResourceManager.GetString("Finishing", resourceCulture);
}
}
internal static string UnhandledExceptionWhenImporting {
get {
return ResourceManager.GetString("UnhandledExceptionWhenImporting", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Unknown file..
/// </summary>
internal static string UnknownFile {
internal static string AddingDisks {
get {
return ResourceManager.GetString("UnknownFile", resourceCulture);
return ResourceManager.GetString("AddingDisks", resourceCulture);
}
}
internal static string FoundDiskWithoutMachine {
get {
return ResourceManager.GetString("FoundDiskWithoutMachine", resourceCulture);
}
}
internal static string NotAChdFile {
get {
return ResourceManager.GetString("NotAChdFile", resourceCulture);
}
}
internal static string NoChecksumsFound {
get {
return ResourceManager.GetString("NoChecksumsFound", resourceCulture);
}
}
internal static string Copying {
get {
return ResourceManager.GetString("Copying", resourceCulture);
}
}
internal static string CopyingFile {
get {
return ResourceManager.GetString("CopyingFile", resourceCulture);
}
}
internal static string AddingMedias {
get {
return ResourceManager.GetString("AddingMedias", resourceCulture);
}
}
internal static string FoundMediaWithoutMachine {
get {
return ResourceManager.GetString("FoundMediaWithoutMachine", resourceCulture);
}
}
internal static string NotAnAaruFormatFile {
get {
return ResourceManager.GetString("NotAnAaruFormatFile", resourceCulture);
}
}
internal static string DatImportSuccess {
get {
return ResourceManager.GetString("DatImportSuccess", resourceCulture);
}
}
}

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root"
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
id="root"
xmlns="">
<xsd:element name="root" msdata:IsDataSet="true"></xsd:element>
</xsd:schema>

View File

@@ -25,7 +25,7 @@
<ProjectReference Include="..\RomRepoMgr.Settings\RomRepoMgr.Settings.csproj"/>
<ProjectReference Include="..\SabreTools\SabreTools.DatFiles\SabreTools.DatFiles.csproj"/>
<ProjectReference Include="..\SabreTools\SabreTools.DatItems\SabreTools.DatItems.csproj"/>
<ProjectReference Include="..\SabreTools\SabreTools.DatTools\SabreTools.DatTools.csproj" />
<ProjectReference Include="..\SabreTools\SabreTools.DatTools\SabreTools.DatTools.csproj"/>
<ProjectReference Include="..\SabreTools\SabreTools.FileTypes\SabreTools.FileTypes.csproj"/>
</ItemGroup>

View File

@@ -53,6 +53,7 @@ namespace RomRepoMgr.Core.Workers;
public sealed class DatImporter
{
private static readonly object _dbLock = new();
readonly string _category;
readonly string _datFilesPath;
readonly string _datPath;
@@ -132,8 +133,11 @@ public sealed class DatImporter
Category = _category
};
lock(_dbLock)
{
ctx.RomSets.Add(romSet);
ctx.SaveChanges();
}
SetMessage?.Invoke(this,
new MessageEventArgs
@@ -199,8 +203,11 @@ public sealed class DatImporter
SetIndeterminateProgress?.Invoke(this, System.EventArgs.Empty);
lock(_dbLock)
{
ctx.BulkInsert(machines.Values.ToList(), b => b.SetOutputIdentity = true);
ctx.SaveChanges();
}
SetMessage?.Invoke(this,
new MessageEventArgs
@@ -248,6 +255,20 @@ public sealed class DatImporter
Maximum = datFile.Items.SortedKeys.Length
});
List<DbFile> pendingFilesByCrcList;
List<DbFile> pendingFilesByMd5List;
List<DbFile> pendingFilesBySha1List;
List<DbFile> pendingFilesBySha256List;
List<DbFile> pendingFilesBySha384List;
List<DbFile> pendingFilesBySha512List;
Dictionary<string, DbDisk> pendingDisksByMd5;
Dictionary<string, DbDisk> pendingDisksBySha1;
Dictionary<string, DbMedia> pendingMediasByMd5;
Dictionary<string, DbMedia> pendingMediasBySha1;
Dictionary<string, DbMedia> pendingMediasBySha256;
lock(_dbLock)
{
using(DbTransaction dbTransaction = dbConnection.BeginTransaction())
{
DbCommand dbcc = dbConnection.CreateCommand();
@@ -469,80 +490,72 @@ public sealed class DatImporter
dbTransaction.Commit();
}
List<DbFile> pendingFilesByCrcList = romsHaveCrc
pendingFilesByCrcList = romsHaveCrc
? ctx.Files
.FromSqlRaw($"SELECT DISTINCT f.* FROM Files AS f, [{tmpRomCrc32Table}] AS t WHERE f.Crc32 = t.Crc32 AND f.Size = t.Size")
.ToList()
: [];
List<DbFile> pendingFilesByMd5List = romsHaveMd5
pendingFilesByMd5List = romsHaveMd5
? ctx.Files
.FromSqlRaw($"SELECT DISTINCT f.* FROM Files AS f, [{tmpRomMd5Table}] AS t WHERE f.Md5 = t.Md5 AND f.Size = t.Size")
.ToList()
: [];
List<DbFile> pendingFilesBySha1List =
romsHaveSha1
pendingFilesBySha1List = romsHaveSha1
? ctx.Files
.FromSqlRaw($"SELECT DISTINCT f.* FROM Files AS f, [{tmpRomSha1Table}] AS t WHERE f.Sha1 = t.Sha1 AND f.Size = t.Size")
.ToList()
: [];
List<DbFile> pendingFilesBySha256List =
romsHaveSha256
pendingFilesBySha256List = romsHaveSha256
? ctx.Files
.FromSqlRaw($"SELECT DISTINCT f.* FROM Files AS f, [{tmpRomSha256Table}] AS t WHERE f.Sha256 = t.Sha256 AND f.Size = t.Size")
.ToList()
: [];
List<DbFile> pendingFilesBySha384List =
romsHaveSha384
pendingFilesBySha384List = romsHaveSha384
? ctx.Files
.FromSqlRaw($"SELECT DISTINCT f.* FROM Files AS f, [{tmpRomSha384Table}] AS t WHERE f.Sha384 = t.Sha384 AND f.Size = t.Size")
.ToList()
: [];
List<DbFile> pendingFilesBySha512List =
romsHaveSha512
pendingFilesBySha512List = romsHaveSha512
? ctx.Files
.FromSqlRaw($"SELECT DISTINCT f.* FROM Files AS f, [{tmpRomSha512Table}] AS t WHERE f.Sha512 = t.Sha512 AND f.Size = t.Size")
.ToList()
: [];
Dictionary<string, DbDisk> pendingDisksByMd5 =
disksHaveMd5
pendingDisksByMd5 = disksHaveMd5
? ctx.Disks
.FromSqlRaw($"SELECT DISTINCT f.* FROM Disks AS f, [{tmpDiskMd5Table}] AS t WHERE f.Md5 = t.Md5")
.ToDictionary(f => f.Md5)
: [];
Dictionary<string, DbDisk> pendingDisksBySha1 =
disksHaveSha1
pendingDisksBySha1 = disksHaveSha1
? ctx.Disks
.FromSqlRaw($"SELECT DISTINCT f.* FROM Disks AS f, [{tmpDiskSha1Table}] AS t WHERE f.Sha1 = t.Sha1")
.ToDictionary(f => f.Sha1)
: [];
Dictionary<string, DbMedia> pendingMediasByMd5 =
mediasHaveMd5
pendingMediasByMd5 = mediasHaveMd5
? ctx.Medias
.FromSqlRaw($"SELECT DISTINCT f.* FROM Medias AS f, [{tmpMediaMd5Table}] AS t WHERE f.Md5 = t.Md5")
.ToDictionary(f => f.Md5)
: [];
Dictionary<string, DbMedia> pendingMediasBySha1 =
mediasHaveSha1
pendingMediasBySha1 = mediasHaveSha1
? ctx.Medias
.FromSqlRaw($"SELECT DISTINCT f.* FROM Medias AS f, [{tmpMediaSha1Table}] AS t WHERE f.Sha1 = t.Sha1")
.ToDictionary(f => f.Sha1)
: [];
Dictionary<string, DbMedia> pendingMediasBySha256 =
mediasHaveSha256
pendingMediasBySha256 = mediasHaveSha256
? ctx.Medias
.FromSqlRaw($"SELECT DISTINCT f.* FROM Medias AS f, [{tmpMediaSha256Table}] AS t WHERE f.Sha256 = t.Sha256")
.ToDictionary(f => f.Sha256)
: [];
}
var pendingFilesByCrc = new Dictionary<string, DbFile>();
var pendingFilesByMd5 = new Dictionary<string, DbFile>();
@@ -550,56 +563,21 @@ public sealed class DatImporter
var pendingFilesBySha256 = new Dictionary<string, DbFile>();
var pendingFilesBySha384 = new Dictionary<string, DbFile>();
var pendingFilesBySha512 = new Dictionary<string, DbFile>();
var pendingFiles = new List<DbFile>();
// This is because of hash collisions.
foreach(DbFile item in pendingFilesByCrcList)
{
if(pendingFilesByCrc.ContainsKey(item.Crc32))
pendingFiles.Add(item);
else
pendingFilesByCrc[item.Crc32] = item;
}
var pendingFiles = pendingFilesByCrcList.Where(item => !pendingFilesByCrc.TryAdd(item.Crc32, item))
.ToList();
foreach(DbFile item in pendingFilesByMd5List)
{
if(pendingFilesByMd5.ContainsKey(item.Md5))
pendingFiles.Add(item);
else
pendingFilesByMd5[item.Md5] = item;
}
pendingFiles.AddRange(pendingFilesByMd5List.Where(item => !pendingFilesByMd5.TryAdd(item.Md5, item)));
pendingFiles.AddRange(pendingFilesBySha1List.Where(item => !pendingFilesBySha1.TryAdd(item.Sha1, item)));
foreach(DbFile item in pendingFilesBySha1List)
{
if(pendingFilesBySha1.ContainsKey(item.Sha1))
pendingFiles.Add(item);
else
pendingFilesBySha1[item.Sha1] = item;
}
pendingFiles.AddRange(pendingFilesBySha256List.Where(item => !pendingFilesBySha256
.TryAdd(item.Sha256, item)));
foreach(DbFile item in pendingFilesBySha256List)
{
if(pendingFilesBySha256.ContainsKey(item.Sha256))
pendingFiles.Add(item);
else
pendingFilesBySha256[item.Sha256] = item;
}
pendingFiles.AddRange(pendingFilesBySha384List.Where(item => !pendingFilesBySha384
.TryAdd(item.Sha384, item)));
foreach(DbFile item in pendingFilesBySha384List)
{
if(pendingFilesBySha384.ContainsKey(item.Sha384))
pendingFiles.Add(item);
else
pendingFilesBySha384[item.Sha384] = item;
}
foreach(DbFile item in pendingFilesBySha512List)
{
if(pendingFilesBySha512.ContainsKey(item.Sha512))
pendingFiles.Add(item);
else
pendingFilesBySha512[item.Sha512] = item;
}
pendingFiles.AddRange(pendingFilesBySha512List.Where(item => !pendingFilesBySha512
.TryAdd(item.Sha512, item)));
// Clear some memory
pendingFilesByCrcList.Clear();
@@ -609,6 +587,8 @@ public sealed class DatImporter
pendingFilesBySha384List.Clear();
pendingFilesBySha512List.Clear();
lock(_dbLock)
{
ctx.Database.ExecuteSqlRaw($"DROP TABLE [{tmpRomCrc32Table}]");
ctx.Database.ExecuteSqlRaw($"DROP TABLE [{tmpRomMd5Table}]");
ctx.Database.ExecuteSqlRaw($"DROP TABLE [{tmpRomSha1Table}]");
@@ -620,6 +600,7 @@ public sealed class DatImporter
ctx.Database.ExecuteSqlRaw($"DROP TABLE [{tmpMediaMd5Table}]");
ctx.Database.ExecuteSqlRaw($"DROP TABLE [{tmpMediaSha1Table}]");
ctx.Database.ExecuteSqlRaw($"DROP TABLE [{tmpMediaSha256Table}]");
}
SetProgressBounds?.Invoke(this,
new ProgressBoundsEventArgs
@@ -923,7 +904,10 @@ public sealed class DatImporter
SetIndeterminateProgress?.Invoke(this, System.EventArgs.Empty);
lock(_dbLock)
{
ctx.BulkInsert(newFiles, b => b.SetOutputIdentity = true);
}
foreach(FileByMachine fbm in newFilesByMachine)
{
@@ -931,9 +915,12 @@ public sealed class DatImporter
fbm.MachineId = fbm.Machine.Id;
}
lock(_dbLock)
{
ctx.BulkInsert(newFilesByMachine);
ctx.SaveChanges();
}
pendingFilesBySha512.Clear();
pendingFilesBySha384.Clear();
@@ -1056,7 +1043,10 @@ public sealed class DatImporter
SetIndeterminateProgress?.Invoke(this, System.EventArgs.Empty);
lock(_dbLock)
{
ctx.BulkInsert(newDisks, b => b.SetOutputIdentity = true);
}
foreach(DiskByMachine dbm in newDisksByMachine)
{
@@ -1064,9 +1054,12 @@ public sealed class DatImporter
dbm.MachineId = dbm.Machine.Id;
}
lock(_dbLock)
{
ctx.BulkInsert(newDisksByMachine);
ctx.SaveChanges();
}
pendingDisksBySha1.Clear();
pendingDisksByMd5.Clear();
@@ -1203,7 +1196,10 @@ public sealed class DatImporter
SetIndeterminateProgress?.Invoke(this, System.EventArgs.Empty);
lock(_dbLock)
{
ctx.BulkInsert(newMedias, b => b.SetOutputIdentity = true);
}
foreach(MediaByMachine mbm in newMediasByMachine)
{
@@ -1211,17 +1207,23 @@ public sealed class DatImporter
mbm.MachineId = mbm.Machine.Id;
}
lock(_dbLock)
{
ctx.BulkInsert(newMediasByMachine);
ctx.SaveChanges();
}
pendingMediasBySha256.Clear();
pendingMediasBySha1.Clear();
pendingMediasByMd5.Clear();
newMedias.Clear();
newMediasByMachine.Clear();
RomSetStat stats;
RomSetStat stats = ctx.RomSets.Where(r => r.Id == romSet.Id)
lock(_dbLock)
{
stats = ctx.RomSets.Where(r => r.Id == romSet.Id)
.Select(r => new RomSetStat
{
RomSetId = r.Id,
@@ -1268,6 +1270,7 @@ public sealed class DatImporter
ctx.RomSetStats.Add(stats);
ctx.SaveChanges();
}
WorkFinished?.Invoke(this,
new MessageEventArgs

View File

@@ -11,46 +11,32 @@ namespace RomRepoMgr.Database.Resources {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Localization {
private static global::System.Resources.ResourceManager resourceMan;
private static System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
private static System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Localization() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RomRepoMgr.Database.Resources.Localization", typeof(Localization).Assembly);
if (object.Equals(null, resourceMan)) {
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("RomRepoMgr.Database.Resources.Localization", typeof(Localization).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
@@ -59,9 +45,6 @@ namespace RomRepoMgr.Database.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Settings are not initialized!.
/// </summary>
internal static string Settings_not_initialized {
get {
return ResourceManager.GetString("Settings_not_initialized", resourceCulture);

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root"
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
id="root"
xmlns="">
<xsd:element name="root" msdata:IsDataSet="true"></xsd:element>
</xsd:schema>

View File

@@ -11,46 +11,32 @@ namespace RomRepoMgr.Settings.Resources {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Localization {
private static global::System.Resources.ResourceManager resourceMan;
private static System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
private static System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Localization() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RomRepoMgr.Settings.Resources.Localization", typeof(Localization).Assembly);
if (object.Equals(null, resourceMan)) {
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("RomRepoMgr.Settings.Resources.Localization", typeof(Localization).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
internal static System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
@@ -59,9 +45,6 @@ namespace RomRepoMgr.Settings.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Unhandled exception calling uname: {0}.
/// </summary>
internal static string Unhandled_exception_uname {
get {
return ResourceManager.GetString("Unhandled_exception_uname", resourceCulture);

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root"
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
id="root"
xmlns="">
<xsd:element name="root" msdata:IsDataSet="true"></xsd:element>
</xsd:schema>