2020-04-17 21:45:50 +01:00
|
|
|
|
// /***************************************************************************
|
|
|
|
|
|
// Aaru Data Preservation Suite
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : StatisticsViewModel.cs
|
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
|
|
|
|
|
// Component : GUI view models.
|
|
|
|
|
|
//
|
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// View model and code for the statistics dialog.
|
|
|
|
|
|
//
|
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
|
// it under the terms of the GNU General public License as
|
|
|
|
|
|
// published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
|
//
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
|
// GNU General public License for more details.
|
|
|
|
|
|
//
|
|
|
|
|
|
// You should have received a copy of the GNU General public License
|
|
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2024-12-19 10:45:18 +00:00
|
|
|
|
// Copyright © 2011-2025 Natalia Portillo
|
2020-04-17 21:45:50 +01:00
|
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
using System.Collections.ObjectModel;
|
2020-04-10 18:52:50 +01:00
|
|
|
|
using System.Linq;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
using System.Windows.Input;
|
2020-04-10 18:52:50 +01:00
|
|
|
|
using Aaru.Database;
|
|
|
|
|
|
using Aaru.Database.Models;
|
|
|
|
|
|
using Aaru.Gui.Models;
|
2020-04-16 20:40:25 +01:00
|
|
|
|
using Aaru.Gui.Views.Dialogs;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
using Aaru.Localization;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
using CommunityToolkit.Mvvm.Input;
|
2020-07-22 13:20:25 +01:00
|
|
|
|
using NameCountModel = Aaru.Gui.Models.NameCountModel;
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-11-15 15:58:43 +00:00
|
|
|
|
namespace Aaru.Gui.ViewModels.Dialogs;
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public sealed class StatisticsViewModel : ViewModelBase
|
2020-04-10 18:52:50 +01:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
readonly StatisticsDialog _view;
|
|
|
|
|
|
string _checksumText;
|
|
|
|
|
|
bool _checksumVisible;
|
|
|
|
|
|
bool _commandsVisible;
|
|
|
|
|
|
string _compareText;
|
|
|
|
|
|
bool _compareVisible;
|
|
|
|
|
|
string _convertImageText;
|
|
|
|
|
|
bool _convertImageVisible;
|
|
|
|
|
|
string _createSidecarText;
|
|
|
|
|
|
bool _createSidecarVisible;
|
|
|
|
|
|
string _decodeText;
|
|
|
|
|
|
bool _decodeVisible;
|
|
|
|
|
|
string _deviceInfoText;
|
|
|
|
|
|
bool _deviceInfoVisible;
|
|
|
|
|
|
string _deviceReportText;
|
|
|
|
|
|
bool _deviceReportVisible;
|
|
|
|
|
|
bool _devicesVisible;
|
|
|
|
|
|
string _dumpMediaText;
|
|
|
|
|
|
bool _dumpMediaVisible;
|
|
|
|
|
|
string _entropyText;
|
|
|
|
|
|
bool _entropyVisible;
|
|
|
|
|
|
bool _filesystemsVisible;
|
|
|
|
|
|
bool _filtersVisible;
|
|
|
|
|
|
bool _formatsCommandVisible;
|
|
|
|
|
|
string _formatsText;
|
|
|
|
|
|
bool _formatsVisible;
|
2022-11-16 21:40:54 +00:00
|
|
|
|
string _fsinfoText;
|
|
|
|
|
|
bool _fsinfoVisible;
|
|
|
|
|
|
string _imageInfoText;
|
|
|
|
|
|
bool _imageInfoVisible;
|
|
|
|
|
|
string _mediaInfoText;
|
|
|
|
|
|
bool _mediaInfoVisible;
|
|
|
|
|
|
string _mediaScanText;
|
|
|
|
|
|
bool _mediaScanVisible;
|
|
|
|
|
|
bool _mediasVisible;
|
|
|
|
|
|
bool _partitionsVisible;
|
|
|
|
|
|
string _printHexText;
|
|
|
|
|
|
bool _printHexVisible;
|
|
|
|
|
|
string _verifyText;
|
|
|
|
|
|
bool _verifyVisible;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
public StatisticsViewModel(StatisticsDialog view)
|
|
|
|
|
|
{
|
|
|
|
|
|
_view = view;
|
2024-05-01 04:39:38 +01:00
|
|
|
|
Filters = [];
|
|
|
|
|
|
Formats = [];
|
|
|
|
|
|
Partitions = [];
|
|
|
|
|
|
Filesystems = [];
|
|
|
|
|
|
Devices = [];
|
|
|
|
|
|
Medias = [];
|
2025-08-20 21:19:43 +01:00
|
|
|
|
CloseCommand = new RelayCommand(Close);
|
2022-11-15 15:58:43 +00:00
|
|
|
|
using var ctx = AaruContext.Create(Settings.Settings.LocalDbPath);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
if(ctx.Commands.Any())
|
|
|
|
|
|
{
|
|
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "analyze"))
|
2020-04-10 18:52:50 +01:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
foreach(Command oldAnalyze in ctx.Commands.Where(c => c.Name == "analyze"))
|
2020-04-10 18:52:50 +01:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
oldAnalyze.Name = "fs-info";
|
|
|
|
|
|
ctx.Commands.Update(oldAnalyze);
|
2021-03-05 14:17:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
ulong count = 0;
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
foreach(Command fsInfo in ctx.Commands.Where(c => c.Name == "fs-info" && c.Synchronized))
|
2020-04-10 18:52:50 +01:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += fsInfo.Count;
|
|
|
|
|
|
ctx.Remove(fsInfo);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(count > 0)
|
2023-10-03 23:27:57 +01:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
ctx.Commands.Add(new Command
|
|
|
|
|
|
{
|
|
|
|
|
|
Count = count,
|
|
|
|
|
|
Name = "fs-info",
|
|
|
|
|
|
Synchronized = true
|
|
|
|
|
|
});
|
2023-10-03 23:27:57 +01:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
ctx.SaveChanges();
|
|
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "fs-info"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "fs-info" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "fs-info" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
FsInfoVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
FsInfoText = string.Format(UI.You_have_called_the_Filesystem_Info_command_0_times, count);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "checksum"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "checksum" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "checksum" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
ChecksumVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
ChecksumText = string.Format(UI.You_have_called_the_Checksum_command_0_times, count);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "compare"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "compare" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "compare" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
CompareVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
CompareText = string.Format(UI.You_have_called_the_Compare_command_0_times, count);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "convert-image"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "convert-image" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "convert-image" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
ConvertImageVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
ConvertImageText = string.Format(UI.You_have_called_the_Convert_Image_command_0_times, count);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "create-sidecar"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "create-sidecar" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "create-sidecar" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
CreateSidecarVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
CreateSidecarText = string.Format(UI.You_have_called_the_Create_Sidecar_command_0_times, count);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "decode"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "decode" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "decode" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
DecodeVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
DecodeText = string.Format(UI.You_have_called_the_Decode_command_0_times, count);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "device-info"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "device-info" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "device-info" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
DeviceInfoVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
DeviceInfoText = string.Format(UI.You_have_called_the_Device_Info_command_0_times, count);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "device-report"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "device-report" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "device-report" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
DeviceReportVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
DeviceReportText = string.Format(UI.You_have_called_the_Device_Report_command_0_times, count);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "dump-media"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "dump-media" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "dump-media" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
DumpMediaVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
DumpMediaText = string.Format(UI.You_have_called_the_Dump_Media_command_0_times, count);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "entropy"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "entropy" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "entropy" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
EntropyVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
EntropyText = string.Format(UI.You_have_called_the_Entropy_command_0_times, count);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "formats"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "formats" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "formats" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
FormatsCommandVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
FormatsCommandText = string.Format(UI.You_have_called_the_Formats_command_0_times, count);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "image-info"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "image-info" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "image-info" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
ImageInfoVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
ImageInfoText = string.Format(UI.You_have_called_the_Image_Info_command_0_times, count);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "media-info"))
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "media-info" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "media-info" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
MediaInfoVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
MediaInfoText = string.Format(UI.You_have_called_the_Media_Info_command_0_times, count);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "media-scan"))
|
2020-04-10 18:52:50 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "media-scan" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "media-scan" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
MediaScanVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
MediaScanText = string.Format(UI.You_have_called_the_Media_Scan_command_0_times, count);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "printhex"))
|
2020-04-10 18:52:50 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "printhex" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "printhex" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
PrintHexVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
PrintHexText = string.Format(UI.You_have_called_the_Print_Hex_command_0_times, count);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Commands.Any(c => c.Name == "verify"))
|
2020-04-10 18:52:50 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Commands.Where(c => c.Name == "verify" && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Commands.LongCount(c => c.Name == "verify" && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
VerifyVisible = true;
|
2022-11-19 21:10:41 +00:00
|
|
|
|
VerifyText = string.Format(UI.You_have_called_the_Verify_command_0_times, count);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-10-04 17:34:40 +01:00
|
|
|
|
CommandsVisible = FsInfoVisible ||
|
|
|
|
|
|
ChecksumVisible ||
|
|
|
|
|
|
CompareVisible ||
|
|
|
|
|
|
ConvertImageVisible ||
|
|
|
|
|
|
CreateSidecarVisible ||
|
|
|
|
|
|
DecodeVisible ||
|
|
|
|
|
|
DeviceInfoVisible ||
|
|
|
|
|
|
DeviceReportVisible ||
|
|
|
|
|
|
DumpMediaVisible ||
|
|
|
|
|
|
EntropyVisible ||
|
|
|
|
|
|
FormatsCommandVisible ||
|
|
|
|
|
|
ImageInfoVisible ||
|
|
|
|
|
|
MediaInfoVisible ||
|
|
|
|
|
|
MediaScanVisible ||
|
|
|
|
|
|
PrintHexVisible ||
|
|
|
|
|
|
VerifyVisible;
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Filters.Any())
|
|
|
|
|
|
{
|
|
|
|
|
|
FiltersVisible = true;
|
|
|
|
|
|
|
|
|
|
|
|
foreach(string nvs in ctx.Filters.Select(n => n.Name).Distinct())
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Filters.Where(c => c.Name == nvs && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Filters.LongCount(c => c.Name == nvs && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
Filters.Add(new NameCountModel
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = nvs,
|
|
|
|
|
|
Count = count
|
|
|
|
|
|
});
|
2020-04-10 18:52:50 +01:00
|
|
|
|
}
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(ctx.MediaFormats.Any())
|
|
|
|
|
|
{
|
|
|
|
|
|
FormatsVisible = true;
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
foreach(string nvs in ctx.MediaFormats.Select(n => n.Name).Distinct())
|
2020-04-10 18:52:50 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.MediaFormats.Where(c => c.Name == nvs && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.MediaFormats.LongCount(c => c.Name == nvs && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
Formats.Add(new NameCountModel
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = nvs,
|
|
|
|
|
|
Count = count
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Partitions.Any())
|
|
|
|
|
|
{
|
|
|
|
|
|
PartitionsVisible = true;
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
foreach(string nvs in ctx.Partitions.Select(n => n.Name).Distinct())
|
2020-04-10 18:52:50 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Partitions.Where(c => c.Name == nvs && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Partitions.LongCount(c => c.Name == nvs && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
Partitions.Add(new NameCountModel
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = nvs,
|
|
|
|
|
|
Count = count
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.Filesystems.Any())
|
|
|
|
|
|
{
|
|
|
|
|
|
FilesystemsVisible = true;
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
foreach(string nvs in ctx.Filesystems.Select(n => n.Name).Distinct())
|
|
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Filesystems.Where(c => c.Name == nvs && c.Synchronized)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Filesystems.LongCount(c => c.Name == nvs && !c.Synchronized);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
Filesystems.Add(new NameCountModel
|
2020-04-10 18:52:50 +01:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
Name = nvs,
|
|
|
|
|
|
Count = count
|
2020-04-10 18:52:50 +01:00
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(ctx.SeenDevices.Any())
|
2020-04-10 18:52:50 +01:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
DevicesVisible = true;
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
foreach(DeviceStat ds in ctx.SeenDevices.OrderBy(n => n.Manufacturer)
|
|
|
|
|
|
.ThenBy(n => n.Manufacturer)
|
|
|
|
|
|
.ThenBy(n => n.Revision)
|
|
|
|
|
|
.ThenBy(n => n.Bus))
|
2023-10-03 23:27:57 +01:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
Devices.Add(new DeviceStatsModel
|
|
|
|
|
|
{
|
|
|
|
|
|
Model = ds.Model,
|
|
|
|
|
|
Manufacturer = ds.Manufacturer,
|
|
|
|
|
|
Revision = ds.Revision,
|
|
|
|
|
|
Bus = ds.Bus
|
|
|
|
|
|
});
|
2023-10-03 23:27:57 +01:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(!ctx.Medias.Any()) return;
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
MediasVisible = true;
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
foreach(string media in ctx.Medias.OrderBy(ms => ms.Type).Select(ms => ms.Type).Distinct())
|
2020-04-10 18:52:50 +01:00
|
|
|
|
{
|
2024-05-01 04:05:22 +01:00
|
|
|
|
ulong count = ctx.Medias.Where(c => c.Type == media && c.Synchronized && c.Real)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Medias.LongCount(c => c.Type == media && !c.Synchronized && c.Real);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
if(count > 0)
|
2023-10-03 23:27:57 +01:00
|
|
|
|
{
|
2022-03-06 13:29:38 +00:00
|
|
|
|
Medias.Add(new MediaStatsModel
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = media,
|
|
|
|
|
|
Count = count,
|
2022-11-19 21:10:41 +00:00
|
|
|
|
Type = UI.Media_found_type_real
|
2022-03-06 13:29:38 +00:00
|
|
|
|
});
|
2023-10-03 23:27:57 +01:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
count = ctx.Medias.Where(c => c.Type == media && c.Synchronized && !c.Real)
|
|
|
|
|
|
.Select(c => c.Count)
|
|
|
|
|
|
.FirstOrDefault();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
count += (ulong)ctx.Medias.LongCount(c => c.Type == media && !c.Synchronized && !c.Real);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2024-05-01 04:05:22 +01:00
|
|
|
|
if(count == 0) continue;
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
Medias.Add(new MediaStatsModel
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = media,
|
|
|
|
|
|
Count = count,
|
2022-11-19 21:10:41 +00:00
|
|
|
|
Type = UI.Media_found_type_image
|
2022-03-06 13:29:38 +00:00
|
|
|
|
});
|
2020-04-10 18:52:50 +01:00
|
|
|
|
}
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string FsInfoText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _fsinfoText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _fsinfoText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool FsInfoVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _fsinfoVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _fsinfoVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string ChecksumText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _checksumText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _checksumText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool ChecksumVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _checksumVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _checksumVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string CompareText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _compareText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _compareText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool CompareVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _compareVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _compareVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string ConvertImageText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _convertImageText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _convertImageText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool ConvertImageVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _convertImageVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _convertImageVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string CreateSidecarText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _createSidecarText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _createSidecarText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool CreateSidecarVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _createSidecarVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _createSidecarVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string DecodeText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _decodeText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _decodeText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool DecodeVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _decodeVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _decodeVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string DeviceInfoText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _deviceInfoText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _deviceInfoText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool DeviceInfoVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _deviceInfoVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _deviceInfoVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string DeviceReportText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _deviceReportText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _deviceReportText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool DeviceReportVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _deviceReportVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _deviceReportVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string DumpMediaText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _dumpMediaText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _dumpMediaText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool DumpMediaVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _dumpMediaVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _dumpMediaVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string EntropyText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _entropyText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _entropyText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool EntropyVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _entropyVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _entropyVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string FormatsCommandText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _formatsText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _formatsText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool FormatsCommandVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _formatsCommandVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _formatsCommandVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string ImageInfoText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _imageInfoText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _imageInfoText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool ImageInfoVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _imageInfoVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _imageInfoVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string MediaInfoText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _mediaInfoText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _mediaInfoText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool MediaInfoVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _mediaInfoVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _mediaInfoVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string MediaScanText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _mediaScanText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _mediaScanText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public bool MediaScanVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _mediaScanVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _mediaScanVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
2020-04-10 18:52:50 +01:00
|
|
|
|
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public string PrintHexText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _printHexText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _printHexText, value);
|
2020-04-10 18:52:50 +01:00
|
|
|
|
}
|
2022-03-06 13:29:38 +00:00
|
|
|
|
|
|
|
|
|
|
public bool PrintHexVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _printHexVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _printHexVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string VerifyText
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _verifyText;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _verifyText, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool VerifyVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _verifyVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _verifyVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool CommandsVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _commandsVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _commandsVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool FiltersVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _filtersVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _filtersVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool PartitionsVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _partitionsVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _partitionsVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool FormatsVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _formatsVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _formatsVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool FilesystemsVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _filesystemsVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _filesystemsVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool DevicesVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _devicesVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _devicesVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool MediasVisible
|
|
|
|
|
|
{
|
|
|
|
|
|
get => _mediasVisible;
|
2025-08-20 21:19:43 +01:00
|
|
|
|
set => SetProperty(ref _mediasVisible, value);
|
2022-03-06 13:29:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-20 21:19:43 +01:00
|
|
|
|
public ICommand CloseCommand { get; }
|
2022-03-06 13:29:38 +00:00
|
|
|
|
public ObservableCollection<NameCountModel> Filters { get; }
|
|
|
|
|
|
public ObservableCollection<NameCountModel> Formats { get; }
|
|
|
|
|
|
public ObservableCollection<NameCountModel> Partitions { get; }
|
|
|
|
|
|
public ObservableCollection<NameCountModel> Filesystems { get; }
|
|
|
|
|
|
public ObservableCollection<DeviceStatsModel> Devices { get; }
|
|
|
|
|
|
public ObservableCollection<MediaStatsModel> Medias { get; }
|
|
|
|
|
|
|
2025-08-20 21:19:43 +01:00
|
|
|
|
void Close() => _view.Close();
|
2020-04-10 18:52:50 +01:00
|
|
|
|
}
|