2020-04-17 21:45:50 +01:00
|
|
|
|
<!--
|
|
|
|
|
|
// /***************************************************************************
|
|
|
|
|
|
// Aaru Data Preservation Suite
|
|
|
|
|
|
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : MainWindow.xaml
|
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
|
|
|
|
|
// Component : GUI windows.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ‐‐[ Description ] ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
|
|
|
|
|
|
//
|
|
|
|
|
|
// Main 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-11 04:35:38 +01:00
|
|
|
|
xmlns:models="clr-namespace:Aaru.Gui.Models;assembly=Aaru.Gui"
|
2020-04-09 02:26:04 +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"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
|
d:DesignWidth="800"
|
|
|
|
|
|
d:DesignHeight="450"
|
2025-10-25 14:38:04 +01:00
|
|
|
|
x:Class="Aaru.Gui.Views.Windows.OldMainWindow"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
Icon="/Assets/aaru-logo.png"
|
|
|
|
|
|
Title="Aaru.Gui">
|
2020-04-09 02:26:04 +01:00
|
|
|
|
<Design.DataContext>
|
2025-10-25 14:38:04 +01:00
|
|
|
|
<windows:OldMainWindowViewModel />
|
2020-04-09 02:26:04 +01:00
|
|
|
|
</Design.DataContext>
|
2020-04-09 18:18:56 +01:00
|
|
|
|
<DockPanel>
|
|
|
|
|
|
<Menu DockPanel.Dock="Top">
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_File}">
|
|
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Open}"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
Command="{Binding OpenCommand}" />
|
|
|
|
|
|
<Separator />
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Settings}"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
IsVisible="{Binding !NativeMenuSupported}"
|
2020-04-10 22:33:27 +01:00
|
|
|
|
Command="{Binding SettingsCommand}" />
|
|
|
|
|
|
<Separator />
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Exit}"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
IsVisible="{Binding !NativeMenuSupported}"
|
2022-11-16 21:40:54 +00:00
|
|
|
|
Command="{Binding ExitCommand}" />
|
2020-04-09 18:18:56 +01:00
|
|
|
|
</MenuItem>
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Devices}"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
IsVisible="{Binding DevicesSupported}">
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Refresh}"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
Command="{Binding RefreshDevicesCommand}" />
|
2020-04-09 18:18:56 +01:00
|
|
|
|
</MenuItem>
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Window}">
|
|
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Console}"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
Command="{Binding ConsoleCommand}" />
|
2020-04-09 18:18:56 +01:00
|
|
|
|
</MenuItem>
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Help}">
|
|
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Encodings}"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
Command="{Binding EncodingsCommand}" />
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Plugins}"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
Command="{Binding PluginsCommand}" />
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Statistics}"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
Command="{Binding StatisticsCommand}" />
|
2020-04-11 01:31:12 +01:00
|
|
|
|
<Separator IsVisible="{Binding !NativeMenuSupported}" />
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_About}"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
Name="AboutMenuItem"
|
|
|
|
|
|
IsVisible="{Binding !NativeMenuSupported}"
|
2020-04-10 01:10:55 +01:00
|
|
|
|
Command="{Binding AboutCommand}" />
|
2020-04-09 18:18:56 +01:00
|
|
|
|
</MenuItem>
|
|
|
|
|
|
</Menu>
|
2020-04-11 04:35:38 +01:00
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="*" /><ColumnDefinition Width="5" /><ColumnDefinition Width="6*" />
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<TreeView ItemsSource="{Binding TreeRoot}"
|
|
|
|
|
|
SelectedItem="{Binding TreeViewSelectedItem}">
|
2020-04-11 04:35:38 +01:00
|
|
|
|
<TreeView.DataTemplates>
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<TreeDataTemplate DataType="models:DevicesRootModel"
|
|
|
|
|
|
ItemsSource="{Binding Devices}">
|
2020-04-11 04:35:38 +01:00
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2020-04-14 22:32:47 +01:00
|
|
|
|
<StackPanel.ContextMenu>
|
|
|
|
|
|
<ContextMenu>
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Refresh_devices}"
|
2022-11-16 21:40:54 +00:00
|
|
|
|
Command="{Binding RefreshDevicesCommand}" />
|
2020-04-14 22:32:47 +01:00
|
|
|
|
</ContextMenu>
|
|
|
|
|
|
</StackPanel.ContextMenu>
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<Image Width="24"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Source="/Assets/Icons/oxygen/32x32/computer.png" />
|
2020-04-11 04:35:38 +01:00
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<TreeDataTemplate DataType="models:ImagesRootModel"
|
|
|
|
|
|
ItemsSource="{Binding Images}">
|
2020-04-11 04:35:38 +01:00
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2020-04-14 22:32:47 +01:00
|
|
|
|
<StackPanel.ContextMenu>
|
|
|
|
|
|
<ContextMenu>
|
2025-10-25 12:53:52 +01:00
|
|
|
|
<MenuItem Header="{x:Static localization:UI.Menu_Close_all_images}"
|
2024-05-01 04:05:22 +01:00
|
|
|
|
Command="{Binding CloseAllImages}" />
|
2020-04-14 22:32:47 +01:00
|
|
|
|
</ContextMenu>
|
|
|
|
|
|
</StackPanel.ContextMenu>
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<Image Width="24"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Source="/Assets/Icons/oxygen/32x32/inode-directory.png" />
|
2020-04-11 04:35:38 +01:00
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
2020-04-11 21:04:20 +01:00
|
|
|
|
<TreeDataTemplate DataType="models:ImageModel"
|
|
|
|
|
|
ItemsSource="{Binding PartitionSchemesOrFileSystems}">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2020-04-14 19:27:07 +01:00
|
|
|
|
<StackPanel.ContextMenu>
|
|
|
|
|
|
<ContextMenu>
|
2022-11-16 21:40:54 +00:00
|
|
|
|
<MenuItem Command="{Binding CalculateEntropyCommand}"
|
2025-10-25 12:53:52 +01:00
|
|
|
|
Header="{x:Static localization:UI.ButtonLabel_Calculate_entropy}" />
|
2022-11-16 21:40:54 +00:00
|
|
|
|
<MenuItem Command="{Binding VerifyImageCommand}"
|
2025-10-25 12:53:52 +01:00
|
|
|
|
Header="{x:Static localization:UI.ButtonLabel_Verify}" />
|
2022-11-16 21:40:54 +00:00
|
|
|
|
<MenuItem Command="{Binding ChecksumImageCommand}"
|
2025-10-25 12:53:52 +01:00
|
|
|
|
Header="{x:Static localization:UI.ButtonLabel_Checksum}" />
|
2022-11-16 21:40:54 +00:00
|
|
|
|
<MenuItem Command="{Binding ConvertImageCommand}"
|
2025-10-25 12:53:52 +01:00
|
|
|
|
Header="{x:Static localization:UI.ButtonLabel_Convert_to}" />
|
2020-04-14 22:32:47 +01:00
|
|
|
|
<MenuItem Command="{Binding CreateSidecarCommand}"
|
2025-10-25 12:53:52 +01:00
|
|
|
|
Header="{x:Static localization:UI.ButtonLabel_Create_Aaru_Metadata_sidecar}" />
|
2022-11-16 21:40:54 +00:00
|
|
|
|
<MenuItem Command="{Binding ViewImageSectorsCommand}"
|
2025-10-25 12:53:52 +01:00
|
|
|
|
Header="{x:Static localization:UI.ButtonLabel_View_sectors}" />
|
2020-04-14 22:32:47 +01:00
|
|
|
|
<MenuItem Command="{Binding DecodeImageMediaTagsCommand}"
|
2025-10-25 12:53:52 +01:00
|
|
|
|
Header="{x:Static localization:UI.ButtonLabel_Decode_media_tags}" />
|
2020-04-14 19:27:07 +01:00
|
|
|
|
</ContextMenu>
|
|
|
|
|
|
</StackPanel.ContextMenu>
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<Image Width="24"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Source="{Binding Icon}" />
|
2020-04-11 21:04:20 +01:00
|
|
|
|
<TextBlock Text="{Binding FileName}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<TreeDataTemplate DataType="models:PartitionSchemeModel"
|
|
|
|
|
|
ItemsSource="{Binding Partitions}">
|
2020-04-11 21:04:20 +01:00
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<Image Width="24"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Source="{Binding Icon}" />
|
2020-04-11 21:04:20 +01:00
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<TreeDataTemplate DataType="models:PartitionModel"
|
|
|
|
|
|
ItemsSource="{Binding FileSystems}">
|
2020-04-11 21:04:20 +01:00
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<Image Width="24"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Source="{Binding Icon}" />
|
2020-04-11 21:04:20 +01:00
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<TreeDataTemplate DataType="models:FileSystemModel"
|
|
|
|
|
|
ItemsSource="{Binding Roots}">
|
2020-04-11 21:04:20 +01:00
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<Image Width="24"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Source="{Binding Icon}" />
|
2020-04-11 21:04:20 +01:00
|
|
|
|
<TextBlock Text="{Binding VolumeName}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<TreeDataTemplate DataType="models:SubdirectoryModel"
|
|
|
|
|
|
ItemsSource="{Binding Subdirectories}">
|
2020-04-14 22:05:03 +01:00
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<Image Width="24"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Source="{Binding Icon}" />
|
2020-04-14 22:05:03 +01:00
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<TreeDataTemplate DataType="models:DeviceModel"
|
|
|
|
|
|
ItemsSource="{Binding Media}">
|
2020-04-15 01:54:07 +01:00
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<Image Width="24"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Source="{Binding Icon}" />
|
2020-04-15 01:54:07 +01:00
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
|
|
|
|
|
<TreeDataTemplate DataType="models:MediaModel">
|
2020-04-14 22:32:47 +01:00
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<Image Width="24"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Source="{Binding Icon}" />
|
2020-04-14 22:32:47 +01:00
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
2020-04-11 04:35:38 +01:00
|
|
|
|
</TreeView.DataTemplates>
|
|
|
|
|
|
</TreeView>
|
2024-05-01 04:05:22 +01:00
|
|
|
|
<GridSplitter Grid.Column="1"
|
|
|
|
|
|
Width="5"
|
|
|
|
|
|
HorizontalAlignment="Stretch" />
|
|
|
|
|
|
<ContentControl Grid.Column="2"
|
|
|
|
|
|
Content="{Binding ContentPanel}"
|
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
|
HorizontalContentAlignment="Stretch"
|
|
|
|
|
|
VerticalAlignment="Stretch"
|
2020-04-12 02:32:03 +01:00
|
|
|
|
VerticalContentAlignment="Stretch" />
|
2020-04-11 04:35:38 +01:00
|
|
|
|
</Grid>
|
2020-04-09 18:18:56 +01:00
|
|
|
|
</DockPanel>
|
2020-04-10 01:10:55 +01:00
|
|
|
|
</Window>
|