mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
General code cleanup and style refactor.
This commit is contained in:
@@ -30,8 +30,6 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Gui.ViewModels.Windows;
|
||||
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -46,6 +44,8 @@ using Avalonia.Controls;
|
||||
using Avalonia.Threading;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace Aaru.Gui.ViewModels.Windows;
|
||||
|
||||
public sealed class ImageEntropyViewModel : ViewModelBase
|
||||
{
|
||||
readonly IMediaImage _inputFormat;
|
||||
@@ -349,10 +349,10 @@ public sealed class ImageEntropyViewModel : ViewModelBase
|
||||
foreach(EntropyResults trackEntropy in _tracksEntropy)
|
||||
TrackEntropy.Add(new TrackEntropyModel
|
||||
{
|
||||
Track = trackEntropy.Track.ToString(),
|
||||
Track = trackEntropy.Track.ToString(),
|
||||
Entropy = trackEntropy.Entropy.ToString(CultureInfo.CurrentUICulture),
|
||||
UniqueSectors =
|
||||
$"{trackEntropy.UniqueSectors} ({(trackEntropy.UniqueSectors ?? 0) / (double)trackEntropy.Sectors:P3})"
|
||||
UniqueSectors = $"{trackEntropy.UniqueSectors} ({
|
||||
(trackEntropy.UniqueSectors ?? 0) / (double)trackEntropy.Sectors:P3})"
|
||||
});
|
||||
|
||||
if(WholeDiscChecked != true)
|
||||
@@ -364,8 +364,8 @@ public sealed class ImageEntropyViewModel : ViewModelBase
|
||||
if(_entropy.UniqueSectors == null)
|
||||
return;
|
||||
|
||||
MediaUniqueSectorsText =
|
||||
$"Disk has {_entropy.UniqueSectors} unique sectors ({(double)_entropy.UniqueSectors / _entropy.Sectors:P3})";
|
||||
MediaUniqueSectorsText = $"Disk has {_entropy.UniqueSectors} unique sectors ({
|
||||
(double)_entropy.UniqueSectors / _entropy.Sectors:P3})";
|
||||
|
||||
MediaUniqueSectorsVisible = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user