2020-04-17 21:45:50 +01:00
|
|
|
|
<!--
|
|
|
|
|
|
// /***************************************************************************
|
|
|
|
|
|
// Aaru Data Preservation Suite
|
|
|
|
|
|
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : ImageEntropy.xaml
|
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
|
|
|
|
|
// Component : GUI windows.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ‐‐[ Description ] ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
|
|
|
|
|
|
//
|
|
|
|
|
|
// Image entropy calculation window.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ‐‐[ 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
|
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
-->
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<Window xmlns="https://github.com/avaloniaui"
|
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2020-04-12 22:29:24 +01:00
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
2020-04-16 20:40:25 +01:00
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
xmlns:windows="clr-namespace:Aaru.Gui.ViewModels.Windows"
|
2025-10-25 12:53:52 +01:00
|
|
|
|
xmlns:localization="clr-namespace:Aaru.Localization;assembly=Aaru.Localization"
|
2025-10-26 14:48:21 +00:00
|
|
|
|
xmlns:controls="clr-namespace:Aaru.Gui.Controls"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
|
d:DesignWidth="800"
|
|
|
|
|
|
d:DesignHeight="450"
|
2025-10-26 14:48:21 +00:00
|
|
|
|
Width="640"
|
|
|
|
|
|
Height="320"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
x:Class="Aaru.Gui.Views.Windows.ImageEntropy"
|
|
|
|
|
|
Icon="/Assets/aaru-logo.png"
|
2025-11-19 05:26:14 +00:00
|
|
|
|
x:DataType="windows:ImageEntropyViewModel"
|
2025-10-25 12:53:52 +01:00
|
|
|
|
Title="{x:Static localization:UI.Title_Calculating_entropy}">
|
2020-04-12 22:29:24 +01:00
|
|
|
|
<Design.DataContext>
|
2020-04-16 20:40:25 +01:00
|
|
|
|
<windows:ImageEntropyViewModel />
|
2020-04-12 22:29:24 +01:00
|
|
|
|
</Design.DataContext>
|
2025-12-16 11:22:13 +00:00
|
|
|
|
<Window.Styles>
|
|
|
|
|
|
<Style Selector="DataGridRow:nth-child(2n)">
|
|
|
|
|
|
<Setter Property="Background">
|
|
|
|
|
|
<SolidColorBrush Color="#15FFFFFF" />
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
<Style Selector="DataGridRow:nth-child(2n):pointerover">
|
|
|
|
|
|
<Setter Property="Background"
|
|
|
|
|
|
Value="{DynamicResource SystemControlHighlightListLowBrush}" />
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
<Style Selector="DataGridRow:nth-child(2n):selected">
|
|
|
|
|
|
<Setter Property="Background"
|
|
|
|
|
|
Value="{DynamicResource SystemControlHighlightAccentBrush}" />
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Window.Styles>
|
2025-10-26 14:48:21 +00:00
|
|
|
|
<Grid RowDefinitions="*, Auto,Auto"
|
|
|
|
|
|
Margin="12"
|
|
|
|
|
|
RowSpacing="8">
|
|
|
|
|
|
<Grid Grid.Row="0"
|
|
|
|
|
|
RowDefinitions="Auto,Auto,Auto"
|
|
|
|
|
|
IsVisible="{Binding OptionsVisible, Mode=OneWay}"
|
|
|
|
|
|
RowSpacing="8">
|
|
|
|
|
|
<CheckBox Grid.Row="0"
|
|
|
|
|
|
IsEnabled="{Binding DuplicatedSectorsEnabled, Mode=OneWay}"
|
|
|
|
|
|
IsChecked="{Binding DuplicatedSectorsChecked, Mode=TwoWay}">
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<TextBlock Text="{x:Static localization:UI.Calculates_how_many_sectors_are_duplicated}" />
|
2020-04-12 22:29:24 +01:00
|
|
|
|
</CheckBox>
|
2025-10-26 14:48:21 +00:00
|
|
|
|
<CheckBox Grid.Row="1"
|
|
|
|
|
|
IsEnabled="{Binding SeparatedTracksEnabled, Mode=OneWay}"
|
|
|
|
|
|
IsChecked="{Binding SeparatedTracksChecked, Mode=TwoWay}"
|
|
|
|
|
|
IsVisible="{Binding SeparatedTracksVisible, Mode=OneWay}">
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<TextBlock Text="{x:Static localization:UI.Calculates_entropy_for_each_track_separately}" />
|
2020-04-12 22:29:24 +01:00
|
|
|
|
</CheckBox>
|
2025-10-26 14:48:21 +00:00
|
|
|
|
<CheckBox Grid.Row="2"
|
|
|
|
|
|
IsEnabled="{Binding WholeDiscEnabled, Mode=OneWay}"
|
|
|
|
|
|
IsChecked="{Binding WholeDiscChecked, Mode=TwoWay}"
|
|
|
|
|
|
IsVisible="{Binding WholeDiscVisible, Mode=OneWay}">
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<TextBlock Text="{x:Static localization:UI.Calculates_entropy_for_the_whole_disc}" />
|
2020-04-12 22:29:24 +01:00
|
|
|
|
</CheckBox>
|
2025-10-26 14:48:21 +00:00
|
|
|
|
</Grid>
|
|
|
|
|
|
<Grid Grid.Row="0"
|
|
|
|
|
|
RowDefinitions="Auto,Auto,Auto,*"
|
|
|
|
|
|
RowSpacing="8"
|
|
|
|
|
|
IsVisible="{Binding ResultsVisible, Mode=OneWay}">
|
|
|
|
|
|
<controls:SpectreTextBlock Grid.Row="0"
|
|
|
|
|
|
Text="{Binding MediaEntropyText, Mode=OneWay}"
|
|
|
|
|
|
IsVisible="{Binding MediaEntropyVisible, Mode=OneWay}" />
|
|
|
|
|
|
<controls:SpectreTextBlock Grid.Row="1"
|
|
|
|
|
|
Text="{Binding MediaUniqueSectorsText, Mode=OneWay}"
|
|
|
|
|
|
IsVisible="{Binding MediaUniqueSectorsVisible, Mode=OneWay}" />
|
|
|
|
|
|
<controls:SpectreTextBlock Grid.Row="2"
|
|
|
|
|
|
Text="{x:Static localization:UI.Title_Track_entropy}"
|
|
|
|
|
|
IsVisible="{Binding SeparatedTracksChecked, Mode=OneWay}" />
|
|
|
|
|
|
<DataGrid Grid.Row="3"
|
|
|
|
|
|
IsVisible="{Binding SeparatedTracksChecked, Mode=OneWay}"
|
|
|
|
|
|
ItemsSource="{Binding TrackEntropy, Mode=OneWay}">
|
2020-04-12 22:29:24 +01:00
|
|
|
|
<DataGrid.Columns>
|
2025-12-16 11:22:26 +00:00
|
|
|
|
<DataGridTemplateColumn Width="Auto">
|
2025-10-26 14:48:21 +00:00
|
|
|
|
<DataGridTemplateColumn.Header>
|
|
|
|
|
|
<controls:SpectreTextBlock Text="{x:Static localization:Core.Title_Track}" />
|
|
|
|
|
|
</DataGridTemplateColumn.Header>
|
|
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
|
<TextBlock Text="{Binding Track, Mode=OneWay}" />
|
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
|
</DataGridTemplateColumn>
|
2025-12-16 11:22:26 +00:00
|
|
|
|
<DataGridTemplateColumn Width="Auto">
|
2025-10-26 14:48:21 +00:00
|
|
|
|
<DataGridTemplateColumn.Header>
|
|
|
|
|
|
<controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Entropy}" />
|
|
|
|
|
|
</DataGridTemplateColumn.Header>
|
|
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
|
<TextBlock Text="{Binding Entropy, Mode=OneWay}" />
|
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
|
</DataGridTemplateColumn>
|
2025-12-16 11:22:26 +00:00
|
|
|
|
<DataGridTemplateColumn Width="*">
|
2025-10-26 14:48:21 +00:00
|
|
|
|
<DataGridTemplateColumn.Header>
|
|
|
|
|
|
<controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Unique_sectors}" />
|
|
|
|
|
|
</DataGridTemplateColumn.Header>
|
|
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
|
<TextBlock Text="{Binding UniqueSectors, Mode=OneWay}" />
|
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
|
</DataGridTemplateColumn>
|
2020-04-12 22:29:24 +01:00
|
|
|
|
</DataGrid.Columns>
|
|
|
|
|
|
</DataGrid>
|
2025-10-26 14:48:21 +00:00
|
|
|
|
</Grid>
|
|
|
|
|
|
<Grid Grid.Row="1"
|
|
|
|
|
|
RowDefinitions="Auto,Auto"
|
|
|
|
|
|
RowSpacing="8"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
IsVisible="{Binding ProgressVisible, Mode=OneWay}">
|
|
|
|
|
|
<Grid Grid.Row="0"
|
|
|
|
|
|
RowDefinitions="Auto, Auto"
|
|
|
|
|
|
RowSpacing="8"
|
|
|
|
|
|
IsVisible="{Binding Progress1Visible, Mode=OneWay}">
|
|
|
|
|
|
<controls:SpectreTextBlock Grid.Row="0"
|
|
|
|
|
|
Text="{Binding ProgressText, Mode=OneWay}" />
|
|
|
|
|
|
<ProgressBar Grid.Row="1"
|
|
|
|
|
|
Maximum="{Binding ProgressMax, Mode=OneWay}"
|
|
|
|
|
|
Value="{Binding ProgressValue, Mode=OneWay}"
|
|
|
|
|
|
IsIndeterminate="{Binding ProgressIndeterminate, Mode=OneWay}" />
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
<Grid Grid.Row="1"
|
|
|
|
|
|
RowDefinitions="Auto, Auto"
|
|
|
|
|
|
RowSpacing="8"
|
|
|
|
|
|
IsVisible="{Binding Progress2Visible, Mode=OneWay}">
|
|
|
|
|
|
<controls:SpectreTextBlock Grid.Row="0"
|
|
|
|
|
|
Text="{Binding Progress2Text, Mode=OneWay}" />
|
|
|
|
|
|
<ProgressBar Grid.Row="1"
|
|
|
|
|
|
Maximum="{Binding Progress2Max, Mode=OneWay}"
|
|
|
|
|
|
Value="{Binding Progress2Value, Mode=OneWay}"
|
|
|
|
|
|
IsIndeterminate="{Binding Progress2Indeterminate, Mode=OneWay}" />
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
<StackPanel Grid.Row="2"
|
|
|
|
|
|
Orientation="Horizontal"
|
|
|
|
|
|
VerticalAlignment="Bottom"
|
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
|
Spacing="8">
|
|
|
|
|
|
<Button Command="{Binding StartCommand, Mode=OneWay}"
|
|
|
|
|
|
IsVisible="{Binding StartVisible, Mode=OneWay}">
|
|
|
|
|
|
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Start}" />
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
<Button Command="{Binding CloseCommand, Mode=OneWay}"
|
|
|
|
|
|
IsVisible="{Binding CloseVisible, Mode=OneWay}">
|
|
|
|
|
|
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Close}" />
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
<Button Command="{Binding StopCommand, Mode=OneWay}"
|
|
|
|
|
|
IsVisible="{Binding StopVisible, Mode=OneWay}">
|
|
|
|
|
|
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Stop}" />
|
|
|
|
|
|
</Button>
|
2020-04-12 22:29:24 +01:00
|
|
|
|
</StackPanel>
|
2025-10-26 14:48:21 +00:00
|
|
|
|
</Grid>
|
2020-04-12 22:29:24 +01:00
|
|
|
|
</Window>
|