mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Redo Reformat and cleanup.
Rider EAP was having a bug interpreting .editorconfig that didn't generate the code style as we wanted. This is now done with Rider-stable.
This commit is contained in:
@@ -75,8 +75,7 @@ public sealed class AboutViewModel : ViewModelBase
|
||||
(Attribute.GetCustomAttribute(assembly, typeof(AssemblyInformationalVersionAttribute)) as
|
||||
AssemblyInformationalVersionAttribute)?.InformationalVersion;
|
||||
|
||||
if(name is null ||
|
||||
version is null)
|
||||
if(name is null || version is null)
|
||||
continue;
|
||||
|
||||
Assemblies.Add(new AssemblyModel
|
||||
|
||||
@@ -99,8 +99,11 @@ public sealed class ConsoleViewModel : ViewModelBase
|
||||
|
||||
dlgSave.Filters?.Add(new FileDialogFilter
|
||||
{
|
||||
Extensions = new List<string>(new[] { "log" }),
|
||||
Name = UI.Dialog_Log_files
|
||||
Extensions = new List<string>(new[]
|
||||
{
|
||||
"log"
|
||||
}),
|
||||
Name = UI.Dialog_Log_files
|
||||
});
|
||||
|
||||
string result = await dlgSave.ShowAsync(_view);
|
||||
@@ -158,10 +161,8 @@ public sealed class ConsoleViewModel : ViewModelBase
|
||||
{
|
||||
await MessageBoxManager.GetMessageBoxStandard(UI.Title_Error,
|
||||
string.
|
||||
Format(
|
||||
UI.
|
||||
Exception_0_trying_to_save_logfile_details_has_been_sent_to_console,
|
||||
exception.Message), ButtonEnum.Ok, Icon.Error).
|
||||
Format(UI.Exception_0_trying_to_save_logfile_details_has_been_sent_to_console,
|
||||
exception.Message), ButtonEnum.Ok, Icon.Error).
|
||||
ShowWindowDialogAsync(_view);
|
||||
|
||||
AaruConsole.ErrorWriteLine("Console", exception.Message);
|
||||
|
||||
@@ -55,17 +55,20 @@ public sealed class EncodingsViewModel : ViewModelBase
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
var encodings = Encoding.GetEncodings().Select(info => new EncodingModel
|
||||
{
|
||||
Name = info.Name,
|
||||
DisplayName = info.GetEncoding().EncodingName
|
||||
}).ToList();
|
||||
var encodings = Encoding.GetEncodings().
|
||||
Select(info => new EncodingModel
|
||||
{
|
||||
Name = info.Name,
|
||||
DisplayName = info.GetEncoding().EncodingName
|
||||
}).
|
||||
ToList();
|
||||
|
||||
encodings.AddRange(Claunia.Encoding.Encoding.GetEncodings().Select(info => new EncodingModel
|
||||
{
|
||||
Name = info.Name,
|
||||
DisplayName = info.DisplayName
|
||||
}));
|
||||
encodings.AddRange(Claunia.Encoding.Encoding.GetEncodings().
|
||||
Select(info => new EncodingModel
|
||||
{
|
||||
Name = info.Name,
|
||||
DisplayName = info.DisplayName
|
||||
}));
|
||||
|
||||
foreach(EncodingModel encoding in encodings.OrderBy(t => t.DisplayName))
|
||||
Encodings.Add(encoding);
|
||||
|
||||
@@ -132,7 +132,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "fs-info"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "fs-info" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "fs-info" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "fs-info" && !c.Synchronized);
|
||||
@@ -143,7 +144,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "checksum"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "checksum" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "checksum" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "checksum" && !c.Synchronized);
|
||||
@@ -154,7 +156,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "compare"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "compare" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "compare" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "compare" && !c.Synchronized);
|
||||
@@ -165,7 +168,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "convert-image"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "convert-image" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "convert-image" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "convert-image" && !c.Synchronized);
|
||||
@@ -177,7 +181,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
if(ctx.Commands.Any(c => c.Name == "create-sidecar"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "create-sidecar" && c.Synchronized).
|
||||
Select(c => c.Count).FirstOrDefault();
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "create-sidecar" && !c.Synchronized);
|
||||
|
||||
@@ -187,7 +192,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "decode"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "decode" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "decode" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "decode" && !c.Synchronized);
|
||||
@@ -198,7 +204,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "device-info"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "device-info" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "device-info" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "device-info" && !c.Synchronized);
|
||||
@@ -209,7 +216,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "device-report"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "device-report" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "device-report" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "device-report" && !c.Synchronized);
|
||||
@@ -220,7 +228,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "dump-media"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "dump-media" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "dump-media" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "dump-media" && !c.Synchronized);
|
||||
@@ -231,7 +240,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "entropy"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "entropy" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "entropy" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "entropy" && !c.Synchronized);
|
||||
@@ -242,7 +252,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "formats"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "formats" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "formats" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "formats" && !c.Synchronized);
|
||||
@@ -253,7 +264,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "image-info"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "image-info" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "image-info" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "image-info" && !c.Synchronized);
|
||||
@@ -264,7 +276,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "media-info"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "media-info" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "media-info" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "media-info" && !c.Synchronized);
|
||||
@@ -275,7 +288,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "media-scan"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "media-scan" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "media-scan" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "media-scan" && !c.Synchronized);
|
||||
@@ -286,7 +300,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "printhex"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "printhex" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "printhex" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "printhex" && !c.Synchronized);
|
||||
@@ -297,7 +312,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
if(ctx.Commands.Any(c => c.Name == "verify"))
|
||||
{
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "verify" && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Commands.Where(c => c.Name == "verify" && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Commands.LongCount(c => c.Name == "verify" && !c.Synchronized);
|
||||
@@ -306,10 +322,22 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
VerifyText = string.Format(UI.You_have_called_the_Verify_command_0_times, count);
|
||||
}
|
||||
|
||||
CommandsVisible = FsInfoVisible || ChecksumVisible || CompareVisible || ConvertImageVisible ||
|
||||
CreateSidecarVisible || DecodeVisible || DeviceInfoVisible || DeviceReportVisible ||
|
||||
DumpMediaVisible || EntropyVisible || FormatsCommandVisible || ImageInfoVisible ||
|
||||
MediaInfoVisible || MediaScanVisible || PrintHexVisible || VerifyVisible;
|
||||
CommandsVisible = FsInfoVisible ||
|
||||
ChecksumVisible ||
|
||||
CompareVisible ||
|
||||
ConvertImageVisible ||
|
||||
CreateSidecarVisible ||
|
||||
DecodeVisible ||
|
||||
DeviceInfoVisible ||
|
||||
DeviceReportVisible ||
|
||||
DumpMediaVisible ||
|
||||
EntropyVisible ||
|
||||
FormatsCommandVisible ||
|
||||
ImageInfoVisible ||
|
||||
MediaInfoVisible ||
|
||||
MediaScanVisible ||
|
||||
PrintHexVisible ||
|
||||
VerifyVisible;
|
||||
}
|
||||
|
||||
if(ctx.Filters.Any())
|
||||
@@ -318,7 +346,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
foreach(string nvs in ctx.Filters.Select(n => n.Name).Distinct())
|
||||
{
|
||||
ulong count = ctx.Filters.Where(c => c.Name == nvs && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Filters.Where(c => c.Name == nvs && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Filters.LongCount(c => c.Name == nvs && !c.Synchronized);
|
||||
@@ -337,7 +366,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
foreach(string nvs in ctx.MediaFormats.Select(n => n.Name).Distinct())
|
||||
{
|
||||
ulong count = ctx.MediaFormats.Where(c => c.Name == nvs && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.MediaFormats.Where(c => c.Name == nvs && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.MediaFormats.LongCount(c => c.Name == nvs && !c.Synchronized);
|
||||
@@ -356,7 +386,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
foreach(string nvs in ctx.Partitions.Select(n => n.Name).Distinct())
|
||||
{
|
||||
ulong count = ctx.Partitions.Where(c => c.Name == nvs && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Partitions.Where(c => c.Name == nvs && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Partitions.LongCount(c => c.Name == nvs && !c.Synchronized);
|
||||
@@ -375,7 +406,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
foreach(string nvs in ctx.Filesystems.Select(n => n.Name).Distinct())
|
||||
{
|
||||
ulong count = ctx.Filesystems.Where(c => c.Name == nvs && c.Synchronized).Select(c => c.Count).
|
||||
ulong count = ctx.Filesystems.Where(c => c.Name == nvs && c.Synchronized).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Filesystems.LongCount(c => c.Name == nvs && !c.Synchronized);
|
||||
@@ -392,8 +424,10 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
{
|
||||
DevicesVisible = true;
|
||||
|
||||
foreach(DeviceStat ds in ctx.SeenDevices.OrderBy(n => n.Manufacturer).ThenBy(n => n.Manufacturer).
|
||||
ThenBy(n => n.Revision).ThenBy(n => n.Bus))
|
||||
foreach(DeviceStat ds in ctx.SeenDevices.OrderBy(n => n.Manufacturer).
|
||||
ThenBy(n => n.Manufacturer).
|
||||
ThenBy(n => n.Revision).
|
||||
ThenBy(n => n.Bus))
|
||||
{
|
||||
Devices.Add(new DeviceStatsModel
|
||||
{
|
||||
@@ -412,7 +446,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
|
||||
foreach(string media in ctx.Medias.OrderBy(ms => ms.Type).Select(ms => ms.Type).Distinct())
|
||||
{
|
||||
ulong count = ctx.Medias.Where(c => c.Type == media && c.Synchronized && c.Real).Select(c => c.Count).
|
||||
ulong count = ctx.Medias.Where(c => c.Type == media && c.Synchronized && c.Real).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Medias.LongCount(c => c.Type == media && !c.Synchronized && c.Real);
|
||||
@@ -427,7 +462,8 @@ public sealed class StatisticsViewModel : ViewModelBase
|
||||
});
|
||||
}
|
||||
|
||||
count = ctx.Medias.Where(c => c.Type == media && c.Synchronized && !c.Real).Select(c => c.Count).
|
||||
count = ctx.Medias.Where(c => c.Type == media && c.Synchronized && !c.Real).
|
||||
Select(c => c.Count).
|
||||
FirstOrDefault();
|
||||
|
||||
count += (ulong)ctx.Medias.LongCount(c => c.Type == media && !c.Synchronized && !c.Real);
|
||||
|
||||
Reference in New Issue
Block a user