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/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
|
|
|
|
|
|
// Copyright © 2011‐2020 Natalia Portillo
|
|
|
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
-->
|
|
|
|
|
|
<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"
|
|
|
|
|
|
xmlns:windows="clr-namespace:Aaru.Gui.ViewModels.Windows" mc:Ignorable="d" d:DesignWidth="800"
|
|
|
|
|
|
d:DesignHeight="450" x:Class="Aaru.Gui.Views.Windows.MainWindow" Icon="/Assets/aaru-logo.png" Title="Aaru.Gui">
|
2020-04-09 02:26:04 +01:00
|
|
|
|
<Design.DataContext>
|
2020-04-16 20:40:25 +01:00
|
|
|
|
<windows:MainWindowViewModel />
|
2020-04-09 02:26:04 +01:00
|
|
|
|
</Design.DataContext>
|
2020-04-09 18:18:56 +01:00
|
|
|
|
<DockPanel>
|
|
|
|
|
|
<Menu DockPanel.Dock="Top">
|
|
|
|
|
|
<MenuItem Header="_File">
|
2020-04-11 21:04:20 +01:00
|
|
|
|
<MenuItem Header="_Open" Command="{Binding OpenCommand}" /> <Separator />
|
2020-04-11 01:31:12 +01:00
|
|
|
|
<MenuItem Header="_Settings" IsVisible="{Binding !NativeMenuSupported}"
|
2020-04-10 22:33:27 +01:00
|
|
|
|
Command="{Binding SettingsCommand}" />
|
|
|
|
|
|
<Separator />
|
2020-04-11 01:31:12 +01:00
|
|
|
|
<MenuItem Header="E_xit" IsVisible="{Binding !NativeMenuSupported}" Command="{Binding ExitCommand}" />
|
2020-04-09 18:18:56 +01:00
|
|
|
|
</MenuItem>
|
2020-04-11 04:35:38 +01:00
|
|
|
|
<MenuItem Header="_Devices" IsVisible="{Binding DevicesSupported}">
|
2020-04-14 22:32:47 +01:00
|
|
|
|
<MenuItem Header="_Refresh" Command="{Binding RefreshDevicesCommand}" />
|
2020-04-09 18:18:56 +01:00
|
|
|
|
</MenuItem>
|
|
|
|
|
|
<MenuItem Header="_Window">
|
2020-04-11 03:05:21 +01:00
|
|
|
|
<MenuItem Header="_Console" Command="{Binding ConsoleCommand}" />
|
2020-04-09 18:18:56 +01:00
|
|
|
|
</MenuItem>
|
|
|
|
|
|
<MenuItem Header="_Help">
|
2020-04-10 04:16:48 +01:00
|
|
|
|
<MenuItem Header="_Encodings" Command="{Binding EncodingsCommand}" />
|
2020-04-10 18:52:50 +01:00
|
|
|
|
<MenuItem Header="_Plugins" Command="{Binding PluginsCommand}" />
|
|
|
|
|
|
<MenuItem Header="_Statistics" Command="{Binding StatisticsCommand}" />
|
2020-04-11 01:31:12 +01:00
|
|
|
|
<Separator IsVisible="{Binding !NativeMenuSupported}" />
|
|
|
|
|
|
<MenuItem Header="_About" 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>
|
2020-04-12 02:32:03 +01:00
|
|
|
|
<TreeView Items="{Binding TreeRoot}" SelectedItem="{Binding TreeViewSelectedItem}">
|
2020-04-11 04:35:38 +01:00
|
|
|
|
<TreeView.DataTemplates>
|
|
|
|
|
|
<TreeDataTemplate DataType="models:DevicesRootModel" ItemsSource="{Binding Devices}">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2020-04-14 22:32:47 +01:00
|
|
|
|
<StackPanel.ContextMenu>
|
|
|
|
|
|
<ContextMenu>
|
|
|
|
|
|
<MenuItem Header="_Refresh devices" Command="{Binding RefreshDevicesCommand}" />
|
|
|
|
|
|
</ContextMenu>
|
|
|
|
|
|
</StackPanel.ContextMenu>
|
2020-04-11 04:35:38 +01:00
|
|
|
|
<Image Width="24" Height="24" Source="/Assets/Icons/oxygen/32x32/computer.png" />
|
|
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
|
|
|
|
|
<TreeDataTemplate DataType="models:ImagesRootModel" ItemsSource="{Binding Images}">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2020-04-14 22:32:47 +01:00
|
|
|
|
<StackPanel.ContextMenu>
|
|
|
|
|
|
<ContextMenu>
|
|
|
|
|
|
<MenuItem Header="_Close all images" Command="{Binding CloseAllImages}" />
|
|
|
|
|
|
</ContextMenu>
|
|
|
|
|
|
</StackPanel.ContextMenu>
|
2020-04-11 04:35:38 +01:00
|
|
|
|
<Image Width="24" Height="24" Source="/Assets/Icons/oxygen/32x32/inode-directory.png" />
|
|
|
|
|
|
<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>
|
2020-04-14 22:32:47 +01:00
|
|
|
|
<MenuItem Command="{Binding CalculateEntropyCommand}" Header="Calculate entropy" />
|
|
|
|
|
|
<MenuItem Command="{Binding VerifyImageCommand}" Header="Verify" />
|
|
|
|
|
|
<MenuItem Command="{Binding ChecksumImageCommand}" Header="Checksum" />
|
|
|
|
|
|
<MenuItem Command="{Binding ConvertImageCommand}" Header="Convert to..." />
|
|
|
|
|
|
<MenuItem Command="{Binding CreateSidecarCommand}"
|
|
|
|
|
|
Header="Create CICM XML sidecar..." />
|
|
|
|
|
|
<MenuItem Command="{Binding ViewImageSectorsCommand}" Header="View sectors" />
|
|
|
|
|
|
<MenuItem Command="{Binding DecodeImageMediaTagsCommand}"
|
|
|
|
|
|
Header="Decode media tags" />
|
2020-04-14 19:27:07 +01:00
|
|
|
|
</ContextMenu>
|
|
|
|
|
|
</StackPanel.ContextMenu>
|
2020-04-11 21:04:20 +01:00
|
|
|
|
<Image Width="24" Height="24" Source="{Binding Icon}" />
|
|
|
|
|
|
<TextBlock Text="{Binding FileName}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
|
|
|
|
|
<TreeDataTemplate DataType="models:PartitionSchemeModel" ItemsSource="{Binding Partitions}">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<Image Width="24" Height="24" Source="{Binding Icon}" />
|
|
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
|
|
|
|
|
<TreeDataTemplate DataType="models:PartitionModel" ItemsSource="{Binding FileSystems}">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<Image Width="24" Height="24" Source="{Binding Icon}" />
|
|
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
2020-04-14 22:05:03 +01:00
|
|
|
|
<TreeDataTemplate DataType="models:FileSystemModel" ItemsSource="{Binding Roots}">
|
2020-04-11 21:04:20 +01:00
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<Image Width="24" Height="24" Source="{Binding Icon}" />
|
|
|
|
|
|
<TextBlock Text="{Binding VolumeName}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
2020-04-14 22:05:03 +01:00
|
|
|
|
<TreeDataTemplate DataType="models:SubdirectoryModel" ItemsSource="{Binding Subdirectories}">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<Image Width="24" Height="24" Source="{Binding Icon}" />
|
|
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
2020-04-15 01:54:07 +01:00
|
|
|
|
<TreeDataTemplate DataType="models:DeviceModel" ItemsSource="{Binding Media}">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<Image Width="24" Height="24" Source="{Binding Icon}" />
|
|
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
|
|
|
|
|
<TreeDataTemplate DataType="models:MediaModel">
|
2020-04-14 22:32:47 +01:00
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<Image Width="24" Height="24" Source="{Binding Icon}" />
|
|
|
|
|
|
<TextBlock Text="{Binding Name}" />
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</TreeDataTemplate>
|
2020-04-11 04:35:38 +01:00
|
|
|
|
</TreeView.DataTemplates>
|
|
|
|
|
|
</TreeView>
|
|
|
|
|
|
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" />
|
2020-04-12 02:32:03 +01:00
|
|
|
|
<ContentControl Grid.Column="2" Content="{Binding ContentPanel}" HorizontalAlignment="Stretch"
|
|
|
|
|
|
HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch"
|
|
|
|
|
|
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>
|