mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
159 lines
10 KiB
XML
159 lines
10 KiB
XML
<!--
|
||
// /***************************************************************************
|
||
// 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"
|
||
xmlns:models="clr-namespace:Aaru.Gui.Models;assembly=Aaru.Gui"
|
||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
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">
|
||
<Design.DataContext>
|
||
<windows:MainWindowViewModel />
|
||
</Design.DataContext>
|
||
<DockPanel>
|
||
<Menu DockPanel.Dock="Top">
|
||
<MenuItem Header="_File">
|
||
<MenuItem Header="_Open" Command="{Binding OpenCommand}" /> <Separator />
|
||
<MenuItem Header="_Settings" IsVisible="{Binding !NativeMenuSupported}"
|
||
Command="{Binding SettingsCommand}" />
|
||
<Separator />
|
||
<MenuItem Header="E_xit" IsVisible="{Binding !NativeMenuSupported}" Command="{Binding ExitCommand}" />
|
||
</MenuItem>
|
||
<MenuItem Header="_Devices" IsVisible="{Binding DevicesSupported}">
|
||
<MenuItem Header="_Refresh" Command="{Binding RefreshDevicesCommand}" />
|
||
</MenuItem>
|
||
<MenuItem Header="_Window">
|
||
<MenuItem Header="_Console" Command="{Binding ConsoleCommand}" />
|
||
</MenuItem>
|
||
<MenuItem Header="_Help">
|
||
<MenuItem Header="_Encodings" Command="{Binding EncodingsCommand}" />
|
||
<MenuItem Header="_Plugins" Command="{Binding PluginsCommand}" />
|
||
<MenuItem Header="_Statistics" Command="{Binding StatisticsCommand}" />
|
||
<Separator IsVisible="{Binding !NativeMenuSupported}" />
|
||
<MenuItem Header="_About" Name="AboutMenuItem" IsVisible="{Binding !NativeMenuSupported}"
|
||
Command="{Binding AboutCommand}" />
|
||
</MenuItem>
|
||
</Menu>
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" /><ColumnDefinition Width="5" /><ColumnDefinition Width="6*" />
|
||
</Grid.ColumnDefinitions>
|
||
<TreeView Items="{Binding TreeRoot}" SelectedItem="{Binding TreeViewSelectedItem}">
|
||
<TreeView.DataTemplates>
|
||
<TreeDataTemplate DataType="models:DevicesRootModel" ItemsSource="{Binding Devices}">
|
||
<StackPanel Orientation="Horizontal">
|
||
<StackPanel.ContextMenu>
|
||
<ContextMenu>
|
||
<MenuItem Header="_Refresh devices" Command="{Binding RefreshDevicesCommand}" />
|
||
</ContextMenu>
|
||
</StackPanel.ContextMenu>
|
||
<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">
|
||
<StackPanel.ContextMenu>
|
||
<ContextMenu>
|
||
<MenuItem Header="_Close all images" Command="{Binding CloseAllImages}" />
|
||
</ContextMenu>
|
||
</StackPanel.ContextMenu>
|
||
<Image Width="24" Height="24" Source="/Assets/Icons/oxygen/32x32/inode-directory.png" />
|
||
<TextBlock Text="{Binding Name}" />
|
||
</StackPanel>
|
||
</TreeDataTemplate>
|
||
<TreeDataTemplate DataType="models:ImageModel"
|
||
ItemsSource="{Binding PartitionSchemesOrFileSystems}">
|
||
<StackPanel Orientation="Horizontal">
|
||
<StackPanel.ContextMenu>
|
||
<ContextMenu>
|
||
<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" />
|
||
</ContextMenu>
|
||
</StackPanel.ContextMenu>
|
||
<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>
|
||
<TreeDataTemplate DataType="models:FileSystemModel" ItemsSource="{Binding Roots}">
|
||
<StackPanel Orientation="Horizontal">
|
||
<Image Width="24" Height="24" Source="{Binding Icon}" />
|
||
<TextBlock Text="{Binding VolumeName}" />
|
||
</StackPanel>
|
||
</TreeDataTemplate>
|
||
<TreeDataTemplate DataType="models:SubdirectoryModel" ItemsSource="{Binding Subdirectories}">
|
||
<StackPanel Orientation="Horizontal">
|
||
<Image Width="24" Height="24" Source="{Binding Icon}" />
|
||
<TextBlock Text="{Binding Name}" />
|
||
</StackPanel>
|
||
</TreeDataTemplate>
|
||
<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">
|
||
<StackPanel Orientation="Horizontal">
|
||
<Image Width="24" Height="24" Source="{Binding Icon}" />
|
||
<TextBlock Text="{Binding Name}" />
|
||
</StackPanel>
|
||
</TreeDataTemplate>
|
||
</TreeView.DataTemplates>
|
||
</TreeView>
|
||
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" />
|
||
<ContentControl Grid.Column="2" Content="{Binding ContentPanel}" HorizontalAlignment="Stretch"
|
||
HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch"
|
||
VerticalContentAlignment="Stretch" />
|
||
</Grid>
|
||
</DockPanel>
|
||
</Window> |