mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 11:14:45 +00:00
General refactor and cleanup.
This commit is contained in:
@@ -1,55 +1,55 @@
|
|||||||
<Project ToolsVersion="15.0">
|
<Project ToolsVersion="15.0">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageVersion Include="Aaru.Checksums.Native" Version="6.0.0-alpha.10"/>
|
<PackageVersion Include="Aaru.Checksums.Native" Version="6.0.0-alpha.10" />
|
||||||
<PackageVersion Include="AsyncFixer" Version="1.6.0"/>
|
<PackageVersion Include="AsyncFixer" Version="1.6.0" />
|
||||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.2"/>
|
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.2" />
|
||||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.2"/>
|
<PackageVersion Include="Avalonia.Desktop" Version="11.3.2" />
|
||||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.2"/>
|
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.2" />
|
||||||
<PackageVersion Include="Avalonia.Svg.Skia" Version="11.3.0"/>
|
<PackageVersion Include="Avalonia.Svg.Skia" Version="11.3.0" />
|
||||||
<PackageVersion Include="Avalonia.Themes.Fluent" Version="11.3.2"/>
|
<PackageVersion Include="Avalonia.Themes.Fluent" Version="11.3.2" />
|
||||||
<PackageVersion Include="Avalonia" Version="11.3.2"/>
|
<PackageVersion Include="Avalonia" Version="11.3.2" />
|
||||||
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0"/>
|
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
|
||||||
<PackageVersion Include="DotNetZip" Version="1.16.0"/>
|
<PackageVersion Include="DotNetZip" Version="1.16.0" />
|
||||||
<PackageVersion Include="EFCore.BulkExtensions" Version="9.0.1"/>
|
<PackageVersion Include="EFCore.BulkExtensions" Version="9.0.1" />
|
||||||
<PackageVersion Include="ErrorProne.NET.CoreAnalyzers" Version="0.1.2"/>
|
<PackageVersion Include="ErrorProne.NET.CoreAnalyzers" Version="0.1.2" />
|
||||||
<PackageVersion Include="ErrorProne.NET.Structs" Version="0.1.2"/>
|
<PackageVersion Include="ErrorProne.NET.Structs" Version="0.1.2" />
|
||||||
<PackageVersion Include="InclusivenessAnalyzer" Version="1.3.0"/>
|
<PackageVersion Include="InclusivenessAnalyzer" Version="1.3.0" />
|
||||||
<PackageVersion Include="MessageBox.Avalonia" Version="3.2.0"/>
|
<PackageVersion Include="MessageBox.Avalonia" Version="3.2.0" />
|
||||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.6"/>
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.6" />
|
||||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Proxies" Version="9.0.6"/>
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Proxies" Version="9.0.6" />
|
||||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="2.0.0-preview1-final"/>
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite.Design" Version="2.0.0-preview1-final" />
|
||||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.6"/>
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.6" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Localization" Version="9.0.6"/>
|
<PackageVersion Include="Microsoft.Extensions.Localization" Version="9.0.6" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.6"/>
|
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="9.0.6" />
|
||||||
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter" Version="4.12.1"/>
|
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.DataGrid.EntityFrameworkAdapter" Version="4.12.1" />
|
||||||
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15"/>
|
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15" />
|
||||||
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0"/>
|
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
||||||
<PackageVersion Include="Mono.Fuse.NETStandard" Version="1.1.0"/>
|
<PackageVersion Include="Mono.Fuse.NETStandard" Version="1.1.0" />
|
||||||
<PackageVersion Include="Philips.CodeAnalysis.MaintainabilityAnalyzers" Version="1.6.3"/>
|
<PackageVersion Include="Philips.CodeAnalysis.MaintainabilityAnalyzers" Version="1.6.3" />
|
||||||
<PackageVersion Include="plist-cil" Version="2.2.0"/>
|
<PackageVersion Include="plist-cil" Version="2.2.0" />
|
||||||
<PackageVersion Include="Roslynator.Analyzers" Version="4.13.1"/>
|
<PackageVersion Include="Roslynator.Analyzers" Version="4.13.1" />
|
||||||
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.13.1"/>
|
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.13.1" />
|
||||||
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.13.1"/>
|
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.13.1" />
|
||||||
<PackageVersion Include="SabreTools.Models" Version="1.5.8"/>
|
<PackageVersion Include="SabreTools.Models" Version="1.5.8" />
|
||||||
<PackageVersion Include="Serilog" Version="4.3.0"/>
|
<PackageVersion Include="Serilog" Version="4.3.0" />
|
||||||
<PackageVersion Include="Serilog.AspNetCore" Version="9.0.0"/>
|
<PackageVersion Include="Serilog.AspNetCore" Version="9.0.0" />
|
||||||
<PackageVersion Include="Serilog.Extensions.Logging" Version="9.0.2"/>
|
<PackageVersion Include="Serilog.Extensions.Logging" Version="9.0.2" />
|
||||||
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0"/>
|
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0" />
|
||||||
<PackageVersion Include="SharpCompress" Version="0.39.0"/>
|
<PackageVersion Include="SharpCompress" Version="0.39.0" />
|
||||||
<PackageVersion Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31"/>
|
<PackageVersion Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" />
|
||||||
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0"/>
|
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0" />
|
||||||
<PackageVersion Include="Text.Analyzers" Version="4.14.0"/>
|
<PackageVersion Include="Text.Analyzers" Version="4.14.0" />
|
||||||
<PackageVersion Include="winfsp.net" Version="2.1.25156"/>
|
<PackageVersion Include="winfsp.net" Version="2.1.25156" />
|
||||||
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3"/>
|
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageVersion Include="SabreTools.Hashing" Version="1.2.3"/>
|
<PackageVersion Include="SabreTools.Hashing" Version="1.2.3" />
|
||||||
<PackageVersion Include="SabreTools.IO" Version="1.4.13"/>
|
<PackageVersion Include="SabreTools.IO" Version="1.4.13" />
|
||||||
<PackageVersion Include="SabreTools.Matching" Version="1.3.4"/>
|
<PackageVersion Include="SabreTools.Matching" Version="1.3.4" />
|
||||||
<PackageVersion Include="SabreTools.Skippers" Version="1.1.3"/>
|
<PackageVersion Include="SabreTools.Skippers" Version="1.1.3" />
|
||||||
<PackageVersion Include="System.IO.Compression" Version="4.3.0"/>
|
<PackageVersion Include="System.IO.Compression" Version="4.3.0" />
|
||||||
<PackageVersion Include="SharpCompress" Version="0.38.0"/>
|
<PackageVersion Include="SharpCompress" Version="0.38.0" />
|
||||||
<PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0"/>
|
<PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0" />
|
||||||
<PackageVersion Include="ZstdSharp.Port" Version="0.8.6"/>
|
<PackageVersion Include="ZstdSharp.Port" Version="0.8.6" />
|
||||||
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.12.1"/>
|
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.12.1" />
|
||||||
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.12.1"/>
|
<PackageVersion Include="Microsoft.FluentUI.AspNetCore.Components.Icons" Version="4.12.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -15,12 +15,14 @@
|
|||||||
|
|
||||||
<h3>Development Mode</h3>
|
<h3>Development Mode</h3>
|
||||||
<p>
|
<p>
|
||||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
Swapping to <strong>Development</strong> environment will display more detailed information about the error that
|
||||||
|
occurred.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||||
It can result in displaying sensitive information from exceptions to end users.
|
It can result in displaying sensitive information from exceptions to end users.
|
||||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong>
|
||||||
|
environment variable to <strong>Development</strong>
|
||||||
and restarting the app.
|
and restarting the app.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<FluentDesignTheme StorageName="theme" Mode="DesignThemeModes.Dark">
|
@using RomRepoMgr.Blazor.Components.Layout
|
||||||
|
<FluentDesignTheme StorageName="theme" Mode="DesignThemeModes.Dark">
|
||||||
<Router AppAssembly="typeof(Program).Assembly">
|
<Router AppAssembly="typeof(Program).Assembly">
|
||||||
<Found Context="routeData">
|
<Found Context="routeData">
|
||||||
<RouteView DefaultLayout="typeof(Layout.MainLayout)" RouteData="routeData"/>
|
<RouteView DefaultLayout="typeof(MainLayout)" RouteData="routeData"/>
|
||||||
<FocusOnNavigate RouteData="routeData" Selector="h1"/>
|
<FocusOnNavigate RouteData="routeData" Selector="h1"/>
|
||||||
</Found>
|
</Found>
|
||||||
</Router>
|
</Router>
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"http": {
|
"http": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"applicationUrl": "http://localhost:5079",
|
"applicationUrl": "http://localhost:5079",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"https": {
|
"https": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"applicationUrl": "https://localhost:7057;http://localhost:5079",
|
"applicationUrl": "https://localhost:7057;http://localhost:5079",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft.AspNetCore": "Warning"
|
"Microsoft.AspNetCore": "Warning"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,191 +1,191 @@
|
|||||||
@import '_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';
|
@import '_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';
|
||||||
|
|
||||||
body {
|
body {
|
||||||
--body-font: "Segoe UI Variable", "Segoe UI", sans-serif;
|
--body-font: "Segoe UI Variable", "Segoe UI", sans-serif;
|
||||||
font-family: var(--body-font);
|
font-family: var(--body-font);
|
||||||
font-size: var(--type-ramp-base-font-size);
|
font-size: var(--type-ramp-base-font-size);
|
||||||
line-height: var(--type-ramp-base-line-height);
|
line-height: var(--type-ramp-base-line-height);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navmenu-icon {
|
.navmenu-icon {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
min-height: calc(100dvh - 86px);
|
min-height: calc(100dvh - 86px);
|
||||||
color: var(--neutral-foreground-rest);
|
color: var(--neutral-foreground-rest);
|
||||||
align-items: stretch !important;
|
align-items: stretch !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.body-content {
|
.body-content {
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
height: calc(100dvh - 86px) !important;
|
height: calc(100dvh - 86px) !important;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 0.5rem 1.5rem;
|
padding: 0.5rem 1.5rem;
|
||||||
align-self: stretch !important;
|
align-self: stretch !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.manage {
|
.manage {
|
||||||
width: 100dvw;
|
width: 100dvw;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
background: var(--neutral-layer-4);
|
background: var(--neutral-layer-4);
|
||||||
color: var(--neutral-foreground-rest);
|
color: var(--neutral-foreground-rest);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 10px 10px;
|
padding: 10px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer a {
|
footer a {
|
||||||
color: var(--neutral-foreground-rest);
|
color: var(--neutral-foreground-rest);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer a:focus {
|
footer a:focus {
|
||||||
outline: 1px dashed;
|
outline: 1px dashed;
|
||||||
outline-offset: 3px;
|
outline-offset: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer a:hover {
|
footer a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert {
|
.alert {
|
||||||
border: 1px dashed var(--accent-fill-rest);
|
border: 1px dashed var(--accent-fill-rest);
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#blazor-error-ui {
|
#blazor-error-ui {
|
||||||
background: lightyellow;
|
background: lightyellow;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
||||||
display: none;
|
display: none;
|
||||||
left: 0;
|
left: 0;
|
||||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#blazor-error-ui .dismiss {
|
#blazor-error-ui .dismiss {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0.75rem;
|
right: 0.75rem;
|
||||||
top: 0.5rem;
|
top: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blazor-error-boundary {
|
.blazor-error-boundary {
|
||||||
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
|
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
|
||||||
padding: 1rem 1rem 1rem 3.7rem;
|
padding: 1rem 1rem 1rem 3.7rem;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blazor-error-boundary::before {
|
.blazor-error-boundary::before {
|
||||||
content: "An error has occurred. "
|
content: "An error has occurred. "
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-progress {
|
.loading-progress {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
width: 8rem;
|
width: 8rem;
|
||||||
height: 8rem;
|
height: 8rem;
|
||||||
margin: 20vh auto 1rem auto;
|
margin: 20vh auto 1rem auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-progress circle {
|
.loading-progress circle {
|
||||||
fill: none;
|
fill: none;
|
||||||
stroke: #e0e0e0;
|
stroke: #e0e0e0;
|
||||||
stroke-width: 0.6rem;
|
stroke-width: 0.6rem;
|
||||||
transform-origin: 50% 50%;
|
transform-origin: 50% 50%;
|
||||||
transform: rotate(-90deg);
|
transform: rotate(-90deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-progress circle:last-child {
|
.loading-progress circle:last-child {
|
||||||
stroke: #1b6ec2;
|
stroke: #1b6ec2;
|
||||||
stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
|
stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
|
||||||
transition: stroke-dasharray 0.05s ease-in-out;
|
transition: stroke-dasharray 0.05s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-progress-text {
|
.loading-progress-text {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
|
inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-progress-text:after {
|
.loading-progress-text:after {
|
||||||
content: var(--blazor-load-percentage-text, "Loading");
|
content: var(--blazor-load-percentage-text, "Loading");
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
color: #c02d76;
|
color: #c02d76;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
.header-gutters {
|
.header-gutters {
|
||||||
margin: 0.5rem 3rem 0.5rem 1.5rem !important;
|
margin: 0.5rem 3rem 0.5rem 1.5rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
[dir="rtl"] .header-gutters {
|
[dir="rtl"] .header-gutters {
|
||||||
margin: 0.5rem 1.5rem 0.5rem 3rem !important;
|
margin: 0.5rem 1.5rem 0.5rem 3rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
flex-direction: column !important;
|
flex-direction: column !important;
|
||||||
row-gap: 0 !important;
|
row-gap: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav.sitenav {
|
nav.sitenav {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main-menu {
|
#main-menu {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main-menu > div:first-child:is(.expander) {
|
#main-menu > div:first-child:is(.expander) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navmenu {
|
.navmenu {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navmenu-toggle {
|
#navmenu-toggle {
|
||||||
appearance: none;
|
appearance: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navmenu-toggle ~ nav {
|
#navmenu-toggle ~ nav {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navmenu-toggle:checked ~ nav {
|
#navmenu-toggle:checked ~ nav {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navmenu-icon {
|
.navmenu-icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 15px;
|
top: 15px;
|
||||||
left: unset;
|
left: unset;
|
||||||
right: 20px;
|
right: 20px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
[dir="rtl"] .navmenu-icon {
|
[dir="rtl"] .navmenu-icon {
|
||||||
left: 20px;
|
left: 20px;
|
||||||
right: unset;
|
right: unset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,14 +74,14 @@ public static class FAT
|
|||||||
byte bpbSignature;
|
byte bpbSignature;
|
||||||
byte fat32Signature;
|
byte fat32Signature;
|
||||||
ulong hugeSectors;
|
ulong hugeSectors;
|
||||||
var fat32Id = new byte[8];
|
byte[] fat32Id = new byte[8];
|
||||||
var msxId = new byte[6];
|
byte[] msxId = new byte[6];
|
||||||
var dosOem = new byte[8];
|
byte[] dosOem = new byte[8];
|
||||||
var atariOem = new byte[6];
|
byte[] atariOem = new byte[6];
|
||||||
ushort bootable = 0;
|
ushort bootable = 0;
|
||||||
|
|
||||||
var bpbSector = new byte[512];
|
byte[] bpbSector = new byte[512];
|
||||||
var fatSector = new byte[512];
|
byte[] fatSector = new byte[512];
|
||||||
imageStream.Position = 0;
|
imageStream.Position = 0;
|
||||||
imageStream.EnsureRead(bpbSector, 0, 512);
|
imageStream.EnsureRead(bpbSector, 0, 512);
|
||||||
imageStream.EnsureRead(fatSector, 0, 512);
|
imageStream.EnsureRead(fatSector, 0, 512);
|
||||||
@@ -111,13 +111,13 @@ public static class FAT
|
|||||||
|
|
||||||
string oemString = Encoding.ASCII.GetString(dosOem);
|
string oemString = Encoding.ASCII.GetString(dosOem);
|
||||||
|
|
||||||
var apricotBps = BitConverter.ToUInt16(bpbSector, 0x50);
|
ushort apricotBps = BitConverter.ToUInt16(bpbSector, 0x50);
|
||||||
byte apricotSpc = bpbSector[0x52];
|
byte apricotSpc = bpbSector[0x52];
|
||||||
var apricotReservedSecs = BitConverter.ToUInt16(bpbSector, 0x53);
|
ushort apricotReservedSecs = BitConverter.ToUInt16(bpbSector, 0x53);
|
||||||
byte apricotFatsNo = bpbSector[0x55];
|
byte apricotFatsNo = bpbSector[0x55];
|
||||||
var apricotRootEntries = BitConverter.ToUInt16(bpbSector, 0x56);
|
ushort apricotRootEntries = BitConverter.ToUInt16(bpbSector, 0x56);
|
||||||
var apricotSectors = BitConverter.ToUInt16(bpbSector, 0x58);
|
ushort apricotSectors = BitConverter.ToUInt16(bpbSector, 0x58);
|
||||||
var apricotFatSectors = BitConverter.ToUInt16(bpbSector, 0x5B);
|
ushort apricotFatSectors = BitConverter.ToUInt16(bpbSector, 0x5B);
|
||||||
|
|
||||||
bool apricotCorrectSpc = apricotSpc is 1 or 2 or 4 or 8 or 16 or 32 or 64;
|
bool apricotCorrectSpc = apricotSpc is 1 or 2 or 4 or 8 or 16 or 32 or 64;
|
||||||
|
|
||||||
@@ -197,12 +197,12 @@ public static class FAT
|
|||||||
byte z80Di = bpbSector[0];
|
byte z80Di = bpbSector[0];
|
||||||
|
|
||||||
// First FAT1 sector resides at LBA 0x14
|
// First FAT1 sector resides at LBA 0x14
|
||||||
var fat1Sector0 = new byte[512];
|
byte[] fat1Sector0 = new byte[512];
|
||||||
imageStream.Position = 0x14 * 512;
|
imageStream.Position = 0x14 * 512;
|
||||||
imageStream.EnsureRead(fat1Sector0, 0, 512);
|
imageStream.EnsureRead(fat1Sector0, 0, 512);
|
||||||
|
|
||||||
// First FAT2 sector resides at LBA 0x1A
|
// First FAT2 sector resides at LBA 0x1A
|
||||||
var fat2Sector0 = new byte[512];
|
byte[] fat2Sector0 = new byte[512];
|
||||||
imageStream.Position = 0x1A * 512;
|
imageStream.Position = 0x1A * 512;
|
||||||
imageStream.EnsureRead(fat2Sector0, 0, 512);
|
imageStream.EnsureRead(fat2Sector0, 0, 512);
|
||||||
bool equalFatIds = fat1Sector0[0] == fat2Sector0[0] && fat1Sector0[1] == fat2Sector0[1];
|
bool equalFatIds = fat1Sector0[0] == fat2Sector0[0] && fat1Sector0[1] == fat2Sector0[1];
|
||||||
@@ -210,7 +210,7 @@ public static class FAT
|
|||||||
// Volume is software interleaved 2:1
|
// Volume is software interleaved 2:1
|
||||||
var rootMs = new MemoryStream();
|
var rootMs = new MemoryStream();
|
||||||
|
|
||||||
var tmp = new byte[512];
|
byte[] tmp = new byte[512];
|
||||||
|
|
||||||
foreach(long position in new long[]
|
foreach(long position in new long[]
|
||||||
{
|
{
|
||||||
@@ -223,12 +223,12 @@ public static class FAT
|
|||||||
}
|
}
|
||||||
|
|
||||||
byte[] rootDir = rootMs.ToArray();
|
byte[] rootDir = rootMs.ToArray();
|
||||||
var validRootDir = true;
|
bool validRootDir = true;
|
||||||
|
|
||||||
// Iterate all root directory
|
// Iterate all root directory
|
||||||
for(var e = 0; e < 96 * 32; e += 32)
|
for(int e = 0; e < 96 * 32; e += 32)
|
||||||
{
|
{
|
||||||
for(var c = 0; c < 11; c++)
|
for(int c = 0; c < 11; c++)
|
||||||
{
|
{
|
||||||
if((rootDir[c + e] >= 0x20 || rootDir[c + e] == 0x00 || rootDir[c + e] == 0x05) &&
|
if((rootDir[c + e] >= 0x20 || rootDir[c + e] == 0x00 || rootDir[c + e] == 0x05) &&
|
||||||
rootDir[c + e] != 0xFF &&
|
rootDir[c + e] != 0xFF &&
|
||||||
|
|||||||
@@ -38,17 +38,17 @@ public static class Base32
|
|||||||
var builder = new StringBuilder(bytes.Length * _inByteSize / _outByteSize);
|
var builder = new StringBuilder(bytes.Length * _inByteSize / _outByteSize);
|
||||||
|
|
||||||
// Position in the input buffer
|
// Position in the input buffer
|
||||||
var bytesPosition = 0;
|
int bytesPosition = 0;
|
||||||
|
|
||||||
// Offset inside a single byte that <bytesPosition> points to (from left to right)
|
// Offset inside a single byte that <bytesPosition> points to (from left to right)
|
||||||
// 0 - highest bit, 7 - lowest bit
|
// 0 - highest bit, 7 - lowest bit
|
||||||
var bytesSubPosition = 0;
|
int bytesSubPosition = 0;
|
||||||
|
|
||||||
// Byte to look up in the dictionary
|
// Byte to look up in the dictionary
|
||||||
byte outputBase32Byte = 0;
|
byte outputBase32Byte = 0;
|
||||||
|
|
||||||
// The number of bits filled in the current output byte
|
// The number of bits filled in the current output byte
|
||||||
var outputBase32BytePosition = 0;
|
int outputBase32BytePosition = 0;
|
||||||
|
|
||||||
// Iterate through input buffer until we reach past the end of it
|
// Iterate through input buffer until we reach past the end of it
|
||||||
while(bytesPosition < bytes.Length)
|
while(bytesPosition < bytes.Length)
|
||||||
@@ -119,22 +119,22 @@ public static class Base32
|
|||||||
string base32StringUpperCase = base32String.ToUpperInvariant();
|
string base32StringUpperCase = base32String.ToUpperInvariant();
|
||||||
|
|
||||||
// Prepare output byte array
|
// Prepare output byte array
|
||||||
var outputBytes = new byte[base32StringUpperCase.Length * _outByteSize / _inByteSize];
|
byte[] outputBytes = new byte[base32StringUpperCase.Length * _outByteSize / _inByteSize];
|
||||||
|
|
||||||
// Check the size
|
// Check the size
|
||||||
if(outputBytes.Length == 0) throw new ArgumentException(Localization.Base32_Not_enought_data);
|
if(outputBytes.Length == 0) throw new ArgumentException(Localization.Base32_Not_enought_data);
|
||||||
|
|
||||||
// Position in the string
|
// Position in the string
|
||||||
var base32Position = 0;
|
int base32Position = 0;
|
||||||
|
|
||||||
// Offset inside the character in the string
|
// Offset inside the character in the string
|
||||||
var base32SubPosition = 0;
|
int base32SubPosition = 0;
|
||||||
|
|
||||||
// Position within outputBytes array
|
// Position within outputBytes array
|
||||||
var outputBytePosition = 0;
|
int outputBytePosition = 0;
|
||||||
|
|
||||||
// The number of bits filled in the current output byte
|
// The number of bits filled in the current output byte
|
||||||
var outputByteSubPosition = 0;
|
int outputByteSubPosition = 0;
|
||||||
|
|
||||||
// Normally we would iterate on the input array but in this case we actually iterate on the output array
|
// Normally we would iterate on the input array but in this case we actually iterate on the output array
|
||||||
// We do it because output array doesn't have overflow bits, while input does and it will cause output array overflow if we don''t stop in time
|
// We do it because output array doesn't have overflow bits, while input does and it will cause output array overflow if we don''t stop in time
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ static class ArmSimd
|
|||||||
{
|
{
|
||||||
uint c = crc;
|
uint c = crc;
|
||||||
|
|
||||||
var bufPos = 0;
|
int bufPos = 0;
|
||||||
|
|
||||||
while(len >= 64)
|
while(len >= 64)
|
||||||
{
|
{
|
||||||
@@ -95,7 +95,7 @@ static class ArmSimd
|
|||||||
{
|
{
|
||||||
uint c = crc;
|
uint c = crc;
|
||||||
|
|
||||||
var bufPos = 0;
|
int bufPos = 0;
|
||||||
|
|
||||||
while(len >= 32)
|
while(len >= 32)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -110,9 +110,9 @@ static class Clmul
|
|||||||
Vector128<uint> xmmCRC1 = Vector128<uint>.Zero;
|
Vector128<uint> xmmCRC1 = Vector128<uint>.Zero;
|
||||||
Vector128<uint> xmmCRC2 = Vector128<uint>.Zero;
|
Vector128<uint> xmmCRC2 = Vector128<uint>.Zero;
|
||||||
Vector128<uint> xmmCRC3 = Vector128<uint>.Zero;
|
Vector128<uint> xmmCRC3 = Vector128<uint>.Zero;
|
||||||
var bufPos = 0;
|
int bufPos = 0;
|
||||||
|
|
||||||
var first = true;
|
bool first = true;
|
||||||
|
|
||||||
/* fold 512 to 32 step variable declarations for ISO-C90 compat. */
|
/* fold 512 to 32 step variable declarations for ISO-C90 compat. */
|
||||||
var xmmMask = Vector128.Create(0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000);
|
var xmmMask = Vector128.Create(0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000);
|
||||||
|
|||||||
@@ -379,15 +379,15 @@ public sealed partial class Crc32Context : IChecksum
|
|||||||
|
|
||||||
static uint[][] GenerateTable(uint polynomial)
|
static uint[][] GenerateTable(uint polynomial)
|
||||||
{
|
{
|
||||||
var table = new uint[8][];
|
uint[][] table = new uint[8][];
|
||||||
|
|
||||||
for(var i = 0; i < 8; i++) table[i] = new uint[256];
|
for(int i = 0; i < 8; i++) table[i] = new uint[256];
|
||||||
|
|
||||||
for(var i = 0; i < 256; i++)
|
for(int i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
var entry = (uint)i;
|
uint entry = (uint)i;
|
||||||
|
|
||||||
for(var j = 0; j < 8; j++)
|
for(int j = 0; j < 8; j++)
|
||||||
{
|
{
|
||||||
if((entry & 1) == 1)
|
if((entry & 1) == 1)
|
||||||
entry = entry >> 1 ^ polynomial;
|
entry = entry >> 1 ^ polynomial;
|
||||||
@@ -398,9 +398,9 @@ public sealed partial class Crc32Context : IChecksum
|
|||||||
table[0][i] = entry;
|
table[0][i] = entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var slice = 1; slice < 8; slice++)
|
for(int slice = 1; slice < 8; slice++)
|
||||||
{
|
{
|
||||||
for(var i = 0; i < 256; i++)
|
for(int i = 0; i < 256; i++)
|
||||||
table[slice][i] = table[slice - 1][i] >> 8 ^ table[0][table[slice - 1][i] & 0xFF];
|
table[slice][i] = table[slice - 1][i] >> 8 ^ table[0][table[slice - 1][i] & 0xFF];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -417,7 +417,7 @@ public sealed partial class Crc32Context : IChecksum
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentPos = 0;
|
int currentPos = 0;
|
||||||
|
|
||||||
if(useIso)
|
if(useIso)
|
||||||
{
|
{
|
||||||
@@ -467,7 +467,7 @@ public sealed partial class Crc32Context : IChecksum
|
|||||||
{
|
{
|
||||||
uint one = BitConverter.ToUInt32(data, currentPos) ^ crc;
|
uint one = BitConverter.ToUInt32(data, currentPos) ^ crc;
|
||||||
currentPos += 4;
|
currentPos += 4;
|
||||||
var two = BitConverter.ToUInt32(data, currentPos);
|
uint two = BitConverter.ToUInt32(data, currentPos);
|
||||||
currentPos += 4;
|
currentPos += 4;
|
||||||
|
|
||||||
crc = table[0][two >> 24 & 0xFF] ^
|
crc = table[0][two >> 24 & 0xFF] ^
|
||||||
@@ -528,8 +528,8 @@ public sealed partial class Crc32Context : IChecksum
|
|||||||
|
|
||||||
uint[][] localTable = GenerateTable(polynomial);
|
uint[][] localTable = GenerateTable(polynomial);
|
||||||
|
|
||||||
var buffer = new byte[65536];
|
byte[] buffer = new byte[65536];
|
||||||
int read = fileStream.EnsureRead(buffer, 0, 65536);
|
int read = fileStream.EnsureRead(buffer, 0, 65536);
|
||||||
|
|
||||||
while(read > 0)
|
while(read > 0)
|
||||||
{
|
{
|
||||||
@@ -661,7 +661,7 @@ public sealed partial class Crc32Context : IChecksum
|
|||||||
crc32_free(_nativeContext);
|
crc32_free(_nativeContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var i = 0; i < BigEndianBitConverter.GetBytes(crc).Length; i++)
|
for(int i = 0; i < BigEndianBitConverter.GetBytes(crc).Length; i++)
|
||||||
crc32Output.Append(BigEndianBitConverter.GetBytes(crc)[i].ToString("x2"));
|
crc32Output.Append(BigEndianBitConverter.GetBytes(crc)[i].ToString("x2"));
|
||||||
|
|
||||||
return crc32Output.ToString();
|
return crc32Output.ToString();
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ static class Clmul
|
|||||||
|
|
||||||
internal static ulong Step(ulong crc, byte[] data, uint length)
|
internal static ulong Step(ulong crc, byte[] data, uint length)
|
||||||
{
|
{
|
||||||
var bufPos = 16;
|
int bufPos = 16;
|
||||||
const ulong k1 = 0xe05dd497ca393ae4;
|
const ulong k1 = 0xe05dd497ca393ae4;
|
||||||
const ulong k2 = 0xdabe95afc7875f40;
|
const ulong k2 = 0xdabe95afc7875f40;
|
||||||
const ulong mu = 0x9c3e466c172963d5;
|
const ulong mu = 0x9c3e466c172963d5;
|
||||||
|
|||||||
@@ -324,15 +324,15 @@ public sealed partial class Crc64Context : IChecksum
|
|||||||
|
|
||||||
static ulong[][] GenerateTable(ulong polynomial)
|
static ulong[][] GenerateTable(ulong polynomial)
|
||||||
{
|
{
|
||||||
var table = new ulong[8][];
|
ulong[][] table = new ulong[8][];
|
||||||
|
|
||||||
for(var i = 0; i < 8; i++) table[i] = new ulong[256];
|
for(int i = 0; i < 8; i++) table[i] = new ulong[256];
|
||||||
|
|
||||||
for(var i = 0; i < 256; i++)
|
for(int i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
var entry = (ulong)i;
|
ulong entry = (ulong)i;
|
||||||
|
|
||||||
for(var j = 0; j < 8; j++)
|
for(int j = 0; j < 8; j++)
|
||||||
{
|
{
|
||||||
if((entry & 1) == 1)
|
if((entry & 1) == 1)
|
||||||
entry = entry >> 1 ^ polynomial;
|
entry = entry >> 1 ^ polynomial;
|
||||||
@@ -343,9 +343,9 @@ public sealed partial class Crc64Context : IChecksum
|
|||||||
table[0][i] = entry;
|
table[0][i] = entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var slice = 1; slice < 4; slice++)
|
for(int slice = 1; slice < 4; slice++)
|
||||||
{
|
{
|
||||||
for(var i = 0; i < 256; i++)
|
for(int i = 0; i < 256; i++)
|
||||||
table[slice][i] = table[slice - 1][i] >> 8 ^ table[0][table[slice - 1][i] & 0xFF];
|
table[slice][i] = table[slice - 1][i] >> 8 ^ table[0][table[slice - 1][i] & 0xFF];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -362,7 +362,7 @@ public sealed partial class Crc64Context : IChecksum
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var dataOff = 0;
|
int dataOff = 0;
|
||||||
|
|
||||||
if(useEcma && Pclmulqdq.IsSupported && Sse41.IsSupported && Ssse3.IsSupported && Sse2.IsSupported)
|
if(useEcma && Pclmulqdq.IsSupported && Sse41.IsSupported && Ssse3.IsSupported && Sse2.IsSupported)
|
||||||
{
|
{
|
||||||
@@ -393,7 +393,7 @@ public sealed partial class Crc64Context : IChecksum
|
|||||||
|
|
||||||
while(dataOff < limit)
|
while(dataOff < limit)
|
||||||
{
|
{
|
||||||
var tmp = (uint)(crc ^ BitConverter.ToUInt32(data, dataOff));
|
uint tmp = (uint)(crc ^ BitConverter.ToUInt32(data, dataOff));
|
||||||
dataOff += 4;
|
dataOff += 4;
|
||||||
|
|
||||||
crc = table[3][tmp & 0xFF] ^
|
crc = table[3][tmp & 0xFF] ^
|
||||||
@@ -449,8 +449,8 @@ public sealed partial class Crc64Context : IChecksum
|
|||||||
|
|
||||||
ulong[][] localTable = GenerateTable(polynomial);
|
ulong[][] localTable = GenerateTable(polynomial);
|
||||||
|
|
||||||
var buffer = new byte[65536];
|
byte[] buffer = new byte[65536];
|
||||||
int read = fileStream.EnsureRead(buffer, 0, 65536);
|
int read = fileStream.EnsureRead(buffer, 0, 65536);
|
||||||
|
|
||||||
while(read > 0)
|
while(read > 0)
|
||||||
{
|
{
|
||||||
@@ -582,7 +582,7 @@ public sealed partial class Crc64Context : IChecksum
|
|||||||
crc64_free(_nativeContext);
|
crc64_free(_nativeContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var i = 0; i < BigEndianBitConverter.GetBytes(crc).Length; i++)
|
for(int i = 0; i < BigEndianBitConverter.GetBytes(crc).Length; i++)
|
||||||
crc64Output.Append(BigEndianBitConverter.GetBytes(crc)[i].ToString("x2"));
|
crc64Output.Append(BigEndianBitConverter.GetBytes(crc)[i].ToString("x2"));
|
||||||
|
|
||||||
return crc64Output.ToString();
|
return crc64Output.ToString();
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public sealed class SpamSumContext : IChecksum
|
|||||||
Bh = new BlockhashContext[NUM_BLOCKHASHES]
|
Bh = new BlockhashContext[NUM_BLOCKHASHES]
|
||||||
};
|
};
|
||||||
|
|
||||||
for(var i = 0; i < NUM_BLOCKHASHES; i++) _self.Bh[i].Digest = new byte[SPAMSUM_LENGTH];
|
for(int i = 0; i < NUM_BLOCKHASHES; i++) _self.Bh[i].Digest = new byte[SPAMSUM_LENGTH];
|
||||||
|
|
||||||
_self.Bhstart = 0;
|
_self.Bhstart = 0;
|
||||||
_self.Bhend = 1;
|
_self.Bhend = 1;
|
||||||
@@ -240,7 +240,7 @@ public sealed class SpamSumContext : IChecksum
|
|||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
uint bi = _self.Bhstart;
|
uint bi = _self.Bhstart;
|
||||||
uint h = roll_sum();
|
uint h = roll_sum();
|
||||||
var remain = (int)(FUZZY_MAX_RESULT - 1); /* Exclude terminating '\0'. */
|
int remain = (int)(FUZZY_MAX_RESULT - 1); /* Exclude terminating '\0'. */
|
||||||
result = new byte[FUZZY_MAX_RESULT];
|
result = new byte[FUZZY_MAX_RESULT];
|
||||||
|
|
||||||
/* Verify that our elimination was not overeager. */
|
/* Verify that our elimination was not overeager. */
|
||||||
@@ -423,7 +423,7 @@ public sealed class SpamSumContext : IChecksum
|
|||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
static string CToString(byte[] cString)
|
static string CToString(byte[] cString)
|
||||||
{
|
{
|
||||||
var count = 0;
|
int count = 0;
|
||||||
|
|
||||||
// ReSharper disable once LoopCanBeConvertedToQuery
|
// ReSharper disable once LoopCanBeConvertedToQuery
|
||||||
// LINQ is six times slower
|
// LINQ is six times slower
|
||||||
@@ -506,7 +506,7 @@ public sealed class SpamSumContext : IChecksum
|
|||||||
{
|
{
|
||||||
_self.TotalSize += len;
|
_self.TotalSize += len;
|
||||||
|
|
||||||
for(var i = 0; i < len; i++) fuzzy_engine_step(data[i]);
|
for(int i = 0; i < len; i++) fuzzy_engine_step(data[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public static class Extensions
|
|||||||
/// </returns>
|
/// </returns>
|
||||||
public static int EnsureRead(this Stream s, byte[] buffer, int offset, int count)
|
public static int EnsureRead(this Stream s, byte[] buffer, int offset, int count)
|
||||||
{
|
{
|
||||||
var pos = 0;
|
int pos = 0;
|
||||||
int read;
|
int read;
|
||||||
|
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -509,7 +509,7 @@ public sealed class Fuse : FileSystem
|
|||||||
{
|
{
|
||||||
xattr = new byte[hash.Length / 2];
|
xattr = new byte[hash.Length / 2];
|
||||||
|
|
||||||
for(var i = 0; i < xattr.Length; i++)
|
for(int i = 0; i < xattr.Length; i++)
|
||||||
{
|
{
|
||||||
if(hash[i * 2] >= 0x30 && hash[i * 2] <= 0x39)
|
if(hash[i * 2] >= 0x30 && hash[i * 2] <= 0x39)
|
||||||
xattr[i] = (byte)((hash[i * 2] - 0x30) * 0x10);
|
xattr[i] = (byte)((hash[i * 2] - 0x30) * 0x10);
|
||||||
@@ -823,8 +823,8 @@ public sealed class Fuse : FileSystem
|
|||||||
|
|
||||||
public void Umount()
|
public void Umount()
|
||||||
{
|
{
|
||||||
var rnd = new Random();
|
var rnd = new Random();
|
||||||
var token = new byte[64];
|
byte[] token = new byte[64];
|
||||||
rnd.NextBytes(token);
|
rnd.NextBytes(token);
|
||||||
_umountToken = Base32.ToBase32String(token);
|
_umountToken = Base32.ToBase32String(token);
|
||||||
setxattr(Path.Combine(MountPoint, ".fuse_umount"), _umountToken, IntPtr.Zero, 0, 0);
|
setxattr(Path.Combine(MountPoint, ".fuse_umount"), _umountToken, IntPtr.Zero, 0, 0);
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ public class Winfsp(Vfs vfs) : FileSystemBase
|
|||||||
|
|
||||||
if(fileNode is not FileNode { Handle: > 0 } node) return STATUS_INVALID_HANDLE;
|
if(fileNode is not FileNode { Handle: > 0 } node) return STATUS_INVALID_HANDLE;
|
||||||
|
|
||||||
var buf = new byte[length];
|
byte[] buf = new byte[length];
|
||||||
|
|
||||||
int ret = vfs.Read(node.Handle, buf, (long)offset);
|
int ret = vfs.Read(node.Handle, buf, (long)offset);
|
||||||
|
|
||||||
@@ -575,10 +575,10 @@ public class Winfsp(Vfs vfs) : FileSystemBase
|
|||||||
|
|
||||||
if(securityDescriptor == null) return STATUS_SUCCESS;
|
if(securityDescriptor == null) return STATUS_SUCCESS;
|
||||||
|
|
||||||
var rootSddl = "O:BAG:BAD:P(A;;FA;;;SY)(A;;FA;;;BA)(A;;FA;;;WD)";
|
string rootSddl = "O:BAG:BAD:P(A;;FA;;;SY)(A;;FA;;;BA)(A;;FA;;;WD)";
|
||||||
|
|
||||||
var rootSecurityDescriptor = new RawSecurityDescriptor(rootSddl);
|
var rootSecurityDescriptor = new RawSecurityDescriptor(rootSddl);
|
||||||
var fileSecurity = new byte[rootSecurityDescriptor.BinaryLength];
|
byte[] fileSecurity = new byte[rootSecurityDescriptor.BinaryLength];
|
||||||
rootSecurityDescriptor.GetBinaryForm(fileSecurity, 0);
|
rootSecurityDescriptor.GetBinaryForm(fileSecurity, 0);
|
||||||
securityDescriptor = fileSecurity;
|
securityDescriptor = fileSecurity;
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ internal sealed class ForcedSeekStream<T> : Stream where T : Stream
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
var buffer = new byte[BUFFER_LEN];
|
byte[] buffer = new byte[BUFFER_LEN];
|
||||||
read = _baseStream.Read(buffer, 0, BUFFER_LEN);
|
read = _baseStream.Read(buffer, 0, BUFFER_LEN);
|
||||||
_backStream.Write(buffer, 0, read);
|
_backStream.Write(buffer, 0, read);
|
||||||
} while(read == BUFFER_LEN);
|
} while(read == BUFFER_LEN);
|
||||||
@@ -111,11 +111,11 @@ internal sealed class ForcedSeekStream<T> : Stream where T : Stream
|
|||||||
|
|
||||||
_backStream.Position = _backStream.Length;
|
_backStream.Position = _backStream.Length;
|
||||||
long toPosition = position - _backStream.Position;
|
long toPosition = position - _backStream.Position;
|
||||||
var fullBufferReads = (int)(toPosition / BUFFER_LEN);
|
int fullBufferReads = (int)(toPosition / BUFFER_LEN);
|
||||||
var restToRead = (int)(toPosition % BUFFER_LEN);
|
int restToRead = (int)(toPosition % BUFFER_LEN);
|
||||||
byte[] buffer;
|
byte[] buffer;
|
||||||
|
|
||||||
for(var i = 0; i < fullBufferReads; i++)
|
for(int i = 0; i < fullBufferReads; i++)
|
||||||
{
|
{
|
||||||
buffer = new byte[BUFFER_LEN];
|
buffer = new byte[BUFFER_LEN];
|
||||||
_baseStream.EnsureRead(buffer, 0, BUFFER_LEN);
|
_baseStream.EnsureRead(buffer, 0, BUFFER_LEN);
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ public sealed class DatImporter
|
|||||||
Maximum = machineNames.Count
|
Maximum = machineNames.Count
|
||||||
});
|
});
|
||||||
|
|
||||||
var position = 0;
|
int position = 0;
|
||||||
var machines = new Dictionary<string, Machine>();
|
var machines = new Dictionary<string, Machine>();
|
||||||
|
|
||||||
foreach(string name in machineNames)
|
foreach(string name in machineNames)
|
||||||
@@ -223,29 +223,29 @@ public sealed class DatImporter
|
|||||||
var disks = new List<Disk>();
|
var disks = new List<Disk>();
|
||||||
var medias = new List<Media>();
|
var medias = new List<Media>();
|
||||||
|
|
||||||
var tmpRomCrc32Table = Guid.NewGuid().ToString();
|
string tmpRomCrc32Table = Guid.NewGuid().ToString();
|
||||||
var tmpRomMd5Table = Guid.NewGuid().ToString();
|
string tmpRomMd5Table = Guid.NewGuid().ToString();
|
||||||
var tmpRomSha1Table = Guid.NewGuid().ToString();
|
string tmpRomSha1Table = Guid.NewGuid().ToString();
|
||||||
var tmpRomSha256Table = Guid.NewGuid().ToString();
|
string tmpRomSha256Table = Guid.NewGuid().ToString();
|
||||||
var tmpRomSha384Table = Guid.NewGuid().ToString();
|
string tmpRomSha384Table = Guid.NewGuid().ToString();
|
||||||
var tmpRomSha512Table = Guid.NewGuid().ToString();
|
string tmpRomSha512Table = Guid.NewGuid().ToString();
|
||||||
var tmpDiskMd5Table = Guid.NewGuid().ToString();
|
string tmpDiskMd5Table = Guid.NewGuid().ToString();
|
||||||
var tmpDiskSha1Table = Guid.NewGuid().ToString();
|
string tmpDiskSha1Table = Guid.NewGuid().ToString();
|
||||||
var tmpMediaMd5Table = Guid.NewGuid().ToString();
|
string tmpMediaMd5Table = Guid.NewGuid().ToString();
|
||||||
var tmpMediaSha1Table = Guid.NewGuid().ToString();
|
string tmpMediaSha1Table = Guid.NewGuid().ToString();
|
||||||
var tmpMediaSha256Table = Guid.NewGuid().ToString();
|
string tmpMediaSha256Table = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
var romsHaveCrc = false;
|
bool romsHaveCrc = false;
|
||||||
var romsHaveMd5 = false;
|
bool romsHaveMd5 = false;
|
||||||
var romsHaveSha1 = false;
|
bool romsHaveSha1 = false;
|
||||||
var romsHaveSha256 = false;
|
bool romsHaveSha256 = false;
|
||||||
var romsHaveSha384 = false;
|
bool romsHaveSha384 = false;
|
||||||
var romsHaveSha512 = false;
|
bool romsHaveSha512 = false;
|
||||||
var disksHaveMd5 = false;
|
bool disksHaveMd5 = false;
|
||||||
var disksHaveSha1 = false;
|
bool disksHaveSha1 = false;
|
||||||
var mediasHaveMd5 = false;
|
bool mediasHaveMd5 = false;
|
||||||
var mediasHaveSha1 = false;
|
bool mediasHaveSha1 = false;
|
||||||
var mediasHaveSha256 = false;
|
bool mediasHaveSha256 = false;
|
||||||
|
|
||||||
DbConnection dbConnection = ctx.Database.GetDbConnection();
|
DbConnection dbConnection = ctx.Database.GetDbConnection();
|
||||||
dbConnection.Open();
|
dbConnection.Open();
|
||||||
@@ -626,7 +626,7 @@ public sealed class DatImporter
|
|||||||
|
|
||||||
foreach(Rom rom in roms)
|
foreach(Rom rom in roms)
|
||||||
{
|
{
|
||||||
var hashCollision = false;
|
bool hashCollision = false;
|
||||||
|
|
||||||
SetProgress?.Invoke(this,
|
SetProgress?.Invoke(this,
|
||||||
new ProgressEventArgs
|
new ProgressEventArgs
|
||||||
@@ -648,7 +648,7 @@ public sealed class DatImporter
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var uSize = (ulong)rom.GetInt64FieldValue(SabreTools.Models.Metadata.Rom.SizeKey);
|
ulong uSize = (ulong)rom.GetInt64FieldValue(SabreTools.Models.Metadata.Rom.SizeKey);
|
||||||
|
|
||||||
DbFile file = null;
|
DbFile file = null;
|
||||||
|
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ public static class DetectOS
|
|||||||
/// <returns>Current operating system version</returns>
|
/// <returns>Current operating system version</returns>
|
||||||
public static string GetVersion()
|
public static string GetVersion()
|
||||||
{
|
{
|
||||||
var environ = Environment.OSVersion.Version.ToString();
|
string environ = Environment.OSVersion.Version.ToString();
|
||||||
|
|
||||||
switch(GetRealPlatformID())
|
switch(GetRealPlatformID())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,18 +1,22 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:s="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xml:space="preserve">
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Aaru/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Aaru/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Claunia/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Claunia/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=datfiles/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=datfiles/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=dlclose/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=dlclose/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=HKLM/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=HKLM/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=libdl/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=libdl/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=lsar/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=lsar/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=romrepo/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=romrepo/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=romrepombgrfs/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=romrepombgrfs/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=romrepomgr/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=romrepomgr/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=setxattr/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=setxattr/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Umounted/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Umounted/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=unar/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=unar/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Winfsp/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Winfsp/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=xattr/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=xattr/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=xattrs/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=xattrs/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=_0020_007B_000A_0020_0020_0020_0020/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
<s:Boolean
|
||||||
|
x:Key="/Default/UserDictionary/Words/=_0020_007B_000A_0020_0020_0020_0020/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||||
@@ -14,23 +14,27 @@ public class SerilogSink(LogEventLevel minimumLevel, IList<string>? areas = null
|
|||||||
public void Log(LogEventLevel level, string area, object? source, string messageTemplate)
|
public void Log(LogEventLevel level, string area, object? source, string messageTemplate)
|
||||||
{
|
{
|
||||||
if(IsEnabled(level, area))
|
if(IsEnabled(level, area))
|
||||||
|
{
|
||||||
Serilog.Log.Write(LogLevelToSerilogLevel(level),
|
Serilog.Log.Write(LogLevelToSerilogLevel(level),
|
||||||
"[{Area} {Source}] {MessageTemplate}",
|
"[{Area} {Source}] {MessageTemplate}",
|
||||||
area,
|
area,
|
||||||
source,
|
source,
|
||||||
messageTemplate);
|
messageTemplate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Log(LogEventLevel level, string area, object? source, string messageTemplate,
|
public void Log(LogEventLevel level, string area, object? source, string messageTemplate,
|
||||||
params object?[] propertyValues)
|
params object?[] propertyValues)
|
||||||
{
|
{
|
||||||
if(IsEnabled(level, area))
|
if(IsEnabled(level, area))
|
||||||
|
{
|
||||||
Serilog.Log.Write(LogLevelToSerilogLevel(level),
|
Serilog.Log.Write(LogLevelToSerilogLevel(level),
|
||||||
"[{Area} {Source}] {MessageTemplate}",
|
"[{Area} {Source}] {MessageTemplate}",
|
||||||
propertyValues,
|
propertyValues,
|
||||||
area,
|
area,
|
||||||
source,
|
source,
|
||||||
messageTemplate);
|
messageTemplate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Serilog.Events.LogEventLevel LogLevelToSerilogLevel(LogEventLevel level)
|
private static Serilog.Events.LogEventLevel LogLevelToSerilogLevel(LogEventLevel level)
|
||||||
|
|||||||
@@ -95,9 +95,9 @@ public sealed partial class ExportDatViewModel : ViewModelBase
|
|||||||
ProgressVisible = true;
|
ProgressVisible = true;
|
||||||
StatusMessage = Localization.DecompressingDat;
|
StatusMessage = Localization.DecompressingDat;
|
||||||
|
|
||||||
var sha384Bytes = new byte[48];
|
byte[] sha384Bytes = new byte[48];
|
||||||
|
|
||||||
for(var i = 0; i < 48; i++)
|
for(int i = 0; i < 48; i++)
|
||||||
{
|
{
|
||||||
if(_datHash[i * 2] >= 0x30 && _datHash[i * 2] <= 0x39)
|
if(_datHash[i * 2] >= 0x30 && _datHash[i * 2] <= 0x39)
|
||||||
sha384Bytes[i] = (byte)((_datHash[i * 2] - 0x30) * 0x10);
|
sha384Bytes[i] = (byte)((_datHash[i * 2] - 0x30) * 0x10);
|
||||||
|
|||||||
@@ -76,10 +76,10 @@ public sealed partial class RemoveDatViewModel : ViewModelBase
|
|||||||
|
|
||||||
Dispatcher.UIThread.Post(() => StatusMessage = Localization.RemovingDatFileFromRepo);
|
Dispatcher.UIThread.Post(() => StatusMessage = Localization.RemovingDatFileFromRepo);
|
||||||
|
|
||||||
var sha384Bytes = new byte[48];
|
byte[] sha384Bytes = new byte[48];
|
||||||
string sha384 = romSet.Sha384;
|
string sha384 = romSet.Sha384;
|
||||||
|
|
||||||
for(var i = 0; i < 48; i++)
|
for(int i = 0; i < 48; i++)
|
||||||
{
|
{
|
||||||
if(sha384[i * 2] >= 0x30 && sha384[i * 2] <= 0x39)
|
if(sha384[i * 2] >= 0x30 && sha384[i * 2] <= 0x39)
|
||||||
sha384Bytes[i] = (byte)((sha384[i * 2] - 0x30) * 0x10);
|
sha384Bytes[i] = (byte)((sha384[i * 2] - 0x30) * 0x10);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"projectId":"ad616503-97fa-41cc-8470-2fd4ac56d06f","projectName":"RomRepoMgr"}
|
{"projectId": "ad616503-97fa-41cc-8470-2fd4ac56d06f", "projectName": "RomRepoMgr"}
|
||||||
Reference in New Issue
Block a user