Files
GSS2Rework/GSS2/Views/AmineContentView.axaml
T
amkovkov 3cc4d21947 feat: massive rework
1) GSS2.Core:
- strip prefixes in GSS2.Core.Analysis.AmineContent namespace class names
- add IEnumerable<double>.Variance extension
- remake analysis + update database so not needed to store all every file, calibration data also stored in database, also currently capturing images stored in system temporary directory and rewriting every time
2) GSS.UI.Core: AsyncImageRecordViewModel make zoom and pans public
3) GSS:
- remove image-storage-clear command
- remove ResultsView and ResultsViewModel, results presented in analysis
- rework calibration views
- add analysis views
- add text and number fields editors view
- add confirmation view on danger buttons
2026-05-13 12:56:32 +03:00

107 lines
5.2 KiB
XML

<UserControl
x:Class="GSS2.Views.AmineContentView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:GSS2.ViewModels"
xmlns:core="using:GSS2.UI.Core"
xmlns:avalonia_converters="using:Avalonia.Data.Converters"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:DataType="vm:AmineContentViewModel">
<UserControl.Resources>
<SolidColorBrush x:Key="MainBackground" Color="#001e46" />
<SolidColorBrush x:Key="ButtonBackground" Color="#0865b2" />
<SolidColorBrush x:Key="ButtonForeground" Color="#ffffff" />
</UserControl.Resources>
<UserControl.Styles>
<Style Selector="Button">
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="{StaticResource ButtonBackground}" />
<Setter Property="Foreground" Value="{StaticResource ButtonForeground}" />
</Style>
<Style Selector="Button.menu">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Stretch" />
</Style>
<Style Selector="TextBlock.menu-text">
<Setter Property="FontSize" Value="20"/>
</Style>
</UserControl.Styles>
<Border Background="{StaticResource MainBackground}" BorderThickness="0">
<Grid Margin="5" RowSpacing="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- Меню -->
<RowDefinition Height="*"/> <!-- Основной контент -->
</Grid.RowDefinitions>
<!-- Меню -->
<ScrollViewer Grid.Row="0" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Disabled">
<ScrollViewer.IsEnabled>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Converter="{x:Static BoolConverters.Not}" Path="IsScrolling" />
<Binding Converter="{x:Static BoolConverters.Not}" Path="SeparatorCalibration.MenuOpened" />
</MultiBinding>
</ScrollViewer.IsEnabled>
<Grid ColumnSpacing="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Анализ -->
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Калибровка проб -->
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Калибровка сепаратора -->
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Камера -->
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Система -->
</Grid.ColumnDefinitions>
<!-- Анализ -->
<Button Grid.Column="0" Classes="menu" Command="{Binding ChangeSectionCommand}" CommandParameter="0">
<TextBlock Classes="menu-text" Text="Анализ"/>
</Button>
<!-- Калибровка проб -->
<Button Grid.Column="1" Classes="menu" Command="{Binding ChangeSectionCommand}" CommandParameter="1">
<TextBlock Classes="menu-text" Text="Калибровка проб"/>
</Button>
<!-- Калибровка сепараторов -->
<Button Grid.Column="2" Classes="menu" Command="{Binding ChangeSectionCommand}" CommandParameter="2">
<TextBlock Classes="menu-text" Text="Калибровка сепараторов"/>
</Button>
<!-- Камера -->
<Button Grid.Column="3" Classes="menu" Command="{Binding ChangeSectionCommand}" CommandParameter="3">
<TextBlock Classes="menu-text" Text="Камера"/>
</Button>
<!-- Система -->
<Button Grid.Column="4" Classes="menu" Command="{Binding ChangeSectionCommand}" CommandParameter="4">
<TextBlock Classes="menu-text" Text="Система"/>
</Button>
</Grid>
</ScrollViewer>
<!-- Основной контент -->
<core:SectionPanel Grid.Row="1" ClipToBounds="True" CurrentIndex="{Binding CurrentIndex}" Orientation="Horizontal" IsScrolling="{Binding IsScrolling}">
<ContentControl Content="{Binding Analysis}"/> <!-- Анализ -->
<ContentControl Content="{Binding SampleCalibration}"/> <!-- Калибровка проб -->
<ContentControl Content="{Binding SeparatorCalibration}"/> <!-- Калибровка сепаратора -->
<ContentControl Content="{Binding Camera}"/> <!-- Камера -->
<ContentControl Content="{Binding System}"/> <!-- Система -->
</core:SectionPanel>
</Grid>
</Border>
</UserControl>