Colorify image entropy command.

This commit is contained in:
2025-08-18 03:22:19 +01:00
parent 51fe8dc99c
commit 45c119bacb
3 changed files with 10 additions and 11 deletions

View File

@@ -3060,10 +3060,10 @@ It has no sense to do it, and it will put too much strain on the tape.</value>
<value>Unable to write file {0}</value>
</data>
<data name="Sectors_0" xml:space="preserve">
<value>Sectors {0}</value>
<value>[slateblue1]Sectors [lime]{0}[/][/]</value>
</data>
<data name="Entropying_sector_0" xml:space="preserve">
<value>Entropying sector {0}</value>
<value>[slateblue1]Entropying sector [lime]{0}[/][/]</value>
</data>
<data name="Error_0_while_reading_sector_1_continuing" xml:space="preserve">
<value>Error {0} while reading sector {1}, continuing...</value>

View File

@@ -1273,17 +1273,17 @@ In you are unsure, please press N to not continue.</value>
<value>Calculating disc entropy of multisession images is not yet implemented.</value>
</data>
<data name="Entropy_for_track_0_is_1" xml:space="preserve">
<value>Entropy for track {0} is {1:F4}.</value>
<value>[slateblue1]Entropy for track [teal]{0}[/] is [teal]{1:F4}[/].[/]</value>
</data>
<data name="Track_0_has_1_unique_sectors_2" xml:space="preserve">
<value>Track {0} has {1} unique sectors ({2:P3})</value>
<value>[slateblue1]Track [teal]{0}[/] has [teal]{1}[/] unique sectors ([aqua]{2:P3}[/])[/]</value>
<comment>{0} is the track number, {1} how many sectors are unique, {2:P3} the percentage of total sectors that are unique (percent symbol included)</comment>
</data>
<data name="Entropy_for_disk_is_0" xml:space="preserve">
<value>Entropy for disk is {0:F4}.</value>
<value>[slateblue1]Entropy for disk is [teal]{0:F4}[/].[/]</value>
</data>
<data name="Disk_has_0_unique_sectors_1" xml:space="preserve">
<value>Disk has {0} unique sectors ({1:P3})</value>
<value>[slateblue1]Disk has [teal]{0}[/] unique sectors ([aqua]{1:P3}[/])[/]</value>
<comment>{0} is how many sectors are unique, {1:P3} the percentage of total sectors that are unique (percent symbol included)</comment>
</data>
<data name="Image_format_not_identified" xml:space="preserve">

View File

@@ -129,7 +129,7 @@ sealed class EntropyCommand : Command<EntropyCommand.Settings>
entropyCalculator.UpdateProgressEvent += (text, current, maximum) =>
{
_progressTask1 ??= ctx.AddTask("Progress");
_progressTask1.Description = Markup.Escape(text);
_progressTask1.Description = text;
_progressTask1.Value = current;
_progressTask1.MaxValue = maximum;
};
@@ -137,7 +137,7 @@ sealed class EntropyCommand : Command<EntropyCommand.Settings>
entropyCalculator.UpdateProgress2Event += (text, current, maximum) =>
{
_progressTask2 ??= ctx.AddTask("Progress");
_progressTask2.Description = Markup.Escape(text);
_progressTask2.Description = text;
_progressTask2.Value = current;
_progressTask2.MaxValue = maximum;
};
@@ -158,9 +158,8 @@ sealed class EntropyCommand : Command<EntropyCommand.Settings>
{
if(opticalFormat.Sessions?.Count > 1)
{
AaruLogging
.Error(UI
.Calculating_disc_entropy_of_multisession_images_is_not_yet_implemented);
AaruLogging.Error(UI
.Calculating_disc_entropy_of_multisession_images_is_not_yet_implemented);
wholeDisc = false;
}