forked from amkovkov/GranuSightSoftware2
feat: fix sample calibration after database reforge
+ add comments + refactoring
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,107 +1,53 @@
|
|||||||
<UserControl
|
<UserControl
|
||||||
x:Class="GSS2.Views.AmineContent.SampleCalibrationView"
|
x:Class="GSS2.Views.AmineContent.SampleCalibrationView"
|
||||||
xmlns="https://github.com/avaloniaui"
|
x:DataType="vm:SampleCalibrationViewModel"
|
||||||
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:controls="using:GSS2.Controls"
|
||||||
xmlns:core="using:GSS2.UI.Core"
|
xmlns:core="using:GSS2.UI.Core"
|
||||||
|
xmlns:i="using:Avalonia.Xaml.Interactivity"
|
||||||
|
xmlns:ia="using:Avalonia.Xaml.Interactions.Custom"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
x:DataType="vm:SampleCalibrationViewModel">
|
xmlns:vm="using:GSS2.ViewModels.AmineContent"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
<UserControl.Resources>
|
xmlns="https://github.com/avaloniaui"
|
||||||
<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 Background="{StaticResource MainBackground}">
|
||||||
|
|
||||||
<!-- Основная форма -->
|
<!-- Основная форма -->
|
||||||
<Grid IsEnabled="{Binding !MenuOpened}" ColumnSpacing="5" RowSpacing="5">
|
<Grid IsEnabled="{Binding !MenuOpened}">
|
||||||
|
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" /> <!-- Кнопка "Удалить" -->
|
||||||
|
<ColumnDefinition Width="*" /> <!-- Кнопка "Сохранить" -->
|
||||||
|
<ColumnDefinition Width="*" /> <!-- Кнопки "К информации"/"К изображению" -->
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Grid.ColumnSpacing>5</Grid.ColumnSpacing>
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" /> <!-- Главная панель -->
|
<RowDefinition Height="*" /> <!-- Главная панель -->
|
||||||
<RowDefinition Height="Auto" /> <!-- Кнопки главной панели -->
|
<RowDefinition Height="Auto" /> <!-- Кнопки главной панели -->
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.RowSpacing>5</Grid.RowSpacing>
|
||||||
<ColumnDefinition Width="*" /> <!-- Удалить -->
|
|
||||||
<ColumnDefinition Width="*" /> <!-- Сохранить -->
|
|
||||||
<ColumnDefinition Width="*" /> <!-- К информации/К изображению -->
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<!-- Главная панель -->
|
<!-- Главная панель -->
|
||||||
<core:SectionPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3"
|
<core:SectionPanel
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
|
||||||
CanScrollBackward="{Binding MainSectionCanScrollBackward}"
|
CanScrollBackward="{Binding MainSectionCanScrollBackward}"
|
||||||
CanScrollForward="{Binding MainSectionCanScrollForward}"
|
CanScrollForward="{Binding MainSectionCanScrollForward}"
|
||||||
ClipToBounds="True"
|
ClipToBounds="True"
|
||||||
CurrentIndex="{Binding MainSectionCurrentIndex}"
|
CurrentIndex="{Binding MainSectionCurrentIndex}"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.ColumnSpan="3"
|
||||||
|
Grid.Row="0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
IsScrolling="{Binding MainSectionIsScrolling}"
|
IsScrolling="{Binding MainSectionIsScrolling}"
|
||||||
Orientation="Vertical">
|
Orientation="Vertical"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
>
|
||||||
|
|
||||||
<!-- Информация -->
|
<!-- Информация -->
|
||||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
<Grid>
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="*" /> <!-- Информация -->
|
|
||||||
<RowDefinition Height="Auto" /> <!-- Кнопки -->
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" /> <!-- Кнопка меню -->
|
<ColumnDefinition Width="Auto" /> <!-- Кнопка меню -->
|
||||||
@@ -109,135 +55,257 @@
|
|||||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
<ColumnDefinition Width="*" /> <!-- Информация -->
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Grid.ColumnSpacing>5</Grid.ColumnSpacing>
|
||||||
|
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" /> <!-- Информация -->
|
||||||
|
<RowDefinition Height="Auto" /> <!-- Кнопки -->
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Grid.RowSpacing>5</Grid.RowSpacing>
|
||||||
|
|
||||||
<!-- Кнопка меню -->
|
<!-- Кнопка меню -->
|
||||||
<Button Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" Classes="vertical" VerticalAlignment="Stretch" Command="{Binding ToggleMenuCommand}">
|
<Button
|
||||||
|
Classes="vertical"
|
||||||
|
Command="{Binding ToggleMenuCommand}"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.Row="0"
|
||||||
|
Grid.RowSpan="3"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
>
|
||||||
<TextBlock Text="☰"/>
|
<TextBlock Text="☰"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!-- Информация -->
|
<!-- Информация -->
|
||||||
<core:SectionPanel Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2"
|
<core:SectionPanel
|
||||||
CanScrollBackward="{Binding InfoSectionCanScrollBackward}"
|
CanScrollBackward="{Binding InfoSectionCanScrollBackward}"
|
||||||
CanScrollForward="{Binding InfoSectionCanScrollForward}"
|
CanScrollForward="{Binding InfoSectionCanScrollForward}"
|
||||||
ClipToBounds="True"
|
ClipToBounds="True"
|
||||||
CurrentIndex="{Binding InfoSectionCurrentIndex}"
|
CurrentIndex="{Binding InfoSectionCurrentIndex}"
|
||||||
Cyclic="True"
|
Cyclic="True"
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Grid.Row="0"
|
||||||
IsScrolling="{Binding InfoSectionIsScrolling}"
|
IsScrolling="{Binding InfoSectionIsScrolling}"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal"
|
||||||
|
>
|
||||||
|
|
||||||
<!-- ИД / Название пробы / Марка пробы / Дата и время отбора пробы / Место отбора пробы / Масса пробы (кг) -->
|
<!-- Id / Uuid / SampleName / BrandComboBox / SamplingDateTime / SamplingPlace -->
|
||||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
<Grid>
|
||||||
|
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Grid.ColumnSpacing>5</Grid.ColumnSpacing>
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" /> <!-- ИД (подпись) -->
|
<RowDefinition Height="Auto" /> <!-- Id (подпись) | Uuid (подпись) -->
|
||||||
<RowDefinition Height="Auto" /> <!-- ИД (поле) -->
|
<RowDefinition Height="Auto" /> <!-- Id (поле ) | Uuid (поле ) -->
|
||||||
<RowDefinition Height="Auto" /> <!-- Название пробы (подпись) / Марка пробы (подпись) -->
|
<RowDefinition Height="Auto" /> <!-- SampleName (подпись) | BrandComboBox (подпись) -->
|
||||||
<RowDefinition Height="Auto" /> <!-- Название пробы (поле) / Марка пробы (поле) -->
|
<RowDefinition Height="Auto" /> <!-- SampleName (поле ) | BrandComboBox (поле ) -->
|
||||||
<RowDefinition Height="Auto" /> <!-- Дата и время отбора пробы (подпись) / Место отбора пробы (подпись) -->
|
<RowDefinition Height="Auto" /> <!-- SamplingDateTime (подпись) | SamplingPlace (подпись) -->
|
||||||
<RowDefinition Height="Auto" /> <!-- Дата и время отбора пробы (поле) / Место отбора пробы (поле) -->
|
<RowDefinition Height="Auto" /> <!-- SamplingDateTime (поле ) | SamplingPlace (поле ) -->
|
||||||
<RowDefinition Height="Auto" /> <!-- Масса пробы (кг) (подпись) -->
|
|
||||||
<RowDefinition Height="Auto" /> <!-- Масса пробы (кг) (поле) -->
|
|
||||||
<RowDefinition Height="*" /> <!-- Пустое пространство -->
|
<RowDefinition Height="*" /> <!-- Пустое пространство -->
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.RowSpacing>5</Grid.RowSpacing>
|
||||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
|
||||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<!-- Информация -->
|
<!-- Id (подпись) -->
|
||||||
<!-- ИД (подпись) -->
|
<TextBlock
|
||||||
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" Grid.Column="0" Classes="mini" Text="ИД:" />
|
Classes="mini"
|
||||||
<!-- ИД (поле) -->
|
Grid.Column="0"
|
||||||
<TextBox Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.Id}" PlaceholderText="ИД" IsReadOnly="True" />
|
Grid.Row="0"
|
||||||
<!-- Название пробы (подпись) -->
|
Text="ИД:"
|
||||||
<TextBlock Grid.Row="2" Grid.Column="0" Classes="mini" Text="Название пробы:" />
|
/>
|
||||||
<!-- Название пробы (поле) -->
|
<!-- Id (поле) -->
|
||||||
<controls:TouchTextBox Grid.Row="3" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.SampleName}" PlaceholderText="Название пробы" />
|
<TextBox
|
||||||
<!-- Марка пробы (подпись) -->
|
Classes="singleline"
|
||||||
<TextBlock Grid.Row="2" Grid.Column="1" Classes="mini" Text="Марка пробы:" />
|
Grid.Column="0"
|
||||||
<!-- Марка пробы (поле) -->
|
Grid.Row="1"
|
||||||
<controls:TouchTextBox Grid.Row="3" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.SampleBrand}" PlaceholderText="Марка пробы" />
|
IsReadOnly="True"
|
||||||
<!-- Дата и время отбора пробы (подпись) -->
|
PlaceholderText="ИД"
|
||||||
<TextBlock Grid.Row="4" Grid.Column="0" Classes="mini" Text="Дата и время отбора пробы:" />
|
Text="{Binding SelectedId}"
|
||||||
<!-- Дата и время отбора пробы (поле) -->
|
/>
|
||||||
<controls:TouchTextBox Grid.Row="5" Grid.Column="0" Classes="singleline" Text="{Binding EditingRecord.SamplingDateTime, Converter={StaticResource DateTimeConverter}}" PlaceholderText="Дата и время отбора пробы" />
|
<!-- Uuid (подпись) -->
|
||||||
<!-- Место отбора пробы (подпись) -->
|
<TextBlock
|
||||||
<TextBlock Grid.Row="4" Grid.Column="1" Classes="mini" Text="Место отбора пробы:" />
|
Classes="mini"
|
||||||
<!-- Место отбора пробы (поле) -->
|
Grid.Column="1"
|
||||||
<controls:TouchTextBox Grid.Row="5" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.SamplingPlace}" PlaceholderText="Место отбора пробы" />
|
Grid.Row="0"
|
||||||
<!-- Масса пробы (кг) (подпись) -->
|
Text="Уникальный ИД:"
|
||||||
<TextBlock Grid.Row="6" Grid.ColumnSpan="2" Grid.Column="0" Classes="mini" Text="Масса пробы (кг):" />
|
/>
|
||||||
<!-- Масса пробы (кг) (поле) -->
|
<!-- Uuid (поле) -->
|
||||||
<controls:TouchNumericUpDown Grid.Row="7" Grid.ColumnSpan="2" Grid.Column="0" Classes="singleline" FormatString="0.0000" Increment="0.0001" Value="{Binding EditingRecord.SampleMass}" PlaceholderText="Масса пробы (кг)" />
|
<TextBox
|
||||||
|
Classes="singleline"
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
IsReadOnly="True"
|
||||||
|
PlaceholderText="Уникальный ИД"
|
||||||
|
Text="{Binding SelectedUuid}"
|
||||||
|
/>
|
||||||
|
<!-- SampleName (подпись) -->
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="0"
|
||||||
|
Classes="mini"
|
||||||
|
Text="Название пробы:"
|
||||||
|
/>
|
||||||
|
<!-- SampleName (поле) -->
|
||||||
|
<controls:TouchTextBox
|
||||||
|
Grid.Row="3"
|
||||||
|
Grid.Column="0"
|
||||||
|
Classes="singleline"
|
||||||
|
Text="{Binding SelectedSampleName}"
|
||||||
|
PlaceholderText="Название пробы"
|
||||||
|
/>
|
||||||
|
<!-- BrandComboBox (подпись) -->
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="1"
|
||||||
|
Classes="mini"
|
||||||
|
Text="Марка пробы:"
|
||||||
|
/>
|
||||||
|
<!-- BrandComboBox (поле) -->
|
||||||
|
<ComboBox
|
||||||
|
Classes="singleline"
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.Row="3"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
IsEditable="False"
|
||||||
|
ItemsSource="{Binding BrandComboBoxItems}"
|
||||||
|
PlaceholderText="Марка пробы"
|
||||||
|
SelectedIndex="{Binding BrandComboBoxSelectedIndex}"
|
||||||
|
>
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate x:DataType="vm:SampleCalibrationViewModel+BrandComboBoxItemViewModel">
|
||||||
|
<TextBlock
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
>
|
||||||
|
<Run Text="{Binding Id, StringFormat='[{0}] '}" />
|
||||||
|
<Run Text="{Binding BrandName}" />
|
||||||
|
<Run Text=" - " />
|
||||||
|
<Run Text="{Binding MixtureName}" />
|
||||||
|
</TextBlock>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
<!-- SamplingDateTime (подпись) -->
|
||||||
|
<TextBlock
|
||||||
|
Classes="mini"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.Row="4"
|
||||||
|
Text="Дата и время отбора пробы:"
|
||||||
|
/>
|
||||||
|
<!-- SamplingDateTime (поле) -->
|
||||||
|
<controls:TouchTextBox
|
||||||
|
Classes="singleline"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.Row="5"
|
||||||
|
PlaceholderText="Дата и время отбора пробы"
|
||||||
|
Text="{Binding SelectedSamplingDateTime, Converter={StaticResource DateTimeConverter}}"
|
||||||
|
/>
|
||||||
|
<!-- SamplingPlace (подпись) -->
|
||||||
|
<TextBlock
|
||||||
|
Classes="mini"
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.Row="4"
|
||||||
|
Text="Место отбора пробы:"
|
||||||
|
/>
|
||||||
|
<!-- SamplingPlace (поле) -->
|
||||||
|
<controls:TouchTextBox
|
||||||
|
Classes="singleline"
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.Row="5"
|
||||||
|
PlaceholderText="Место отбора пробы"
|
||||||
|
Text="{Binding SelectedSamplingPlace}"
|
||||||
|
/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Название используемой кондиционирующей смеси / Содержание аминов в кондиционирующей смеси (%) / Норма расхода кондиционирующей смеси (кг/т | гр/кг) / Фактический расход кондиционирующей смеси (кг/т | гр/кг) -->
|
<!-- MixtureActualRate / MeasuredContent / SampleComment -->
|
||||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
<Grid>
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.ColumnSpacing>5</Grid.ColumnSpacing>
|
||||||
<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>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!-- Информация -->
|
<Grid.RowSpacing>5</Grid.RowSpacing>
|
||||||
<!-- Название используемой кондиционирующей смеси (подпись) -->
|
|
||||||
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" Grid.Column="0" Classes="mini" Text="Название используемой кондиционирующей смеси:" />
|
|
||||||
<!-- Название используемой кондиционирующей смеси (поле) -->
|
|
||||||
<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="Содержание люминофоров в кондиционирующей смеси (%):" />
|
|
||||||
<!-- Содержание люминофоров в кондиционирующей смеси (%) (поле) -->
|
|
||||||
<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="Норма расхода (кг/т | гр/кг):" />
|
|
||||||
<!-- Норма расхода кондиционирующей смеси (кг/т | гр/кг) (поле) -->
|
|
||||||
<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="Фактический расход (кг/т | гр/кг):" />
|
|
||||||
<!-- Фактический расход кондиционирующей смеси (кг/т | гр/кг) (поле) -->
|
|
||||||
<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="Измеренное количество кондиционирующей смеси (кг/т | гр/кг):" />
|
|
||||||
<!-- Измеренное количество кондиционирующей смеси (кг/т | гр/кг) (поле) -->
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<!-- Дополнительная информация о пробе -->
|
|
||||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" /> <!-- Дополнительная информация о пробе (подпись) -->
|
<RowDefinition Height="Auto" /> <!-- MixtureActualRate (подпись) | MeasuredContent (подпись) -->
|
||||||
<RowDefinition Height="*" /> <!-- Дополнительная информация о пробе (поле) -->
|
<RowDefinition Height="Auto" /> <!-- MixtureActualRate (поле ) | MeasuredContent (поле ) -->
|
||||||
|
<RowDefinition Height="Auto" /> <!-- SampleComment (подпись) -->
|
||||||
|
<RowDefinition Height="*" /> <!-- SampleComment (поле ) -->
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Информация -->
|
<!-- MixtureActualRate (подпись) -->
|
||||||
<!-- Дополнительная информация о пробе (подпись) -->
|
<TextBlock
|
||||||
<TextBlock Grid.Row="0" Classes="mini" Text="Дополнительная информация о пробе:" />
|
Classes="mini" Text="Фактический расход смеси (кг/т | гр/кг):"
|
||||||
<!-- Дополнительная информация о пробе (поле) -->
|
Grid.Column="0"
|
||||||
<controls:TouchTextBox Grid.Row="1" Classes="multiline" Text="{Binding EditingRecord.SampleComment}" PlaceholderText="Дополнительная информация о пробе" />
|
Grid.ColumnSpan="2"
|
||||||
|
Grid.Row="0"
|
||||||
|
/>
|
||||||
|
<!-- MixtureActualRate (поле) -->
|
||||||
|
<controls:TouchNumericUpDown
|
||||||
|
Classes="singleline"
|
||||||
|
FormatString="0.0000"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
Increment="0.0001"
|
||||||
|
PlaceholderText="Фактический расход смеси (кг/т | гр/кг)"
|
||||||
|
Value="{Binding SelectedMixtureActualRate}"
|
||||||
|
/>
|
||||||
|
<!-- MeasuredContent (подпись) -->
|
||||||
|
<TextBlock
|
||||||
|
Classes="mini" Text="Измеренное содержание смеси (кг/т | гр/кг):"
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.Row="0"
|
||||||
|
/>
|
||||||
|
<!-- MeasuredContent (поле) -->
|
||||||
|
<controls:TouchNumericUpDown
|
||||||
|
Classes="singleline"
|
||||||
|
FormatString="0.0000"
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
Increment="0.0001"
|
||||||
|
PlaceholderText="Измеренное содержание смеси (кг/т | гр/кг)"
|
||||||
|
Value="{Binding SelectedMeasuredContent}"
|
||||||
|
/>
|
||||||
|
<!-- SampleComment (подпись) -->
|
||||||
|
<TextBlock
|
||||||
|
Classes="mini"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.Row="2"
|
||||||
|
Text="Дополнительная информация о пробе:"
|
||||||
|
/>
|
||||||
|
<!-- SampleComment (поле) -->
|
||||||
|
<controls:TouchTextBox
|
||||||
|
Classes="multiline"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Grid.Row="3"
|
||||||
|
PlaceholderText="Дополнительная информация о пробе"
|
||||||
|
Text="{Binding SelectedSampleComment}"
|
||||||
|
/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</core:SectionPanel>
|
</core:SectionPanel>
|
||||||
|
|
||||||
<!-- Кнопка влево -->
|
<!-- Кнопка влево -->
|
||||||
<Button Grid.Column="1" Grid.Row="1"
|
<Button
|
||||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
|
Command="{Binding InfoSectionPreviousCommand}"
|
||||||
Command="{Binding InfoSectionPreviousCommand}">
|
Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
>
|
||||||
|
|
||||||
<Button.IsEnabled>
|
<Button.IsEnabled>
|
||||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
@@ -251,9 +319,14 @@
|
|||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!-- Кнопка вправо -->
|
<!-- Кнопка вправо -->
|
||||||
<Button Grid.Column="2" Grid.Row="1"
|
<Button
|
||||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
|
Command="{Binding InfoSectionNextCommand}"
|
||||||
Command="{Binding InfoSectionNextCommand}">
|
Grid.Column="2"
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
HorizontalContentAlignment="Center"
|
||||||
|
VerticalContentAlignment="Center"
|
||||||
|
>
|
||||||
|
|
||||||
<Button.IsEnabled>
|
<Button.IsEnabled>
|
||||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
@@ -269,71 +342,110 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Изображение -->
|
<!-- Изображение -->
|
||||||
<Grid ColumnSpacing="5" RowSpacing="5">
|
<Grid>
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" /> <!-- Изображение -->
|
<RowDefinition Height="*" /> <!-- Изображение -->
|
||||||
<RowDefinition Height="Auto" /> <!-- Кнопка "Получить изображения" / "Отменить съёмку" -->
|
<RowDefinition Height="Auto" /> <!-- Кнопка "Получить изображения" / "Отменить съёмку" -->
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Grid.RowSpacing>5</Grid.RowSpacing>
|
||||||
|
|
||||||
<!-- Изображение -->
|
<!-- Изображение -->
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|
||||||
<!-- Изображение -->
|
<!-- Изображение -->
|
||||||
<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>
|
</Grid>
|
||||||
|
|
||||||
<!-- Оверлей "Изображения отсутствуют" -->
|
<!-- Изображение -->
|
||||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Изображения отсутствуют">
|
<core:ZoomPanImage
|
||||||
|
Background="Black"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
ImageSource="{Binding SelectedImage.Image}"
|
||||||
|
IsVisible="{Binding SelectedImage.IsLoading, Converter={x:Static BoolConverters.Not}}"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
>
|
||||||
|
|
||||||
|
<core:ZoomPanImage.IsVisible>
|
||||||
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
|
<Binding Converter="{x:Static ObjectConverters.IsNotNull}" Path="SelectedImage.Data" />
|
||||||
|
<Binding Converter="{x:Static BoolConverters.Not}" Path="SelectedImage.IsLoading" />
|
||||||
|
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||||
|
</MultiBinding>
|
||||||
|
</core:ZoomPanImage.IsVisible>
|
||||||
|
|
||||||
|
</core:ZoomPanImage>
|
||||||
|
|
||||||
|
<!-- Оверлей "Изображение загружается" -->
|
||||||
|
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" >
|
||||||
|
|
||||||
|
<StackPanel.IsVisible>
|
||||||
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
|
<Binding Path="SelectedImage.IsLoading" />
|
||||||
|
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||||
|
</MultiBinding>
|
||||||
|
</StackPanel.IsVisible>
|
||||||
|
|
||||||
|
<ProgressBar IsIndeterminate="True" />
|
||||||
|
|
||||||
|
<TextBlock HorizontalAlignment="Center" Text="Изображение загружается" />
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Оверлей "Изображение отсутствует" -->
|
||||||
|
<TextBlock
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Text="Изображение отсутствует"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
>
|
||||||
<TextBlock.IsVisible>
|
<TextBlock.IsVisible>
|
||||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
<Binding Converter="{x:Static ObjectConverters.IsNull}" Path="Image" />
|
<Binding Converter="{x:Static ObjectConverters.IsNull}" Path="SelectedImage.Data" />
|
||||||
|
<Binding Converter="{x:Static BoolConverters.Not}" Path="SelectedImage.IsLoading" />
|
||||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</TextBlock.IsVisible>
|
</TextBlock.IsVisible>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
|
|
||||||
<!-- Оверлей прогресс -->
|
<!-- Оверлей прогресс -->
|
||||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" IsVisible="{Binding ImagesIsCapturing}">
|
<StackPanel
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
>
|
||||||
|
|
||||||
|
<StackPanel.IsVisible>
|
||||||
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
|
<Binding Converter="{x:Static ObjectConverters.IsNull}" Path="SelectedImage.Data" />
|
||||||
|
<Binding Converter="{x:Static BoolConverters.Not}" Path="SelectedImage.IsLoading" />
|
||||||
|
<Binding Path="ImagesIsCapturing" />
|
||||||
|
</MultiBinding>
|
||||||
|
</StackPanel.IsVisible>
|
||||||
|
|
||||||
<ProgressBar IsIndeterminate="True" />
|
<ProgressBar IsIndeterminate="True" />
|
||||||
|
|
||||||
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
|
<TextBlock HorizontalAlignment="Center" Text="{Binding ImagesCapturingProgress}" />
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Кнопка "Получить изображения" -->
|
<!-- Кнопка "Получить изображения" -->
|
||||||
<Button Grid.Row="1"
|
<Button
|
||||||
|
Grid.Row="1"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
Command="{Binding CaptureImageCommand}"
|
Command="{Binding CaptureImageCommand}"
|
||||||
IsVisible="{Binding CaptureImagesTask, Converter={x:Static ObjectConverters.IsNull}}">
|
>
|
||||||
<TextBlock Text="Получить изображения"/>
|
<TextBlock Text="Получить изображения"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!-- Кнопка "Отменить съёмку" -->
|
<!-- Кнопка "Отменить съёмку" -->
|
||||||
<Button Grid.Row="1"
|
<Button
|
||||||
|
Grid.Row="1"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
Command="{Binding CancelImageCapturingCommand}"
|
Command="{Binding CancelImageCapturingCommand}"
|
||||||
IsVisible="{Binding CaptureImagesTask, Converter={x:Static ObjectConverters.IsNotNull}}">
|
>
|
||||||
<TextBlock Text="Отменить съёмку"/>
|
<TextBlock Text="Отменить съёмку"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -342,22 +454,37 @@
|
|||||||
</core:SectionPanel>
|
</core:SectionPanel>
|
||||||
|
|
||||||
<!-- Кнопки главной панели -->
|
<!-- Кнопки главной панели -->
|
||||||
<!-- Удалить -->
|
<!-- Кнопка "Удалить" -->
|
||||||
<Button Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" Classes="danger" Command="{Binding DeleteRecordCommand}">
|
<Button
|
||||||
|
Classes="danger"
|
||||||
|
Command="{Binding DeleteRecordCommand}"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
>
|
||||||
<TextBlock Text="Удалить"/>
|
<TextBlock Text="Удалить"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!-- Сохранить -->
|
<!-- Кнопка "Сохранить" -->
|
||||||
<Button Grid.Row="1" Grid.Column="1" HorizontalAlignment="Stretch" Command="{Binding SaveRecordCommand}" Content="Сохранить">
|
<Button
|
||||||
|
Command="{Binding SaveRecordCommand}"
|
||||||
|
Content="Сохранить"
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
>
|
||||||
<TextBlock Text="Сохранить"/>
|
<TextBlock Text="Сохранить"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!-- К информации -->
|
<!-- Кнопка "К информации" -->
|
||||||
<Button Grid.Row="1" Grid.Column="2"
|
<Button
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
Command="{Binding SwitchMainSectionCommand}"
|
Command="{Binding SwitchMainSectionCommand}"
|
||||||
Content="К информации"
|
Content="К информации"
|
||||||
IsVisible="{Binding MainSectionCurrentIndex, Converter={StaticResource EqualsConverter}, ConverterParameter=1}">
|
Grid.Column="2"
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
IsVisible="{Binding MainSectionCurrentIndex, Converter={StaticResource EqualsConverter}, ConverterParameter=1}"
|
||||||
|
>
|
||||||
|
|
||||||
<TextBlock Text="К информации"/>
|
<TextBlock Text="К информации"/>
|
||||||
|
|
||||||
@@ -370,12 +497,15 @@
|
|||||||
|
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!-- К изображению -->
|
<!-- Кнопка "К изображению" -->
|
||||||
<Button Grid.Row="1" Grid.Column="2"
|
<Button
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
Command="{Binding SwitchMainSectionCommand}"
|
Command="{Binding SwitchMainSectionCommand}"
|
||||||
Content="К изображению"
|
Content="К изображению"
|
||||||
IsVisible="{Binding MainSectionCurrentIndex, Converter={StaticResource EqualsConverter}, ConverterParameter=0}">
|
Grid.Column="2"
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
IsVisible="{Binding MainSectionCurrentIndex, Converter={StaticResource EqualsConverter}, ConverterParameter=0}"
|
||||||
|
>
|
||||||
|
|
||||||
<TextBlock Text="К изображению"/>
|
<TextBlock Text="К изображению"/>
|
||||||
|
|
||||||
@@ -391,7 +521,11 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Полупрозрачный оверлей -->
|
<!-- Полупрозрачный оверлей -->
|
||||||
<Border Background="{StaticResource Overlay}" IsEnabled="{Binding MenuOpened}" IsVisible="{Binding MenuOpened}">
|
<Border
|
||||||
|
Background="{StaticResource Overlay}"
|
||||||
|
IsEnabled="{Binding MenuOpened}"
|
||||||
|
IsVisible="{Binding MenuOpened}"
|
||||||
|
>
|
||||||
<Interaction.Behaviors>
|
<Interaction.Behaviors>
|
||||||
<TappedTrigger>
|
<TappedTrigger>
|
||||||
<InvokeCommandAction Command="{Binding CloseMenuCommand}" />
|
<InvokeCommandAction Command="{Binding CloseMenuCommand}" />
|
||||||
@@ -400,68 +534,109 @@
|
|||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Выезжающая боковая панель -->
|
<!-- Выезжающая боковая панель -->
|
||||||
<Border HorizontalAlignment="Left"
|
<Border
|
||||||
Background="{StaticResource MenuBackground}" BorderBrush="{StaticResource MenuBorder}" BorderThickness="0,0,1,0"
|
Background="{StaticResource MenuBackground}"
|
||||||
IsEnabled="{Binding MenuOpened}" IsVisible="{Binding MenuOpened}">
|
BorderBrush="{StaticResource MenuBorder}"
|
||||||
|
BorderThickness="0,0,1,0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
IsEnabled="{Binding MenuOpened}"
|
||||||
|
IsVisible="{Binding MenuOpened}"
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- Переходы -->
|
||||||
<Border.Transitions>
|
<Border.Transitions>
|
||||||
<Transitions>
|
<Transitions>
|
||||||
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.25" />
|
<TransformOperationsTransition Duration="0:0:0.25" Property="RenderTransform" />
|
||||||
</Transitions>
|
</Transitions>
|
||||||
</Border.Transitions>
|
</Border.Transitions>
|
||||||
|
|
||||||
|
<!-- Поведения -->
|
||||||
<Interaction.Behaviors>
|
<Interaction.Behaviors>
|
||||||
|
|
||||||
<DataTriggerBehavior Binding="{Binding MenuOpened}" ComparisonCondition="Equal" Value="True">
|
<!-- Поведение при открытии меню -->
|
||||||
|
<DataTriggerBehavior
|
||||||
|
Binding="{Binding MenuOpened}"
|
||||||
|
ComparisonCondition="Equal"
|
||||||
|
Value="True"
|
||||||
|
>
|
||||||
<ChangePropertyAction PropertyName="RenderTransform" Value="translateX(0px)" />
|
<ChangePropertyAction PropertyName="RenderTransform" Value="translateX(0px)" />
|
||||||
</DataTriggerBehavior>
|
</DataTriggerBehavior>
|
||||||
|
|
||||||
<DataTriggerBehavior Binding="{Binding MenuOpened}" ComparisonCondition="Equal" Value="False">
|
<!-- Поведение при закрытии меню -->
|
||||||
|
<DataTriggerBehavior
|
||||||
|
Binding="{Binding MenuOpened}"
|
||||||
|
ComparisonCondition="Equal"
|
||||||
|
Value="False"
|
||||||
|
>
|
||||||
<ChangePropertyAction PropertyName="RenderTransform" Value="translateX(-320px)" />
|
<ChangePropertyAction PropertyName="RenderTransform" Value="translateX(-320px)" />
|
||||||
</DataTriggerBehavior>
|
</DataTriggerBehavior>
|
||||||
|
|
||||||
</Interaction.Behaviors>
|
</Interaction.Behaviors>
|
||||||
|
|
||||||
<!-- Содержимое меню -->
|
<!-- Содержимое меню -->
|
||||||
<Grid RowSpacing="10" Margin="10">
|
<Grid Margin="10">
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/> <!-- Кнопка "Новая запись" -->
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/> <!-- Элементы меню -->
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Button Grid.Row="0" MinWidth="200" HorizontalAlignment="Stretch" Command="{Binding CreateRecordCommand}">
|
<Grid.RowSpacing>10</Grid.RowSpacing>
|
||||||
|
|
||||||
|
<!-- Кнопка "Новая запись" -->
|
||||||
|
<Button
|
||||||
|
Command="{Binding CreateRecordCommand}"
|
||||||
|
Grid.Row="0"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
MinWidth="200"
|
||||||
|
>
|
||||||
<TextBlock Text="Новая запись"/>
|
<TextBlock Text="Новая запись"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<ListBox Grid.Row="1" Background="{StaticResource MenuBackground}" ItemsSource="{Binding Records}" SelectedItem="{Binding SelectedRecord}">
|
<!-- Элементы меню -->
|
||||||
|
<ListBox
|
||||||
|
Background="{StaticResource MenuBackground}"
|
||||||
|
Grid.Row="1"
|
||||||
|
ItemsSource="{Binding MenuItems}"
|
||||||
|
SelectedIndex="{Binding MenuSelectedIndex}"
|
||||||
|
>
|
||||||
|
|
||||||
|
<!-- Шаблон списка элементов -->
|
||||||
<ListBox.ItemsPanel>
|
<ListBox.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<StackPanel />
|
<StackPanel />
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ListBox.ItemsPanel>
|
</ListBox.ItemsPanel>
|
||||||
|
|
||||||
|
<!-- Стили элементов -->
|
||||||
<ListBox.Styles>
|
<ListBox.Styles>
|
||||||
|
|
||||||
|
<!-- Общий стиль -->
|
||||||
<Style Selector="ListBoxItem">
|
<Style Selector="ListBoxItem">
|
||||||
<Setter Property="Background" Value="{StaticResource ButtonBackground}" />
|
<Setter Property="Background" Value="{StaticResource ButtonBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<!-- Стиль выбранного элемента -->
|
||||||
<Style Selector="ListBoxItem:selected /template/ ContentPresenter">
|
<Style Selector="ListBoxItem:selected /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="{StaticResource MainBackground}" />
|
<Setter Property="Background" Value="{StaticResource MainBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<!-- Стиль элемента над которым находится указатель -->
|
||||||
<Style Selector="ListBoxItem:pointerover /template/ ContentPresenter">
|
<Style Selector="ListBoxItem:pointerover /template/ ContentPresenter">
|
||||||
<Setter Property="Background" Value="{StaticResource MainBackground}" />
|
<Setter Property="Background" Value="{StaticResource MainBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
</ListBox.Styles>
|
</ListBox.Styles>
|
||||||
|
|
||||||
|
<!-- Шаблон элемента -->
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate x:DataType="vm:SampleCalibrationViewModel+MenuItemViewModel">
|
||||||
<Border Margin="3" CornerRadius="5">
|
<Border Margin="3" CornerRadius="5">
|
||||||
<TextBlock Classes="mini" HorizontalAlignment="Center" VerticalAlignment="Center">
|
<TextBlock
|
||||||
|
Classes="mini"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
>
|
||||||
<Run Text="{Binding Id, StringFormat='[{0}] '}" />
|
<Run Text="{Binding Id, StringFormat='[{0}] '}" />
|
||||||
<Run Text="{Binding SampleName}" />
|
<Run Text="{Binding SampleName}" />
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
|
|||||||
Reference in New Issue
Block a user