forked from amkovkov/GranuSightSoftware2
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
This commit is contained in:
@@ -3,11 +3,606 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:GSS2.ViewModels.AmineContent"
|
||||
xmlns:converters="using:GSS2.UI.Core.Converters"
|
||||
xmlns:avalonia_converters="using:Avalonia.Data.Converters"
|
||||
xmlns:i="using:Avalonia.Xaml.Interactivity"
|
||||
xmlns:ia="using:Avalonia.Xaml.Interactions.Custom"
|
||||
xmlns:controls="using:GSS2.Controls"
|
||||
xmlns:core="using:GSS2.UI.Core"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lvc="using:LiveChartsCore.SkiaSharpView.Avalonia"
|
||||
x:DataType="vm:AnalysisViewModel">
|
||||
|
||||
<Grid>
|
||||
<TextBlock Text="Анализ" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<UserControl.Resources>
|
||||
<converters:NotEqualsConverter x:Key="NotEqualsConverter" />
|
||||
<converters:EqualsConverter x:Key="EqualsConverter" />
|
||||
<converters:DateTimeConverter x:Key="DateTimeConverter" />
|
||||
|
||||
<SolidColorBrush x:Key="MenuBackground" Color="#00357a" />
|
||||
<SolidColorBrush x:Key="MenuBorder" Color="#0865b2" />
|
||||
<SolidColorBrush x:Key="Overlay" Color="#0865b23f" />
|
||||
<SolidColorBrush x:Key="ButtonBackground" Color="#0865b2" />
|
||||
<SolidColorBrush x:Key="ButtonDangerBackground" Color="#b20808" />
|
||||
<SolidColorBrush x:Key="ButtonForeground" Color="#ffffff" />
|
||||
<SolidColorBrush x:Key="MainBackground" Color="#001e46" />
|
||||
</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.danger">
|
||||
<Setter Property="Background" Value="{StaticResource ButtonDangerBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.vertical">
|
||||
<Setter Property="MinWidth" Value="40" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="TextBox">
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
</Style>
|
||||
|
||||
<Style Selector="TextBox.singleline">
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="TextBox.multiline">
|
||||
<Setter Property="VerticalContentAlignment" Value="Top" />
|
||||
<Setter Property="AcceptsReturn" Value="True" />
|
||||
<Setter Property="TextWrapping" Value="Wrap" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="TextBlock">
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="TextBlock.mini">
|
||||
<Setter Property="FontSize" Value="16"/>
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
</Style>
|
||||
|
||||
</UserControl.Styles>
|
||||
|
||||
<Grid Background="{StaticResource MainBackground}">
|
||||
|
||||
<!-- Основная форма -->
|
||||
<Grid IsEnabled="{Binding !MenuOpened}" ColumnSpacing="5" RowSpacing="5">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" /> <!-- Главная панель -->
|
||||
<RowDefinition Height="Auto" /> <!-- Кнопки главной панели -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Удалить -->
|
||||
<ColumnDefinition Width="*" /> <!-- Сохранить -->
|
||||
<ColumnDefinition Width="*" /> <!-- К информации/К изображению -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Главная панель -->
|
||||
<core:SectionPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
CanScrollBackward="{Binding MainSectionCanScrollBackward}"
|
||||
CanScrollForward="{Binding MainSectionCanScrollForward}"
|
||||
ClipToBounds="True"
|
||||
CurrentIndex="{Binding MainSectionCurrentIndex}"
|
||||
IsScrolling="{Binding MainSectionIsScrolling}"
|
||||
Orientation="Vertical">
|
||||
|
||||
<!-- Информация -->
|
||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" /> <!-- Информация -->
|
||||
<RowDefinition Height="Auto" /> <!-- Кнопки -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" /> <!-- Кнопка меню -->
|
||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Кнопка меню -->
|
||||
<Button Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" Classes="vertical" VerticalAlignment="Stretch" Command="{Binding ToggleMenuCommand}">
|
||||
<TextBlock Text="☰"/>
|
||||
</Button>
|
||||
|
||||
<!-- Информация -->
|
||||
<core:SectionPanel Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
CanScrollBackward="{Binding InfoSectionCanScrollBackward}"
|
||||
CanScrollForward="{Binding InfoSectionCanScrollForward}"
|
||||
ClipToBounds="True"
|
||||
CurrentIndex="{Binding InfoSectionCurrentIndex}"
|
||||
Cyclic="True"
|
||||
IsScrolling="{Binding InfoSectionIsScrolling}"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<!-- ИД / Название пробы / Дата и время отбора пробы / Место отбора пробы -->
|
||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" /> <!-- ИД (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- ИД (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Название пробы (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Название пробы (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Дата и время отбора пробы (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Дата и время отбора пробы (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Место отбора пробы (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Место отбора пробы (поле) -->
|
||||
<RowDefinition Height="*" /> <!-- Пустое пространство -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Информация -->
|
||||
<!-- ИД (подпись) -->
|
||||
<TextBlock Grid.Row="0" Classes="mini" Text="ИД:" />
|
||||
<!-- ИД (поле) -->
|
||||
<TextBox Grid.Row="1" Classes="singleline" Text="{Binding EditingRecord.Id}" PlaceholderText="ИД" IsReadOnly="True" />
|
||||
<!-- Название пробы (подпись) -->
|
||||
<TextBlock Grid.Row="2" Classes="mini" Text="Название пробы:" />
|
||||
<!-- Название пробы (поле) -->
|
||||
<controls:TouchTextBox Grid.Row="3" Classes="singleline" Text="{Binding EditingRecord.SampleName}" PlaceholderText="Название пробы" />
|
||||
<!-- Дата и время отбора пробы (подпись) -->
|
||||
<TextBlock Grid.Row="4" Classes="mini" Text="Дата и время отбора пробы:" />
|
||||
<!-- Дата и время отбора пробы (поле) -->
|
||||
<controls:TouchTextBox Grid.Row="5" Classes="singleline" Text="{Binding EditingRecord.SamplingDateTime, Converter={StaticResource DateTimeConverter}}" PlaceholderText="Дата и время отбора пробы" />
|
||||
<!-- Место отбора пробы (подпись) -->
|
||||
<TextBlock Grid.Row="6" Classes="mini" Text="Место отбора пробы:" />
|
||||
<!-- Место отбора пробы (поле) -->
|
||||
<controls:TouchTextBox Grid.Row="7" Classes="singleline" Text="{Binding EditingRecord.SamplingPlace}" PlaceholderText="Место отбора пробы" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Дополнительная информация о пробе -->
|
||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" /> <!-- Дополнительная информация о пробе (подпись) -->
|
||||
<RowDefinition Height="*" /> <!-- Дополнительная информация о пробе (поле) -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Информация -->
|
||||
<!-- Дополнительная информация о пробе (подпись) -->
|
||||
<TextBlock Grid.Row="0" Classes="mini" Text="Дополнительная информация о пробе:" />
|
||||
<!-- Дополнительная информация о пробе (поле) -->
|
||||
<controls:TouchTextBox Grid.Row="1" Classes="multiline" Text="{Binding EditingRecord.SampleComment}" PlaceholderText="Дополнительная информация о пробе" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Марка пробы / Тип сепаратора / Среднее значение / Средняя дисперсия -->
|
||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" /> <!-- Марка пробы (подпись) / Тип сепаратора (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Марка пробы (поле) / Тип сепаратора (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Минимальное значение (подпись) / Максимальное значение (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Минимальное значение (поле) / Максимальное значение (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Количество частиц (подпись) / Среднее значение (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Количество частиц (поле) / Среднее значение (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Средняя дисперсия (подпись) / Дисперсия среднего (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Средняя дисперсия (поле) / Дисперсия среднего (поле)-->
|
||||
<RowDefinition Height="*" /> <!-- Пустое пространство -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Информация -->
|
||||
<!-- Марка пробы (подпись) -->
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Classes="mini" Text="Марка пробы:" />
|
||||
<!-- Марка пробы (поле) -->
|
||||
<TextBox Grid.Row="1" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.SampleBrand}" PlaceholderText="Марка пробы:" IsReadOnly="True" />
|
||||
<!-- Тип сепаратора (подпись) -->
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Classes="mini" Text="Тип сепаратора:" />
|
||||
<!-- Тип сепаратора (поле) -->
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.SeparatorType}" PlaceholderText="Тип сепаратора:" IsReadOnly="True" />
|
||||
<!-- Минимальное значение (подпись) -->
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Classes="mini" Text="Минимальное значение:" />
|
||||
<!-- Минимальное значение (поле) -->
|
||||
<TextBox Grid.Row="3" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.MinValue, StringFormat={}{0:N4}}" PlaceholderText="Минимальное значение:" IsReadOnly="True" />
|
||||
<!-- Максимальное значение (подпись) -->
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Classes="mini" Text="Максимальное значение:" />
|
||||
<!-- Максимальное значение (поле) -->
|
||||
<TextBox Grid.Row="3" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.MaxValue, StringFormat={}{0:N4}}" PlaceholderText="Максимальное значение:" IsReadOnly="True" />
|
||||
<!-- Количество частиц (подпись) -->
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Classes="mini" Text="Количество частиц:" />
|
||||
<!-- Количество частиц (поле) -->
|
||||
<TextBox Grid.Row="5" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.ParticlesCount}" PlaceholderText="Количество частиц:" IsReadOnly="True" />
|
||||
<!-- Среднее значение (подпись) -->
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Classes="mini" Text="Среднее значение:" />
|
||||
<!-- Среднее значение (поле) -->
|
||||
<TextBox Grid.Row="5" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.MeanValue, StringFormat={}{0:N4}}" PlaceholderText="Среднее значение:" IsReadOnly="True" />
|
||||
<!-- Средняя дисперсия (подпись) -->
|
||||
<TextBlock Grid.Row="6" Grid.Column="0" Classes="mini" Text="Средняя дисперсия:" />
|
||||
<!-- Средняя дисперсия (поле) -->
|
||||
<TextBox Grid.Row="7" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.MeanVariance, StringFormat={}{0:N4}}" PlaceholderText="Средняя дисперсия:" IsReadOnly="True" />
|
||||
<!-- Дисперсия среднего (подпись) -->
|
||||
<TextBlock Grid.Row="6" Grid.Column="1" Classes="mini" Text="Дисперсия среднего:" />
|
||||
<!-- Дисперсия среднего (поле) -->
|
||||
<TextBox Grid.Row="7" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.VarianceOfMean, StringFormat={}{0:N4}}" PlaceholderText="Дисперсия среднего:" IsReadOnly="True" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Изображения -->
|
||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/> <!-- Изображения -->
|
||||
<ColumnDefinition Width="Auto"/> <!-- Кнопки -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Column="1" Grid.Row="0" Classes="vertical" VerticalAlignment="Stretch" Command="{Binding SwitchToImageCommand}">
|
||||
<TextBlock Text="1"/>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="1" Grid.Row="1" Classes="vertical" VerticalAlignment="Stretch" Command="{Binding SwitchToMaskImageCommand}">
|
||||
<TextBlock Text="2"/>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="1" Grid.Row="2" Classes="vertical" VerticalAlignment="Stretch" Command="{Binding SwitchToResultImageCommand}">
|
||||
<TextBlock Text="3"/>
|
||||
</Button>
|
||||
|
||||
<!-- Изображенияч -->
|
||||
<Grid Grid.Column="0" Grid.Row="0" Grid.RowSpan="3">
|
||||
|
||||
<!-- Изображения -->
|
||||
<Grid>
|
||||
|
||||
<Grid.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Converter="{x:Static ObjectConverters.IsNotNull}" Path="Image" />
|
||||
<Binding Converter="{x:Static ObjectConverters.IsNotNull}" Path="MaskImage" />
|
||||
<Binding Converter="{x:Static ObjectConverters.IsNotNull}" Path="ResultImage" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</Grid.IsVisible>
|
||||
|
||||
<!-- Изображения -->
|
||||
<core:ZoomPanImage HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
Zoom="{Binding ImagesZoom, Mode=TwoWay}"
|
||||
PanX="{Binding ImagesPanX, Mode=TwoWay}"
|
||||
PanY="{Binding ImagesPanY, Mode=TwoWay}"
|
||||
ImageSource="{Binding Image.Image}"
|
||||
Background="Black"
|
||||
IsVisible="{Binding ImageIsVisible}"/>
|
||||
|
||||
<core:ZoomPanImage HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
Zoom="{Binding ImagesZoom, Mode=TwoWay}"
|
||||
PanX="{Binding ImagesPanX, Mode=TwoWay}"
|
||||
PanY="{Binding ImagesPanY, Mode=TwoWay}"
|
||||
ImageSource="{Binding MaskImage.Image}"
|
||||
Background="Black"
|
||||
IsVisible="{Binding MaskImageIsVisible}"/>
|
||||
|
||||
<core:ZoomPanImage HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
Zoom="{Binding ImagesZoom, Mode=TwoWay}"
|
||||
PanX="{Binding ImagesPanX, Mode=TwoWay}"
|
||||
PanY="{Binding ImagesPanY, Mode=TwoWay}"
|
||||
ImageSource="{Binding ResultImage.Image}"
|
||||
Background="Black"
|
||||
IsVisible="{Binding ResultImageIsVisible}"/>
|
||||
|
||||
<!-- Оверлей загрузки -->
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" IsVisible="{Binding Image.IsLoading}">
|
||||
|
||||
<StackPanel.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.Or}">
|
||||
<Binding Path="Image.IsLoading" />
|
||||
<Binding Path="MaskImage.IsLoading" />
|
||||
<Binding Path="ResultImage.IsLoading" />
|
||||
<Binding Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</StackPanel.IsVisible>
|
||||
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
|
||||
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Оверлей "Изображения отсутствуют" -->
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Изображения отсутствуют">
|
||||
<TextBlock.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Converter="{x:Static ObjectConverters.IsNull}" Path="Image" />
|
||||
<Binding Converter="{x:Static ObjectConverters.IsNull}" Path="MaskImage" />
|
||||
<Binding Converter="{x:Static ObjectConverters.IsNull}" Path="ResultImage" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</TextBlock.IsVisible>
|
||||
</TextBlock>
|
||||
|
||||
<!-- Оверлей прогресс -->
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" IsVisible="{Binding ImagesIsCapturing}">
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Гистограмма средних значений -->
|
||||
<lvc:CartesianChart x:Name="MeanValuesChart"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
LegendTextPaint="{Binding LegendTextPaint, Mode=OneWay}"
|
||||
Series="{Binding MeanValuesHistogram, Mode=OneWay}"
|
||||
XAxes="{Binding MeanValuesXAxis, Mode=OneWay}"
|
||||
YAxes="{Binding MeanValuesYAxis, Mode=OneWay}" />
|
||||
|
||||
<!-- Гистограмма дисперсий -->
|
||||
<lvc:CartesianChart x:Name="VariancesChart"
|
||||
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
|
||||
LegendTextPaint="{Binding LegendTextPaint, Mode=OneWay}"
|
||||
Series="{Binding VariancesHistogram, Mode=OneWay}"
|
||||
XAxes="{Binding VariancesXAxis, Mode=OneWay}"
|
||||
YAxes="{Binding VariancesYAxis, Mode=OneWay}" />
|
||||
|
||||
</core:SectionPanel>
|
||||
|
||||
<!-- Кнопка влево -->
|
||||
<Button Grid.Column="1" Grid.Row="1"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
|
||||
Command="{Binding InfoSectionPreviousCommand}">
|
||||
|
||||
<Button.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="InfoSectionCanScrollBackward" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="InfoSectionIsScrolling" />
|
||||
</MultiBinding>
|
||||
</Button.IsEnabled>
|
||||
|
||||
<TextBlock Text="◀"/>
|
||||
|
||||
</Button>
|
||||
|
||||
<!-- Кнопка вправо -->
|
||||
<Button Grid.Column="2" Grid.Row="1"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
|
||||
Command="{Binding InfoSectionNextCommand}">
|
||||
|
||||
<Button.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="InfoSectionCanScrollForward" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="InfoSectionIsScrolling" />
|
||||
</MultiBinding>
|
||||
</Button.IsEnabled>
|
||||
|
||||
<TextBlock Text="▶"/>
|
||||
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Изображение -->
|
||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" /> <!-- Изображение -->
|
||||
<RowDefinition Height="Auto" /> <!-- Кнопка "Получить изображения" / "Отменить съёмку" -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Изображение -->
|
||||
<Grid>
|
||||
|
||||
<!-- Изображение -->
|
||||
<Grid>
|
||||
|
||||
<Grid.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Converter="{x:Static ObjectConverters.IsNotNull}" Path="Image" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</Grid.IsVisible>
|
||||
|
||||
<!-- Изображение -->
|
||||
<core:ZoomPanImage HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
ImageSource="{Binding Image.Image}"
|
||||
Background="Black"
|
||||
IsVisible="{Binding Image.IsLoading, Converter={x:Static BoolConverters.Not}}" />
|
||||
|
||||
<!-- Оверлей загрузки -->
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" IsVisible="{Binding Image.IsLoading}">
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Оверлей "Изображения отсутствуют" -->
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Изображения отсутствуют">
|
||||
<TextBlock.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Converter="{x:Static ObjectConverters.IsNull}" Path="Image" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</TextBlock.IsVisible>
|
||||
</TextBlock>
|
||||
|
||||
<!-- Оверлей прогресс -->
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" IsVisible="{Binding ImagesIsCapturing}">
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Кнопка "Получить изображения" -->
|
||||
<Button Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CaptureImageCommand}"
|
||||
IsVisible="{Binding CaptureImagesTask, Converter={x:Static ObjectConverters.IsNull}}">
|
||||
<TextBlock Text="Получить изображения"/>
|
||||
</Button>
|
||||
|
||||
<!-- Кнопка "Отменить съёмку" -->
|
||||
<Button Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CancelImageCapturingCommand}"
|
||||
IsVisible="{Binding CaptureImagesTask, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<TextBlock Text="Отменить съёмку"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</core:SectionPanel>
|
||||
|
||||
<!-- Кнопки главной панели -->
|
||||
<!-- Удалить -->
|
||||
<Button Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" Classes="danger" Command="{Binding DeleteRecordCommand}">
|
||||
<TextBlock Text="Удалить"/>
|
||||
</Button>
|
||||
|
||||
<!-- Сохранить -->
|
||||
<Button Grid.Row="1" Grid.Column="1" HorizontalAlignment="Stretch" Command="{Binding SaveRecordCommand}" Content="Сохранить">
|
||||
<TextBlock Text="Сохранить"/>
|
||||
</Button>
|
||||
|
||||
<!-- К информации -->
|
||||
<Button Grid.Row="1" Grid.Column="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding SwitchMainSectionCommand}"
|
||||
Content="К информации"
|
||||
IsVisible="{Binding MainSectionCurrentIndex, Converter={StaticResource EqualsConverter}, ConverterParameter=1}">
|
||||
|
||||
<TextBlock Text="К информации"/>
|
||||
|
||||
<Button.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="MainSectionCanScrollBackward" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="MainSectionIsScrolling" />
|
||||
</MultiBinding>
|
||||
</Button.IsEnabled>
|
||||
|
||||
</Button>
|
||||
|
||||
<!-- К изображению -->
|
||||
<Button Grid.Row="1" Grid.Column="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding SwitchMainSectionCommand}"
|
||||
Content="К изображению"
|
||||
IsVisible="{Binding MainSectionCurrentIndex, Converter={StaticResource EqualsConverter}, ConverterParameter=0}">
|
||||
|
||||
<TextBlock Text="К изображению"/>
|
||||
|
||||
<Button.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="MainSectionCanScrollForward" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="MainSectionIsScrolling" />
|
||||
</MultiBinding>
|
||||
</Button.IsEnabled>
|
||||
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Полупрозрачный оверлей -->
|
||||
<Border Background="{StaticResource Overlay}" IsEnabled="{Binding MenuOpened}" IsVisible="{Binding MenuOpened}">
|
||||
<Interaction.Behaviors>
|
||||
<TappedTrigger>
|
||||
<InvokeCommandAction Command="{Binding CloseMenuCommand}" />
|
||||
</TappedTrigger>
|
||||
</Interaction.Behaviors>
|
||||
</Border>
|
||||
|
||||
<!-- Выезжающая боковая панель -->
|
||||
<Border HorizontalAlignment="Left"
|
||||
Background="{StaticResource MenuBackground}" BorderBrush="{StaticResource MenuBorder}" BorderThickness="0,0,1,0"
|
||||
IsEnabled="{Binding MenuOpened}" IsVisible="{Binding MenuOpened}">
|
||||
|
||||
<Border.Transitions>
|
||||
<Transitions>
|
||||
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.25" />
|
||||
</Transitions>
|
||||
</Border.Transitions>
|
||||
|
||||
<Interaction.Behaviors>
|
||||
|
||||
<DataTriggerBehavior Binding="{Binding MenuOpened}" ComparisonCondition="Equal" Value="True">
|
||||
<ChangePropertyAction PropertyName="RenderTransform" Value="translateX(0px)" />
|
||||
</DataTriggerBehavior>
|
||||
|
||||
<DataTriggerBehavior Binding="{Binding MenuOpened}" ComparisonCondition="Equal" Value="False">
|
||||
<ChangePropertyAction PropertyName="RenderTransform" Value="translateX(-320px)" />
|
||||
</DataTriggerBehavior>
|
||||
|
||||
</Interaction.Behaviors>
|
||||
|
||||
<!-- Содержимое меню -->
|
||||
<Grid RowSpacing="10" Margin="10">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Grid.Row="0" MinWidth="200" HorizontalAlignment="Stretch" Command="{Binding CreateRecordCommand}">
|
||||
<TextBlock Text="Новая запись"/>
|
||||
</Button>
|
||||
|
||||
<ListBox Grid.Row="1" Background="{StaticResource MenuBackground}" ItemsSource="{Binding Records}" SelectedItem="{Binding SelectedRecord}">
|
||||
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
|
||||
<ListBox.Styles>
|
||||
|
||||
<Style Selector="ListBoxItem">
|
||||
<Setter Property="Background" Value="{StaticResource ButtonBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="ListBoxItem:selected /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource MainBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="ListBoxItem:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource MainBackground}" />
|
||||
</Style>
|
||||
|
||||
</ListBox.Styles>
|
||||
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Margin="3" CornerRadius="5">
|
||||
<TextBlock Classes="mini" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Run Text="{Binding Id, StringFormat='[{0}] '}" />
|
||||
<Run Text="{Binding SampleName}" />
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
|
||||
</ListBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
using GSS2.ViewModels.AmineContent;
|
||||
|
||||
namespace GSS2.Views.AmineContent;
|
||||
|
||||
public partial class AnalysisView : UserControl
|
||||
@@ -7,5 +9,14 @@ public partial class AnalysisView : UserControl
|
||||
public AnalysisView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
(DataContext as AnalysisViewModel)?.UpdateCharts += OnChartsUpdate;
|
||||
DataContextChanged += (_, ea) => (DataContext as AnalysisViewModel)?.UpdateCharts += OnChartsUpdate;
|
||||
}
|
||||
|
||||
private void OnChartsUpdate(object? sender, EventArgs ea)
|
||||
{
|
||||
MeanValuesChart.CoreChart.Update();
|
||||
VariancesChart.CoreChart.Update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="GSS2.Views.AmineContent.ResultsView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:GSS2.ViewModels.AmineContent"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
x:DataType="vm:ResultsViewModel">
|
||||
|
||||
<Grid>
|
||||
<TextBlock Text="Результаты" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
@@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace GSS2.Views.AmineContent;
|
||||
|
||||
public partial class ResultsView : UserControl
|
||||
{
|
||||
public ResultsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,8 @@
|
||||
xmlns:avalonia_converters="using:Avalonia.Data.Converters"
|
||||
xmlns:i="using:Avalonia.Xaml.Interactivity"
|
||||
xmlns:ia="using:Avalonia.Xaml.Interactions.Custom"
|
||||
xmlns:local="using:GSS2"
|
||||
xmlns:controls="using:GSS2.Controls"
|
||||
xmlns:core="using:GSS2.UI.Core"
|
||||
xmlns:core_vm="using:GSS2.UI.Core.ViewModels"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
x:DataType="vm:SampleCalibrationViewModel">
|
||||
|
||||
@@ -83,7 +82,7 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Удалить -->
|
||||
<ColumnDefinition Width="*" /> <!-- Сохранить -->
|
||||
<ColumnDefinition Width="*" /> <!-- К информации/К изображениям -->
|
||||
<ColumnDefinition Width="*" /> <!-- К информации/К изображению -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Главная панель -->
|
||||
@@ -153,23 +152,23 @@
|
||||
<!-- Название пробы (подпись) -->
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Classes="mini" Text="Название пробы:" />
|
||||
<!-- Название пробы (поле) -->
|
||||
<local:TouchTextBox Grid.Row="3" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.SampleName}" PlaceholderText="Название пробы" />
|
||||
<controls:TouchTextBox Grid.Row="3" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.SampleName}" PlaceholderText="Название пробы" />
|
||||
<!-- Марка пробы (подпись) -->
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Classes="mini" Text="Марка пробы:" />
|
||||
<!-- Марка пробы (поле) -->
|
||||
<local:TouchTextBox Grid.Row="3" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.SampleBrand}" PlaceholderText="Марка пробы" />
|
||||
<controls:TouchTextBox Grid.Row="3" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.SampleBrand}" PlaceholderText="Марка пробы" />
|
||||
<!-- Дата и время отбора пробы (подпись) -->
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Classes="mini" Text="Дата и время отбора пробы:" />
|
||||
<!-- Дата и время отбора пробы (поле) -->
|
||||
<local:TouchTextBox Grid.Row="5" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.SamplingDateTime, Converter={StaticResource DateTimeConverter}}" PlaceholderText="Дата и время отбора пробы" />
|
||||
<controls:TouchTextBox Grid.Row="5" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.SamplingDateTime, Converter={StaticResource DateTimeConverter}}" PlaceholderText="Дата и время отбора пробы" />
|
||||
<!-- Место отбора пробы (подпись) -->
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Classes="mini" Text="Место отбора пробы:" />
|
||||
<!-- Место отбора пробы (поле) -->
|
||||
<local:TouchTextBox Grid.Row="5" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.SamplingPlace}" PlaceholderText="Место отбора пробы" />
|
||||
<controls:TouchTextBox Grid.Row="5" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.SamplingPlace}" PlaceholderText="Место отбора пробы" />
|
||||
<!-- Масса пробы (кг) (подпись) -->
|
||||
<TextBlock Grid.Row="6" Grid.ColumnSpan="2" Grid.Column="0" Classes="mini" Text="Масса пробы (кг):" />
|
||||
<!-- Масса пробы (кг) (поле) -->
|
||||
<local:TouchNumericUpDown Grid.Row="7" Grid.ColumnSpan="2" Grid.Column="0" Classes="singleline" FormatString="0.0000" Increment="0.0001" Value="{Binding EditingRecord.SampleMass}" PlaceholderText="Масса пробы (кг)" />
|
||||
<controls:TouchNumericUpDown Grid.Row="7" Grid.ColumnSpan="2" Grid.Column="0" Classes="singleline" FormatString="0.0000" Increment="0.0001" Value="{Binding EditingRecord.SampleMass}" PlaceholderText="Масса пробы (кг)" />
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -197,23 +196,23 @@
|
||||
<!-- Название используемой кондиционирующей смеси (подпись) -->
|
||||
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" Grid.Column="0" Classes="mini" Text="Название используемой кондиционирующей смеси:" />
|
||||
<!-- Название используемой кондиционирующей смеси (поле) -->
|
||||
<local:TouchTextBox Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.MixtureName}" PlaceholderText="Название используемой кондиционирующей смеси" />
|
||||
<controls:TouchTextBox Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.MixtureName}" PlaceholderText="Название используемой кондиционирующей смеси" />
|
||||
<!-- Содержание люминофоров в кондиционирующей смеси (%) (подпись) -->
|
||||
<TextBlock Grid.Row="2" Grid.ColumnSpan="2" Grid.Column="0" Classes="mini" Text="Содержание люминофоров в кондиционирующей смеси (%):" />
|
||||
<!-- Содержание люминофоров в кондиционирующей смеси (%) (поле) -->
|
||||
<local:TouchNumericUpDown Grid.Row="3" Grid.ColumnSpan="2" Grid.Column="0" Classes="singleline" FormatString="0.0" Increment="0.1" Value="{Binding EditingRecord.MixtureAmineContent}" PlaceholderText="Содержание люминофоров в кондиционирующей смеси (%)" />
|
||||
<controls:TouchNumericUpDown Grid.Row="3" Grid.ColumnSpan="2" Grid.Column="0" Classes="singleline" FormatString="0.0" Increment="0.1" Value="{Binding EditingRecord.MixtureAmineContent}" PlaceholderText="Содержание люминофоров в кондиционирующей смеси (%)" />
|
||||
<!-- Норма расхода кондиционирующей смеси (кг/т | гр/кг) (подпись) -->
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Classes="mini" Text="Норма расхода (кг/т | гр/кг):" />
|
||||
<!-- Норма расхода кондиционирующей смеси (кг/т | гр/кг) (поле) -->
|
||||
<local:TouchNumericUpDown Grid.Row="5" Grid.Column="0" Classes="singleline" FormatString="0.0000" Increment="0.0001" Value="{Binding EditingRecord.MixtureNormalRate}" PlaceholderText="Норма расхода кондиционирующей смеси (кг/т | гр/кг)" />
|
||||
<controls:TouchNumericUpDown Grid.Row="5" Grid.Column="0" Classes="singleline" FormatString="0.0000" Increment="0.0001" Value="{Binding EditingRecord.MixtureNormalRate}" PlaceholderText="Норма расхода кондиционирующей смеси (кг/т | гр/кг)" />
|
||||
<!-- Фактический расход кондиционирующей смеси (кг/т | гр/кг) (подпись) -->
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Classes="mini" Text="Фактический расход (кг/т | гр/кг):" />
|
||||
<!-- Фактический расход кондиционирующей смеси (кг/т | гр/кг) (поле) -->
|
||||
<local:TouchNumericUpDown Grid.Row="5" Grid.Column="1" Classes="singleline" FormatString="0.0000" Increment="0.0001" Value="{Binding EditingRecord.MixtureActualRate}" PlaceholderText="Фактический расход кондиционирующей смеси (кг/т | гр/кг)" />
|
||||
<controls:TouchNumericUpDown Grid.Row="5" Grid.Column="1" Classes="singleline" FormatString="0.0000" Increment="0.0001" Value="{Binding EditingRecord.MixtureActualRate}" PlaceholderText="Фактический расход кондиционирующей смеси (кг/т | гр/кг)" />
|
||||
<!-- Измеренное количество кондиционирующей смеси (кг/т | гр/кг) (подпись) -->
|
||||
<TextBlock Grid.Row="6" Grid.ColumnSpan="2" Grid.Column="0" Classes="mini" Text="Измеренное количество кондиционирующей смеси (кг/т | гр/кг):" />
|
||||
<!-- Измеренное количество кондиционирующей смеси (кг/т | гр/кг) (поле) -->
|
||||
<local:TouchNumericUpDown Grid.Row="7" Grid.ColumnSpan="2" Grid.Column="0" Classes="singleline" FormatString="0.0000" Increment="0.0001" Value="{Binding EditingRecord.MeasuredContent}" PlaceholderText="Измеренное количество кондиционирующей смеси (кг/т | гр/кг)" />
|
||||
<controls:TouchNumericUpDown Grid.Row="7" Grid.ColumnSpan="2" Grid.Column="0" Classes="singleline" FormatString="0.0000" Increment="0.0001" Value="{Binding EditingRecord.MeasuredContent}" PlaceholderText="Измеренное количество кондиционирующей смеси (кг/т | гр/кг)" />
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -229,19 +228,15 @@
|
||||
<!-- Дополнительная информация о пробе (подпись) -->
|
||||
<TextBlock Grid.Row="0" Classes="mini" Text="Дополнительная информация о пробе:" />
|
||||
<!-- Дополнительная информация о пробе (поле) -->
|
||||
<local:TouchTextBox Grid.Row="1" Classes="multiline" Text="{Binding EditingRecord.SampleComment}" PlaceholderText="Дополнительная информация о пробе" />
|
||||
<controls:TouchTextBox Grid.Row="1" Classes="multiline" Text="{Binding EditingRecord.SampleComment}" PlaceholderText="Дополнительная информация о пробе" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</core:SectionPanel>
|
||||
|
||||
<!-- Кнопка влево -->
|
||||
<Button
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
<Button Grid.Column="1" Grid.Row="1"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
|
||||
Command="{Binding InfoSectionPreviousCommand}">
|
||||
|
||||
<Button.IsEnabled>
|
||||
@@ -256,12 +251,8 @@
|
||||
</Button>
|
||||
|
||||
<!-- Кнопка вправо -->
|
||||
<Button
|
||||
Grid.Column="2"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
<Button Grid.Column="2" Grid.Row="1"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
|
||||
Command="{Binding InfoSectionNextCommand}">
|
||||
|
||||
<Button.IsEnabled>
|
||||
@@ -277,421 +268,75 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Изображения -->
|
||||
<!-- Изображение -->
|
||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" /> <!-- Изображения -->
|
||||
<RowDefinition Height="Auto" /> <!-- Кнопка "Получить изображения"/"Отменить съёмку" -->
|
||||
<RowDefinition Height="*" /> <!-- Изображение -->
|
||||
<RowDefinition Height="Auto" /> <!-- Кнопка "Получить изображения" / "Отменить съёмку" -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Кнопка "Получить изображения"/"Отменить съёмку" -->
|
||||
<ColumnDefinition Width="*" /> <!-- Кнопки "Изображения сепаратора"/"Изображения пробы" -->
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Изображение -->
|
||||
<Grid>
|
||||
|
||||
<!-- Изображения -->
|
||||
<core:SectionPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
CanScrollBackward="{Binding ImagesSectionCanScrollBackward}"
|
||||
CanScrollForward="{Binding ImagesSectionCanScrollForward}"
|
||||
ClipToBounds="True"
|
||||
CurrentIndex="{Binding ImagesSectionCurrentIndex}"
|
||||
IsScrolling="{Binding ImagesSectionIsScrolling}"
|
||||
Orientation="Vertical">
|
||||
|
||||
<!-- Изображения сепаратора -->
|
||||
<!-- Изображение -->
|
||||
<Grid>
|
||||
|
||||
<Grid ColumnSpacing="5">
|
||||
<Grid.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Converter="{x:Static ObjectConverters.IsNotNull}" Path="Image" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</Grid.IsVisible>
|
||||
|
||||
<Grid.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<!-- Изображение -->
|
||||
<core:ZoomPanImage HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
ImageSource="{Binding Image.Image}"
|
||||
Background="Black"
|
||||
IsVisible="{Binding Image.IsLoading, Converter={x:Static BoolConverters.Not}}" />
|
||||
|
||||
<Binding
|
||||
Converter="{StaticResource NotEqualsConverter}"
|
||||
ConverterParameter="0"
|
||||
Path="SeparatorImages.Count" />
|
||||
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
|
||||
</MultiBinding>
|
||||
</Grid.IsVisible>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" /> <!-- Кнопка влево -->
|
||||
<ColumnDefinition Width="*" /> <!-- Изображения -->
|
||||
<ColumnDefinition Width="Auto" /> <!-- Кнопка вправо -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Кнопка влево -->
|
||||
<Button
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Classes="vertical"
|
||||
Command="{Binding SeparatorImagesSectionPreviousCommand}">
|
||||
|
||||
<TextBlock Text="◀"/>
|
||||
|
||||
<Button.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="SeparatorImagesSectionCanScrollBackward" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="SeparatorImagesSectionIsScrolling" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesSectionIsScrolling" />
|
||||
</MultiBinding>
|
||||
</Button.IsEnabled>
|
||||
|
||||
</Button>
|
||||
|
||||
<!-- Изображения -->
|
||||
<core:SectionPanel
|
||||
Grid.Column="1"
|
||||
CanScrollBackward="{Binding SeparatorImagesSectionCanScrollBackward}"
|
||||
CanScrollForward="{Binding SeparatorImagesSectionCanScrollForward}"
|
||||
ChildrenSource="{Binding SeparatorImages}"
|
||||
ClipToBounds="True"
|
||||
CurrentIndex="{Binding SeparatorImagesSectionCurrentIndex}"
|
||||
Cyclic="True"
|
||||
IsScrolling="{Binding SeparatorImagesSectionIsScrolling}"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<core:SectionPanel.ChildrenTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Изображения -->
|
||||
<ColumnDefinition Width="Auto" /> <!-- Информация -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" /> <!-- Изображения -->
|
||||
<RowDefinition Height="Auto" /> <!-- ИД (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- ИД (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность видимого (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность видимого (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность УФ 365 нм (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность УФ 365 нм (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность УФ 254 нм (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность УФ 254 нм (поле) -->
|
||||
<RowDefinition Height="*" /> <!-- Пустое пространство -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Изображения -->
|
||||
<Grid Grid.Row="0" Grid.RowSpan="12" Grid.Column="0">
|
||||
|
||||
<core:ZoomPanImage
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Black"
|
||||
x:DataType="core_vm:AsyncImageRecordViewModel"
|
||||
ImageSource="{Binding Image}"
|
||||
IsVisible="{Binding IsLoading, Converter={x:Static BoolConverters.Not}}" />
|
||||
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" x:DataType="core_vm:AsyncImageRecordViewModel" IsVisible="{Binding IsLoading}">
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Информация -->
|
||||
<!-- ИД (подпись) -->
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Classes="mini" Text="ИД: " />
|
||||
<!-- ИД (поле) -->
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Classes="singleline" IsReadOnly="True" x:DataType="core_vm:AsyncImageRecordViewModel" Text="{Binding ImageRecord.Id}" />
|
||||
<!-- Интенсивность видимого (подпись) -->
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Classes="mini" Text="Интенсивность видимого: " />
|
||||
<!-- Интенсивность видимого (поле) -->
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Classes="singleline" IsReadOnly="True" x:DataType="core_vm:AsyncImageRecordViewModel" Text="{Binding ImageRecord.VisibleIntensity}" />
|
||||
<!-- Интенсивность УФ 365 нм (подпись) -->
|
||||
<TextBlock Grid.Row="5" Grid.Column="1" Classes="mini" Text="Интенсивность УФ 365 нм: " />
|
||||
<!-- Интенсивность УФ 365 нм (поле) -->
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Classes="singleline" IsReadOnly="True" x:DataType="core_vm:AsyncImageRecordViewModel" Text="{Binding ImageRecord.Uv365Intensity}" />
|
||||
<!-- Интенсивность УФ 254 нм (подпись) -->
|
||||
<TextBlock Grid.Row="7" Grid.Column="1" Classes="mini" Text="Интенсивность УФ 254 нм: " />
|
||||
<!-- Интенсивность УФ 254 нм (поле) -->
|
||||
<TextBox Grid.Row="8" Grid.Column="1" Classes="singleline" IsReadOnly="True" x:DataType="core_vm:AsyncImageRecordViewModel" Text="{Binding ImageRecord.Uv254Intensity}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</DataTemplate>
|
||||
</core:SectionPanel.ChildrenTemplate>
|
||||
|
||||
</core:SectionPanel>
|
||||
|
||||
<!-- Кнопка вправо -->
|
||||
<Button
|
||||
Grid.Column="2"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Classes="vertical"
|
||||
Command="{Binding SeparatorImagesSectionNextCommand}">
|
||||
|
||||
<TextBlock Text="▶"/>
|
||||
|
||||
<Button.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="SeparatorImagesSectionCanScrollForward" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="SeparatorImagesSectionIsScrolling" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesSectionIsScrolling" />
|
||||
</MultiBinding>
|
||||
</Button.IsEnabled>
|
||||
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="Изображения сепаратора отсутствуют">
|
||||
|
||||
<TextBlock.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
|
||||
<Binding
|
||||
Converter="{StaticResource EqualsConverter}"
|
||||
ConverterParameter="0"
|
||||
Path="SeparatorImages.Count" />
|
||||
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
|
||||
</MultiBinding>
|
||||
</TextBlock.IsVisible>
|
||||
|
||||
</TextBlock>
|
||||
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" IsVisible="{Binding ImagesIsCapturing}">
|
||||
<!-- Оверлей загрузки -->
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" IsVisible="{Binding Image.IsLoading}">
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Изображения пробы -->
|
||||
<Grid>
|
||||
<!-- Оверлей "Изображения отсутствуют" -->
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Изображения отсутствуют">
|
||||
<TextBlock.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Converter="{x:Static ObjectConverters.IsNull}" Path="Image" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</TextBlock.IsVisible>
|
||||
</TextBlock>
|
||||
|
||||
<Grid ColumnSpacing="5">
|
||||
<!-- Оверлей прогресс -->
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" IsVisible="{Binding ImagesIsCapturing}">
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
|
||||
</StackPanel>
|
||||
|
||||
<Grid.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
|
||||
<Binding
|
||||
Converter="{StaticResource NotEqualsConverter}"
|
||||
ConverterParameter="0"
|
||||
Path="SampleImages.Count" />
|
||||
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
|
||||
</MultiBinding>
|
||||
</Grid.IsVisible>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" /> <!-- Кнопка влево -->
|
||||
<ColumnDefinition Width="*" /> <!-- Изображения -->
|
||||
<ColumnDefinition Width="Auto" /> <!-- Кнопка вправо -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Кнопка влево -->
|
||||
<Button
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Classes="vertical"
|
||||
Command="{Binding SampleImagesSectionPreviousCommand}">
|
||||
|
||||
<TextBlock Text="◀"/>
|
||||
|
||||
<Button.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="SampleImagesSectionCanScrollBackward" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="SampleImagesSectionIsScrolling" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesSectionIsScrolling" />
|
||||
</MultiBinding>
|
||||
</Button.IsEnabled>
|
||||
|
||||
</Button>
|
||||
|
||||
<!-- Изображения -->
|
||||
<core:SectionPanel
|
||||
Grid.Column="1"
|
||||
CanScrollBackward="{Binding SampleImagesSectionCanScrollBackward}"
|
||||
CanScrollForward="{Binding SampleImagesSectionCanScrollForward}"
|
||||
ChildrenSource="{Binding SampleImages}"
|
||||
ClipToBounds="True"
|
||||
CurrentIndex="{Binding SampleImagesSectionCurrentIndex}"
|
||||
Cyclic="True"
|
||||
IsScrolling="{Binding SampleImagesSectionIsScrolling}"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<core:SectionPanel.ChildrenTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Изображения -->
|
||||
<ColumnDefinition Width="Auto" /> <!-- Информация -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" /> <!-- Изображения -->
|
||||
<RowDefinition Height="Auto" /> <!-- ИД (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- ИД (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность видимого (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность видимого (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность УФ 365 нм (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность УФ 365 нм (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность УФ 254 нм (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность УФ 254 нм (поле) -->
|
||||
<RowDefinition Height="*" /> <!-- Пустое пространство -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Изображения -->
|
||||
<Grid Grid.Row="0" Grid.RowSpan="12" Grid.Column="0">
|
||||
|
||||
<core:ZoomPanImage
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Black"
|
||||
x:DataType="core_vm:AsyncImageRecordViewModel"
|
||||
ImageSource="{Binding Image}"
|
||||
IsVisible="{Binding IsLoading, Converter={x:Static BoolConverters.Not}}" />
|
||||
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" x:DataType="core_vm:AsyncImageRecordViewModel" IsVisible="{Binding IsLoading}">
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Информация -->
|
||||
<!-- ИД (подпись) -->
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Classes="mini" Text="ИД: " />
|
||||
<!-- ИД (поле) -->
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Classes="singleline" IsReadOnly="True" x:DataType="core_vm:AsyncImageRecordViewModel" Text="{Binding ImageRecord.Id}" />
|
||||
<!-- Интенсивность видимого (подпись) -->
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Classes="mini" Text="Интенсивность видимого: " />
|
||||
<!-- Интенсивность видимого (поле) -->
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Classes="singleline" IsReadOnly="True" x:DataType="core_vm:AsyncImageRecordViewModel" Text="{Binding ImageRecord.VisibleIntensity}" />
|
||||
<!-- Интенсивность УФ 365 нм (подпись) -->
|
||||
<TextBlock Grid.Row="5" Grid.Column="1" Classes="mini" Text="Интенсивность УФ 365 нм: " />
|
||||
<!-- Интенсивность УФ 365 нм (поле) -->
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Classes="singleline" IsReadOnly="True" x:DataType="core_vm:AsyncImageRecordViewModel" Text="{Binding ImageRecord.Uv365Intensity}" />
|
||||
<!-- Интенсивность УФ 254 нм (подпись) -->
|
||||
<TextBlock Grid.Row="7" Grid.Column="1" Classes="mini" Text="Интенсивность УФ 254 нм: " />
|
||||
<!-- Интенсивность УФ 254 нм (поле) -->
|
||||
<TextBox Grid.Row="8" Grid.Column="1" Classes="singleline" IsReadOnly="True" x:DataType="core_vm:AsyncImageRecordViewModel" Text="{Binding ImageRecord.Uv254Intensity}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</DataTemplate>
|
||||
</core:SectionPanel.ChildrenTemplate>
|
||||
|
||||
</core:SectionPanel>
|
||||
|
||||
<!-- Кнопка вправо -->
|
||||
<Button
|
||||
Grid.Column="2"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Classes="vertical"
|
||||
Command="{Binding SampleImagesSectionNextCommand}">
|
||||
|
||||
<TextBlock Text="▶"/>
|
||||
|
||||
<Button.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="SampleImagesSectionCanScrollForward" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="SampleImagesSectionIsScrolling" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesSectionIsScrolling" />
|
||||
</MultiBinding>
|
||||
</Button.IsEnabled>
|
||||
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="Изображения пробы отсутствуют">
|
||||
|
||||
<TextBlock.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
|
||||
<Binding
|
||||
Converter="{StaticResource EqualsConverter}"
|
||||
ConverterParameter="0"
|
||||
Path="SampleImages.Count" />
|
||||
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
|
||||
</MultiBinding>
|
||||
</TextBlock.IsVisible>
|
||||
|
||||
</TextBlock>
|
||||
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" IsVisible="{Binding ImagesIsCapturing}">
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
</core:SectionPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- Кнопка "Получить изображения" -->
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
<Button Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CaptureImageCommand}"
|
||||
IsEnabled="{Binding !ImagesSectionIsScrolling}"
|
||||
IsVisible="{Binding CaptureImagesTask, Converter={x:Static ObjectConverters.IsNull}}">
|
||||
<TextBlock Text="Получить изображения"/>
|
||||
</Button>
|
||||
|
||||
<!-- Кнопка "Отменить съёмку" -->
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
<Button Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CancelImageCapturingCommand}"
|
||||
IsEnabled="{Binding !ImagesSectionIsScrolling}"
|
||||
IsVisible="{Binding CaptureImagesTask, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<TextBlock Text="Отменить съёмку"/>
|
||||
</Button>
|
||||
|
||||
<!-- Кнопка "Изображения сепаратора" -->
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding ImagesSectionSwitchCommand}"
|
||||
IsEnabled="{Binding !ImagesSectionIsScrolling}"
|
||||
IsVisible="{Binding ImagesSectionCurrentIndex, Converter={StaticResource EqualsConverter}, ConverterParameter=1}">
|
||||
<TextBlock Text="Изображения сепаратора"/>
|
||||
</Button>
|
||||
|
||||
<!-- Кнопка "Изображения пробы" -->
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding ImagesSectionSwitchCommand}"
|
||||
IsEnabled="{Binding !ImagesSectionIsScrolling}"
|
||||
IsVisible="{Binding ImagesSectionCurrentIndex, Converter={StaticResource EqualsConverter}, ConverterParameter=0}">
|
||||
<TextBlock Text="Изображения пробы"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</core:SectionPanel>
|
||||
@@ -708,9 +353,7 @@
|
||||
</Button>
|
||||
|
||||
<!-- К информации -->
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
<Button Grid.Row="1" Grid.Column="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding SwitchMainSectionCommand}"
|
||||
Content="К информации"
|
||||
@@ -727,16 +370,14 @@
|
||||
|
||||
</Button>
|
||||
|
||||
<!-- К изображениям -->
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
<!-- К изображению -->
|
||||
<Button Grid.Row="1" Grid.Column="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding SwitchMainSectionCommand}"
|
||||
Content="К изображениям"
|
||||
Content="К изображению"
|
||||
IsVisible="{Binding MainSectionCurrentIndex, Converter={StaticResource EqualsConverter}, ConverterParameter=0}">
|
||||
|
||||
<TextBlock Text="К изображениям"/>
|
||||
<TextBlock Text="К изображению"/>
|
||||
|
||||
<Button.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
@@ -759,13 +400,9 @@
|
||||
</Border>
|
||||
|
||||
<!-- Выезжающая боковая панель -->
|
||||
<Border
|
||||
HorizontalAlignment="Left"
|
||||
Background="{StaticResource MenuBackground}"
|
||||
BorderBrush="{StaticResource MenuBorder}"
|
||||
BorderThickness="0,0,1,0"
|
||||
IsEnabled="{Binding MenuOpened}"
|
||||
IsVisible="{Binding MenuOpened}">
|
||||
<Border HorizontalAlignment="Left"
|
||||
Background="{StaticResource MenuBackground}" BorderBrush="{StaticResource MenuBorder}" BorderThickness="0,0,1,0"
|
||||
IsEnabled="{Binding MenuOpened}" IsVisible="{Binding MenuOpened}">
|
||||
|
||||
<Border.Transitions>
|
||||
<Transitions>
|
||||
@@ -775,22 +412,12 @@
|
||||
|
||||
<Interaction.Behaviors>
|
||||
|
||||
<DataTriggerBehavior
|
||||
Binding="{Binding MenuOpened}"
|
||||
ComparisonCondition="Equal"
|
||||
Value="True">
|
||||
|
||||
<DataTriggerBehavior Binding="{Binding MenuOpened}" ComparisonCondition="Equal" Value="True">
|
||||
<ChangePropertyAction PropertyName="RenderTransform" Value="translateX(0px)" />
|
||||
|
||||
</DataTriggerBehavior>
|
||||
|
||||
<DataTriggerBehavior
|
||||
Binding="{Binding MenuOpened}"
|
||||
ComparisonCondition="Equal"
|
||||
Value="False">
|
||||
|
||||
<DataTriggerBehavior Binding="{Binding MenuOpened}" ComparisonCondition="Equal" Value="False">
|
||||
<ChangePropertyAction PropertyName="RenderTransform" Value="translateX(-320px)" />
|
||||
|
||||
</DataTriggerBehavior>
|
||||
|
||||
</Interaction.Behaviors>
|
||||
@@ -803,14 +430,11 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Grid.Row="0"
|
||||
MinWidth="200"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CreateRecordCommand}">
|
||||
<Button Grid.Row="0" MinWidth="200" HorizontalAlignment="Stretch" Command="{Binding CreateRecordCommand}">
|
||||
<TextBlock Text="Новая запись"/>
|
||||
</Button>
|
||||
|
||||
<ListBox Grid.Row="1" ItemsSource="{Binding Records}" SelectedItem="{Binding SelectedRecord}">
|
||||
<ListBox Grid.Row="1" Background="{StaticResource MenuBackground}" ItemsSource="{Binding Records}" SelectedItem="{Binding SelectedRecord}">
|
||||
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
xmlns:avalonia_converters="using:Avalonia.Data.Converters"
|
||||
xmlns:i="using:Avalonia.Xaml.Interactivity"
|
||||
xmlns:ia="using:Avalonia.Xaml.Interactions.Custom"
|
||||
xmlns:local="using:GSS2"
|
||||
xmlns:controls="using:GSS2.Controls"
|
||||
xmlns:core="using:GSS2.UI.Core"
|
||||
xmlns:core_vm="using:GSS2.UI.Core.ViewModels"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
x:DataType="vm:SeparatorCalibrationViewModel">
|
||||
|
||||
<UserControl.Resources>
|
||||
<converters:NotEqualsConverter x:Key="NotEqualsConverter" />
|
||||
<converters:EqualsConverter x:Key="EqualsConverter" />
|
||||
<converters:DateTimeConverter x:Key="DateTimeConverter" />
|
||||
|
||||
<SolidColorBrush x:Key="MenuBackground" Color="#00357a" />
|
||||
<SolidColorBrush x:Key="MenuBorder" Color="#0865b2" />
|
||||
@@ -53,6 +53,8 @@
|
||||
|
||||
<Style Selector="TextBox.multiline">
|
||||
<Setter Property="VerticalContentAlignment" Value="Top" />
|
||||
<Setter Property="AcceptsReturn" Value="True" />
|
||||
<Setter Property="TextWrapping" Value="Wrap" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="TextBlock">
|
||||
@@ -80,7 +82,7 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Удалить -->
|
||||
<ColumnDefinition Width="*" /> <!-- Сохранить -->
|
||||
<ColumnDefinition Width="*" /> <!-- К информации/К изображениям -->
|
||||
<ColumnDefinition Width="*" /> <!-- К информации/К изображению -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Главная панель -->
|
||||
@@ -124,186 +126,60 @@
|
||||
<!-- Тип (подпись) -->
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Classes="mini" Text="Тип:" />
|
||||
<!-- Тип (поле) -->
|
||||
<local:TouchTextBox Grid.Row="3" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.Type}" PlaceholderText="Тип" />
|
||||
<controls:TouchTextBox Grid.Row="3" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.Type}" PlaceholderText="Тип" />
|
||||
<!-- Партия (подпись) -->
|
||||
<TextBlock Grid.Row="4" Grid.Column="1" Classes="mini" Text="Партия:" />
|
||||
<!-- Партия (поле) -->
|
||||
<local:TouchTextBox Grid.Row="5" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.Batch}" PlaceholderText="Партия" />
|
||||
<controls:TouchTextBox Grid.Row="5" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.Batch}" PlaceholderText="Партия" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Изображения -->
|
||||
<!-- Изображение -->
|
||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" /> <!-- Изображения -->
|
||||
<RowDefinition Height="Auto" /> <!-- Кнопка "получить изображения" -->
|
||||
<RowDefinition Height="*" /> <!-- Изображение -->
|
||||
<RowDefinition Height="Auto" /> <!-- Кнопка "Получить изображения" / "Отменить съёмку" -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Изображения -->
|
||||
<Grid Grid.Row="0">
|
||||
<!-- Изображение -->
|
||||
<Grid>
|
||||
|
||||
<Grid ColumnSpacing="5">
|
||||
<!-- Изображение -->
|
||||
<Grid>
|
||||
|
||||
<Grid.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
|
||||
<Binding
|
||||
Converter="{StaticResource NotEqualsConverter}"
|
||||
ConverterParameter="0"
|
||||
Path="Images.Count" />
|
||||
|
||||
<Binding Converter="{x:Static ObjectConverters.IsNotNull}" Path="Image" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
|
||||
</MultiBinding>
|
||||
</Grid.IsVisible>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" /> <!-- Кнопка влево -->
|
||||
<ColumnDefinition Width="*" /> <!-- Изображения -->
|
||||
<ColumnDefinition Width="Auto" /> <!-- Кнопка вправо -->
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Изображение -->
|
||||
<core:ZoomPanImage HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
||||
ImageSource="{Binding Image.Image}"
|
||||
Background="Black"
|
||||
IsVisible="{Binding Image.IsLoading, Converter={x:Static BoolConverters.Not}}" />
|
||||
|
||||
<!-- Кнопка влево -->
|
||||
<Button
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Classes="vertical"
|
||||
Command="{Binding ImagesSectionPreviousCommand}">
|
||||
|
||||
<TextBlock Text="◀"/>
|
||||
|
||||
<Button.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="ImagesSectionCanScrollBackward" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesSectionIsScrolling" />
|
||||
</MultiBinding>
|
||||
</Button.IsEnabled>
|
||||
|
||||
</Button>
|
||||
|
||||
<!-- Изображения -->
|
||||
<core:SectionPanel
|
||||
Grid.Column="1"
|
||||
CanScrollBackward="{Binding ImagesSectionCanScrollBackward}"
|
||||
CanScrollForward="{Binding ImagesSectionCanScrollForward}"
|
||||
ChildrenSource="{Binding Images}"
|
||||
ClipToBounds="True"
|
||||
CurrentIndex="{Binding ImagesSectionCurrentIndex}"
|
||||
Cyclic="True"
|
||||
IsScrolling="{Binding ImagesSectionIsScrolling}"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<core:SectionPanel.ChildrenTemplate>
|
||||
<DataTemplate>
|
||||
|
||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Изображения -->
|
||||
<ColumnDefinition Width="Auto" /> <!-- Информация -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" /> <!-- Изображения -->
|
||||
<RowDefinition Height="Auto" /> <!-- ИД (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- ИД (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность видимого (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность видимого (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность УФ 365 нм (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность УФ 365 нм (поле) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность УФ 254 нм (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Интенсивность УФ 254 нм (поле) -->
|
||||
<RowDefinition Height="*" /> <!-- Пустое пространство -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Изображения -->
|
||||
<Grid Grid.Row="0" Grid.RowSpan="12" Grid.Column="0">
|
||||
|
||||
<core:ZoomPanImage
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Black"
|
||||
x:DataType="core_vm:AsyncImageRecordViewModel"
|
||||
ImageSource="{Binding Image}"
|
||||
IsVisible="{Binding IsLoading, Converter={x:Static BoolConverters.Not}}" />
|
||||
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" x:DataType="core_vm:AsyncImageRecordViewModel" IsVisible="{Binding IsLoading}">
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Информация -->
|
||||
<!-- ИД (подпись) -->
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Classes="mini" Text="ИД: " />
|
||||
<!-- ИД (поле) -->
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Classes="singleline" IsReadOnly="True" x:DataType="core_vm:AsyncImageRecordViewModel" Text="{Binding ImageRecord.Id}" />
|
||||
<!-- Интенсивность видимого (подпись) -->
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Classes="mini" Text="Интенсивность видимого: " />
|
||||
<!-- Интенсивность видимого (поле) -->
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Classes="singleline" IsReadOnly="True" x:DataType="core_vm:AsyncImageRecordViewModel" Text="{Binding ImageRecord.VisibleIntensity}" />
|
||||
<!-- Интенсивность УФ 365 нм (подпись) -->
|
||||
<TextBlock Grid.Row="5" Grid.Column="1" Classes="mini" Text="Интенсивность УФ 365 нм: " />
|
||||
<!-- Интенсивность УФ 365 нм (поле) -->
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Classes="singleline" IsReadOnly="True" x:DataType="core_vm:AsyncImageRecordViewModel" Text="{Binding ImageRecord.Uv365Intensity}" />
|
||||
<!-- Интенсивность УФ 254 нм (подпись) -->
|
||||
<TextBlock Grid.Row="7" Grid.Column="1" Classes="mini" Text="Интенсивность УФ 254 нм: " />
|
||||
<!-- Интенсивность УФ 254 нм (поле) -->
|
||||
<TextBox Grid.Row="8" Grid.Column="1" Classes="singleline" IsReadOnly="True" x:DataType="core_vm:AsyncImageRecordViewModel" Text="{Binding ImageRecord.Uv254Intensity}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</DataTemplate>
|
||||
</core:SectionPanel.ChildrenTemplate>
|
||||
|
||||
</core:SectionPanel>
|
||||
|
||||
<!-- Кнопка вправо -->
|
||||
<Button
|
||||
Grid.Column="2"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Classes="vertical"
|
||||
Command="{Binding ImagesSectionNextCommand}">
|
||||
|
||||
<TextBlock Text="▶"/>
|
||||
|
||||
<Button.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="ImagesSectionCanScrollForward" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesSectionIsScrolling" />
|
||||
</MultiBinding>
|
||||
</Button.IsEnabled>
|
||||
|
||||
</Button>
|
||||
<!-- Оверлей загрузки -->
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" IsVisible="{Binding Image.IsLoading}">
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="Изображения сепаратора отсутствуют">
|
||||
|
||||
<!-- Оверлей "Изображения отсутствуют" -->
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Изображения отсутствуют">
|
||||
<TextBlock.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
|
||||
<Binding
|
||||
Converter="{StaticResource EqualsConverter}"
|
||||
ConverterParameter="0"
|
||||
Path="Images.Count" />
|
||||
|
||||
<Binding Converter="{x:Static ObjectConverters.IsNull}" Path="Image" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
|
||||
</MultiBinding>
|
||||
</TextBlock.IsVisible>
|
||||
|
||||
</TextBlock>
|
||||
|
||||
<!-- Оверлей прогресс -->
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" IsVisible="{Binding ImagesIsCapturing}">
|
||||
<ProgressBar IsIndeterminate="True" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
|
||||
@@ -311,20 +187,18 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Кнопка "получить изображения" -->
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
<!-- Кнопка "Получить изображения" -->
|
||||
<Button Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CaptureImageCommand}"
|
||||
IsVisible="{Binding CaptureImagesTask, Converter={x:Static ObjectConverters.IsNull}}">
|
||||
<TextBlock Text="Получить изображения"/>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
<!-- Кнопка "Отменить съёмку" -->
|
||||
<Button Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CancelImageCapturingCommand}"
|
||||
Content="Отменить съёмку"
|
||||
IsVisible="{Binding CaptureImagesTask, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<TextBlock Text="Отменить съёмку"/>
|
||||
</Button>
|
||||
@@ -345,9 +219,7 @@
|
||||
</Button>
|
||||
|
||||
<!-- К информации -->
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
<Button Grid.Row="1" Grid.Column="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding SwitchMainSectionCommand}"
|
||||
Content="К информации"
|
||||
@@ -364,16 +236,14 @@
|
||||
|
||||
</Button>
|
||||
|
||||
<!-- К изображениям -->
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
<!-- К изображению -->
|
||||
<Button Grid.Row="1" Grid.Column="2"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding SwitchMainSectionCommand}"
|
||||
Content="К изображениям"
|
||||
Content="К изображению"
|
||||
IsVisible="{Binding MainSectionCurrentIndex, Converter={StaticResource EqualsConverter}, ConverterParameter=0}">
|
||||
|
||||
<TextBlock Text="К изображениям"/>
|
||||
<TextBlock Text="К изображению"/>
|
||||
|
||||
<Button.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
@@ -396,13 +266,9 @@
|
||||
</Border>
|
||||
|
||||
<!-- Выезжающая боковая панель -->
|
||||
<Border
|
||||
HorizontalAlignment="Left"
|
||||
Background="{StaticResource MenuBackground}"
|
||||
BorderBrush="{StaticResource MenuBorder}"
|
||||
BorderThickness="0,0,1,0"
|
||||
IsEnabled="{Binding MenuOpened}"
|
||||
IsVisible="{Binding MenuOpened}">
|
||||
<Border HorizontalAlignment="Left"
|
||||
Background="{StaticResource MenuBackground}" BorderBrush="{StaticResource MenuBorder}" BorderThickness="0,0,1,0"
|
||||
IsEnabled="{Binding MenuOpened}" IsVisible="{Binding MenuOpened}">
|
||||
|
||||
<Border.Transitions>
|
||||
<Transitions>
|
||||
@@ -412,22 +278,12 @@
|
||||
|
||||
<Interaction.Behaviors>
|
||||
|
||||
<DataTriggerBehavior
|
||||
Binding="{Binding MenuOpened}"
|
||||
ComparisonCondition="Equal"
|
||||
Value="True">
|
||||
|
||||
<DataTriggerBehavior Binding="{Binding MenuOpened}" ComparisonCondition="Equal" Value="True">
|
||||
<ChangePropertyAction PropertyName="RenderTransform" Value="translateX(0px)" />
|
||||
|
||||
</DataTriggerBehavior>
|
||||
|
||||
<DataTriggerBehavior
|
||||
Binding="{Binding MenuOpened}"
|
||||
ComparisonCondition="Equal"
|
||||
Value="False">
|
||||
|
||||
<DataTriggerBehavior Binding="{Binding MenuOpened}" ComparisonCondition="Equal" Value="False">
|
||||
<ChangePropertyAction PropertyName="RenderTransform" Value="translateX(-320px)" />
|
||||
|
||||
</DataTriggerBehavior>
|
||||
|
||||
</Interaction.Behaviors>
|
||||
@@ -440,14 +296,11 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Grid.Row="0"
|
||||
MinWidth="200"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CreateRecordCommand}">
|
||||
<Button Grid.Row="0" MinWidth="200" HorizontalAlignment="Stretch" Command="{Binding CreateRecordCommand}">
|
||||
<TextBlock Text="Новая запись"/>
|
||||
</Button>
|
||||
|
||||
<ListBox Grid.Row="1" ItemsSource="{Binding Records}" SelectedItem="{Binding SelectedRecord}">
|
||||
<ListBox Grid.Row="1" Background="{StaticResource MenuBackground}" ItemsSource="{Binding Records}" SelectedItem="{Binding SelectedRecord}">
|
||||
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
|
||||
Reference in New Issue
Block a user