mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
243 lines
13 KiB
XML
243 lines
13 KiB
XML
<!--
|
||
// /***************************************************************************
|
||
// Aaru Data Preservation Suite
|
||
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
|
||
//
|
||
// Filename : ScsiInfo.xaml
|
||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||
//
|
||
// Component : GUI tabs.
|
||
//
|
||
// ‐‐[ Description ] ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
|
||
//
|
||
// SCSI tab.
|
||
//
|
||
// ‐‐[ 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-2025 Natalia Portillo
|
||
// ****************************************************************************/
|
||
-->
|
||
<UserControl xmlns="https://github.com/avaloniaui"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
xmlns:tabs="clr-namespace:Aaru.Gui.ViewModels.Tabs"
|
||
xmlns:localization="clr-namespace:Aaru.Localization;assembly=Aaru.Localization"
|
||
xmlns:controls="clr-namespace:Aaru.Gui.Controls"
|
||
mc:Ignorable="d"
|
||
d:DesignWidth="800"
|
||
d:DesignHeight="450"
|
||
x:DataType="tabs:ScsiInfoViewModel"
|
||
x:Class="Aaru.Gui.Views.Tabs.ScsiInfo">
|
||
<Design.DataContext>
|
||
<tabs:ScsiInfoViewModel />
|
||
</Design.DataContext>
|
||
<UserControl.Styles>
|
||
<Style Selector="DataGridRow:nth-child(2n)">
|
||
<Setter Property="Background">
|
||
<SolidColorBrush Color="#0CFFFFFF" />
|
||
</Setter>
|
||
</Style>
|
||
<Style Selector="DataGridRow:nth-child(2n) DataGridCell">
|
||
<Setter Property="Background">
|
||
<SolidColorBrush Color="#0CFFFFFF" />
|
||
</Setter>
|
||
</Style>
|
||
<Style Selector="DataGridRow:nth-child(2n):pointerover">
|
||
<Setter Property="Background"
|
||
Value="{DynamicResource SystemControlHighlightListLowBrush}" />
|
||
</Style>
|
||
<Style Selector="DataGridRow:nth-child(2n):pointerover DataGridCell">
|
||
<Setter Property="Background"
|
||
Value="{DynamicResource SystemControlHighlightListLowBrush}" />
|
||
</Style>
|
||
<Style Selector="DataGridRow:nth-child(2n):selected">
|
||
<Setter Property="Background"
|
||
Value="{DynamicResource SystemControlHighlightAccentBrush}" />
|
||
</Style>
|
||
<Style Selector="DataGridRow:nth-child(2n):selected DataGridCell">
|
||
<Setter Property="Background"
|
||
Value="{DynamicResource SystemControlHighlightAccentBrush}" />
|
||
</Style>
|
||
</UserControl.Styles>
|
||
<TabControl>
|
||
<TabItem IsVisible="{Binding !!InquiryData, Mode=OneWay}">
|
||
<TabItem.Header>
|
||
<TextBlock Text="{x:Static localization:UI.Title_INQUIRY}" />
|
||
</TabItem.Header>
|
||
<Grid RowDefinitions="*, Auto"
|
||
RowSpacing="8"
|
||
Margin="8">
|
||
<Border Grid.Row="0"
|
||
BorderThickness="1"
|
||
BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
|
||
CornerRadius="8">
|
||
<ScrollViewer Padding="8">
|
||
<controls:SpectreTextBlock Text="{Binding ScsiInquiryText, Mode=OneWay}"
|
||
TextWrapping="Wrap" />
|
||
</ScrollViewer>
|
||
</Border>
|
||
<StackPanel Orientation="Horizontal"
|
||
Grid.Row="1"
|
||
Spacing="8">
|
||
<Button Command="{Binding SaveInquiryBinaryCommand, Mode=OneWay}">
|
||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_binary_to_file}" />
|
||
</Button>
|
||
<Button Command="{Binding SaveInquiryTextCommand, Mode=OneWay}">
|
||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_text_to_file}" />
|
||
</Button>
|
||
</StackPanel>
|
||
</Grid>
|
||
</TabItem>
|
||
<TabItem IsVisible="{Binding !!ModeSensePages.Count, Mode=OneWay}">
|
||
<TabItem.Header>
|
||
<TextBlock Text="{x:Static localization:UI.Title_MODE_SENSE}" />
|
||
</TabItem.Header>
|
||
<Grid RowDefinitions="*, Auto"
|
||
RowSpacing="8"
|
||
Margin="8">
|
||
<Grid Grid.Row="0"
|
||
ColumnDefinitions="0.3*, 0.7*"
|
||
ColumnSpacing="8">
|
||
<DataGrid Grid.Column="0"
|
||
HorizontalAlignment="Stretch"
|
||
VerticalAlignment="Stretch"
|
||
ItemsSource="{Binding ModeSensePages, Mode=OneWay}"
|
||
SelectedItem="{Binding SelectedModeSensePage, Mode=TwoWay}"
|
||
IsReadOnly="True">
|
||
<DataGrid.Columns>
|
||
<DataGridTextColumn Header="{x:Static localization:UI.Title_Page}"
|
||
Binding="{Binding Page, Mode=OneWay}"
|
||
Width="*" />
|
||
</DataGrid.Columns>
|
||
</DataGrid>
|
||
<Border Grid.Column="1"
|
||
BorderThickness="1"
|
||
BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
|
||
CornerRadius="8">
|
||
<ScrollViewer Padding="8">
|
||
<controls:SpectreTextBlock HorizontalAlignment="Stretch"
|
||
VerticalAlignment="Stretch"
|
||
Text="{Binding ModeSensePageText, Mode=OneWay}"
|
||
TextWrapping="Wrap" />
|
||
</ScrollViewer>
|
||
</Border>
|
||
</Grid>
|
||
<StackPanel Grid.Row="1"
|
||
Orientation="Horizontal"
|
||
Spacing="8"
|
||
VerticalAlignment="Bottom">
|
||
<Button Command="{Binding SaveModeSense6Command, Mode=OneWay}">
|
||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_MODE_SENSE_6_response_to_file}" />
|
||
</Button>
|
||
<Button Command="{Binding SaveModeSense10Command, Mode=OneWay}">
|
||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_MODE_SENSE_10_response_to_file}" />
|
||
</Button>
|
||
</StackPanel>
|
||
</Grid>
|
||
</TabItem>
|
||
<TabItem IsVisible="{Binding !!EvpdPages.Count, Mode=OneWay}">
|
||
<TabItem.Header>
|
||
<TextBlock Text="{x:Static localization:UI.Title_EVPD}" />
|
||
</TabItem.Header>
|
||
<Grid RowDefinitions="*, Auto"
|
||
RowSpacing="8"
|
||
Margin="8">
|
||
<Grid Grid.Row="0"
|
||
ColumnDefinitions="0.3*, 0.7*"
|
||
ColumnSpacing="8">
|
||
<DataGrid Grid.Column="0"
|
||
HorizontalAlignment="Stretch"
|
||
VerticalAlignment="Stretch"
|
||
ItemsSource="{Binding EvpdPages, Mode=OneWay}"
|
||
SelectedItem="{Binding SelectedEvpdPage, Mode=TwoWay}"
|
||
IsReadOnly="True">
|
||
<DataGrid.Columns>
|
||
<DataGridTextColumn Header="{x:Static localization:UI.Title_Page}"
|
||
Binding="{Binding Page, Mode=OneWay}"
|
||
Width="*" />
|
||
</DataGrid.Columns>
|
||
</DataGrid>
|
||
<Border Grid.Column="1"
|
||
BorderThickness="1"
|
||
BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
|
||
CornerRadius="8">
|
||
<ScrollViewer Padding="8">
|
||
<controls:SpectreTextBlock HorizontalAlignment="Stretch"
|
||
VerticalAlignment="Stretch"
|
||
Text="{Binding EvpdPageText, Mode=OneWay}"
|
||
TextWrapping="Wrap" />
|
||
</ScrollViewer>
|
||
</Border>
|
||
</Grid>
|
||
<StackPanel Grid.Row="1"
|
||
Orientation="Horizontal"
|
||
Spacing="8"
|
||
VerticalAlignment="Bottom">
|
||
<Button Command="{Binding SaveEvpdPageCommand, Mode=OneWay}">
|
||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_EVPD_page_to_file}" />
|
||
</Button>
|
||
</StackPanel>
|
||
</Grid>
|
||
</TabItem>
|
||
<TabItem IsVisible="{Binding !!MmcFeatures.Count, Mode=OneWay}">
|
||
<TabItem.Header>
|
||
<TextBlock Text="{x:Static localization:UI.Title_MMC_FEATURES}" />
|
||
</TabItem.Header>
|
||
<Grid RowDefinitions="*, Auto"
|
||
RowSpacing="8"
|
||
Margin="8">
|
||
<Grid Grid.Row="0"
|
||
ColumnDefinitions="0.3*, 0.7*"
|
||
ColumnSpacing="8">
|
||
<DataGrid Grid.Column="0"
|
||
HorizontalAlignment="Stretch"
|
||
VerticalAlignment="Stretch"
|
||
ItemsSource="{Binding MmcFeatures, Mode=OneWay}"
|
||
SelectedItem="{Binding SelectedMmcFeature, Mode=TwoWay}"
|
||
IsReadOnly="True">
|
||
<DataGrid.Columns>
|
||
<DataGridTextColumn Header="{x:Static localization:UI.Title_Feature}"
|
||
Binding="{Binding Page, Mode=OneWay}"
|
||
Width="*" />
|
||
</DataGrid.Columns>
|
||
</DataGrid>
|
||
<Border Grid.Column="1"
|
||
BorderThickness="1"
|
||
BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
|
||
CornerRadius="8">
|
||
<ScrollViewer Padding="8">
|
||
<controls:SpectreTextBlock HorizontalAlignment="Stretch"
|
||
VerticalAlignment="Stretch"
|
||
Text="{Binding MmcFeatureText, Mode=OneWay}"
|
||
TextWrapping="Wrap" />
|
||
</ScrollViewer>
|
||
</Border>
|
||
</Grid>
|
||
<StackPanel Grid.Row="1"
|
||
Orientation="Horizontal"
|
||
Spacing="8"
|
||
VerticalAlignment="Bottom">
|
||
<Button Command="{Binding SaveMmcFeaturesCommand, Mode=OneWay}">
|
||
<TextBlock
|
||
Text="{x:Static localization:UI.ButtonLabel_Save_MMC_GET_CONFIGURATION_response_to_file}" />
|
||
</Button>
|
||
</StackPanel>
|
||
</Grid>
|
||
</TabItem>
|
||
</TabControl>
|
||
</UserControl> |