forked from amkovkov/GranuSightSoftware2
comprehensive update
1) remove unused components: camera view (due it causes segmentation faults), compute resources and all related, illuminator controller (due in useless without camera view), image storage service, temperature and humidity service 2) database schema - reduce tables references, features storing in records themselves in compressed form, add records creation and editing date and time, add separator comment column 3) analysis - rework of pipeline and ui, now database storing only raw data and all display values calculated from it 4) lights service - add reconnection if disconnected 5) add width and height command line arguments 6) fix some typos and other issues
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -16,8 +16,12 @@ public partial class AnalysisView : UserControl
|
||||
|
||||
private void OnChartsUpdate(object? sender, EventArgs ea)
|
||||
{
|
||||
MeanValuesChart.CoreChart.Update();
|
||||
VariancesChart.CoreChart.Update();
|
||||
QualitiesChart.CoreChart.Update();
|
||||
ProcessedAreasHistogram.CoreChart.Update();
|
||||
UnprocessedAreasHistogram.CoreChart.Update();
|
||||
HotspotAreasHistogram.CoreChart.Update();
|
||||
OpticalIntegralsHistogram.CoreChart.Update();
|
||||
InnerStdDevsHistogram.CoreChart.Update();
|
||||
InnerHeterogeneitiesHistogram.CoreChart.Update();
|
||||
ParticleValuesHistogram.CoreChart.Update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<Grid Background="{StaticResource MainBackground}">
|
||||
|
||||
<!-- Основная форма -->
|
||||
<Grid IsEnabled="{Binding !MenuOpened}">
|
||||
<Grid IsEnabled="{Binding CanInteract}">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Кнопка "Удалить" -->
|
||||
@@ -40,12 +40,14 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" /> <!-- Кнопка меню -->
|
||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid.ColumnSpacing>5</Grid.ColumnSpacing>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" /> <!-- Информация -->
|
||||
<RowDefinition Height="*" /> <!-- Информация -->
|
||||
<RowDefinition Height="Auto" /> <!-- Кнопки -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.RowSpacing>5</Grid.RowSpacing>
|
||||
@@ -55,115 +57,201 @@
|
||||
Classes="vertical"
|
||||
Command="{Binding ToggleMenuCommand}"
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="3"
|
||||
VerticalAlignment="Stretch"
|
||||
>
|
||||
<TextBlock Text="☰" />
|
||||
<TextBlock Text="☰"/>
|
||||
</Button>
|
||||
|
||||
<!-- Информация -->
|
||||
<Grid Grid.Column="1">
|
||||
<core:SectionPanel
|
||||
CanScrollBackward="{Binding InfoSectionCanScrollBackward}"
|
||||
CanScrollForward="{Binding InfoSectionCanScrollForward}"
|
||||
ClipToBounds="True"
|
||||
CurrentIndex="{Binding InfoSectionCurrentIndex}"
|
||||
Cyclic="True"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="0"
|
||||
IsScrolling="{Binding InfoSectionIsScrolling}"
|
||||
Orientation="Horizontal"
|
||||
>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Id / Uuid / BrandName / MixtureName / MixtureNormalRate -->
|
||||
<Grid>
|
||||
|
||||
<Grid.ColumnSpacing>5</Grid.ColumnSpacing>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" /> <!-- Id (подпись) | Uuid (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Id (поле ) | Uuid (поле ) -->
|
||||
<RowDefinition Height="Auto" /> <!-- BrandName (подпись) | MixtureName (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- BrandName (поле ) | MixtureName (поле ) -->
|
||||
<RowDefinition Height="Auto" /> <!-- MixtureNormalRate (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- MixtureNormalRate (поле ) -->
|
||||
<RowDefinition Height="*" /> <!-- Пустое пространство -->
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnSpacing>5</Grid.ColumnSpacing>
|
||||
|
||||
<Grid.RowSpacing>5</Grid.RowSpacing>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" /> <!-- Id (подпись) | Uuid (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Id (поле ) | Uuid (поле ) -->
|
||||
<RowDefinition Height="Auto" /> <!-- BrandName (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- BrandName (поле ) -->
|
||||
<RowDefinition Height="Auto" /> <!-- MixtureName (подпись) | MixtureNormalRate (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- MixtureName (поле ) | MixtureNormalRate (поле ) -->
|
||||
<RowDefinition Height="*" /> <!-- Пустое пространство -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Id (подпись) -->
|
||||
<TextBlock
|
||||
Classes="mini"
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Text="ИД:"
|
||||
/>
|
||||
<!-- Id (поле) -->
|
||||
<TextBox
|
||||
Classes="singleline"
|
||||
Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
IsReadOnly="True"
|
||||
PlaceholderText="ИД"
|
||||
Text="{Binding SelectedId}"
|
||||
/>
|
||||
<!-- Uuid (подпись) -->
|
||||
<TextBlock
|
||||
Classes="mini"
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="Уникальный ИД:"
|
||||
/>
|
||||
<!-- Uuid (поле) -->
|
||||
<TextBox
|
||||
Classes="singleline"
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
IsReadOnly="True"
|
||||
PlaceholderText="Уникальный ИД"
|
||||
Text="{Binding SelectedUuid}"
|
||||
/>
|
||||
<!-- BrandName (подпись) -->
|
||||
<TextBlock
|
||||
Classes="mini"
|
||||
Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Text="Марка продукта:"
|
||||
/>
|
||||
<!-- BrandName (поле) -->
|
||||
<controls:TouchTextBox
|
||||
Classes="singleline"
|
||||
Grid.Column="0"
|
||||
Grid.Row="3"
|
||||
PlaceholderText="Марка продукта"
|
||||
Text="{Binding SelectedBrandName}"
|
||||
/>
|
||||
<!-- MixtureName (подпись) -->
|
||||
<TextBlock
|
||||
Classes="mini"
|
||||
Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
Text="Марка смеси:"
|
||||
/>
|
||||
<!-- MixtureName (поле) -->
|
||||
<controls:TouchTextBox
|
||||
Classes="singleline"
|
||||
Grid.Column="1"
|
||||
Grid.Row="3"
|
||||
PlaceholderText="Марка смеси"
|
||||
Text="{Binding SelectedMixtureName}"
|
||||
/>
|
||||
<!-- MixtureNormalRate (подпись) -->
|
||||
<TextBlock
|
||||
Classes="mini" Text="Норма расхода смеси (кг/т | гр/кг):"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="4"
|
||||
/>
|
||||
<!-- MixtureNormalRate (поле) -->
|
||||
<controls:TouchNumericUpDown
|
||||
Classes="singleline"
|
||||
FormatString="0.0000"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="5"
|
||||
Increment="0.0001"
|
||||
PlaceholderText="Норма расхода смеси (кг/т | гр/кг)"
|
||||
Value="{Binding SelectedMixtureNormalRate}"
|
||||
/>
|
||||
<Grid.RowSpacing>5</Grid.RowSpacing>
|
||||
|
||||
</Grid>
|
||||
<!-- Id (подпись) -->
|
||||
<TextBlock
|
||||
Classes="mini"
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Text="ИД:"
|
||||
/>
|
||||
<!-- Id (поле) -->
|
||||
<TextBox
|
||||
Classes="singleline"
|
||||
Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
IsReadOnly="True"
|
||||
PlaceholderText="ИД"
|
||||
Text="{Binding Record.Id}"
|
||||
/>
|
||||
<!-- Uuid (подпись) -->
|
||||
<TextBlock
|
||||
Classes="mini"
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="Уникальный ИД:"
|
||||
/>
|
||||
<!-- Uuid (поле) -->
|
||||
<TextBox
|
||||
Classes="singleline"
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
IsReadOnly="True"
|
||||
PlaceholderText="Уникальный ИД"
|
||||
Text="{Binding Record.Uuid}"
|
||||
/>
|
||||
<!-- BrandName (подпись) -->
|
||||
<TextBlock
|
||||
Classes="mini"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="2"
|
||||
Text="Марка продукта:"
|
||||
/>
|
||||
<!-- BrandName (поле) -->
|
||||
<controls:TouchTextBox
|
||||
Classes="singleline"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="3"
|
||||
PlaceholderText="Марка продукта"
|
||||
Text="{Binding Record.BrandName}"
|
||||
/>
|
||||
<!-- MixtureName (подпись) -->
|
||||
<TextBlock
|
||||
Classes="mini"
|
||||
Grid.Column="0"
|
||||
Grid.Row="4"
|
||||
Text="Марка смеси:"
|
||||
/>
|
||||
<!-- MixtureName (поле) -->
|
||||
<controls:TouchTextBox
|
||||
Classes="singleline"
|
||||
Grid.Column="0"
|
||||
Grid.Row="5"
|
||||
PlaceholderText="Марка смеси"
|
||||
Text="{Binding Record.MixtureName}"
|
||||
/>
|
||||
<!-- MixtureNormalRate (подпись) -->
|
||||
<TextBlock
|
||||
Classes="mini" Text="Норма расхода смеси (кг/т | гр/кг):"
|
||||
Grid.Column="1"
|
||||
Grid.Row="4"
|
||||
/>
|
||||
<!-- MixtureNormalRate (поле) -->
|
||||
<controls:TouchNumericUpDown
|
||||
Classes="singleline"
|
||||
FormatString="0.0000"
|
||||
Grid.Column="1"
|
||||
Grid.Row="5"
|
||||
Increment="0.0001"
|
||||
PlaceholderText="Норма расхода смеси (кг/т | гр/кг)"
|
||||
Value="{Binding Record.MixtureNormalRate}"
|
||||
/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Comment -->
|
||||
<Grid>
|
||||
|
||||
<Grid.RowSpacing>5</Grid.RowSpacing>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" /> <!-- Comment (подпись) -->
|
||||
<RowDefinition Height="*" /> <!-- Comment (поле ) -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Comment (подпись) -->
|
||||
<TextBlock
|
||||
Classes="mini"
|
||||
Grid.Row="0"
|
||||
Text="Дополнительная информация:"
|
||||
/>
|
||||
<!-- Comment (поле) -->
|
||||
<controls:TouchTextBox
|
||||
Classes="multiline"
|
||||
Grid.Row="1"
|
||||
PlaceholderText="Дополнительная информация"
|
||||
Text="{Binding Record.Comment}"
|
||||
/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</core:SectionPanel>
|
||||
|
||||
<!-- Кнопка влево -->
|
||||
<Button
|
||||
Command="{Binding InfoSectionPreviousCommand}"
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
>
|
||||
|
||||
<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
|
||||
Command="{Binding InfoSectionNextCommand}"
|
||||
Grid.Column="2"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<Grid Background="{StaticResource MainBackground}">
|
||||
|
||||
<!-- Основная форма -->
|
||||
<Grid IsEnabled="{Binding !MenuOpened}">
|
||||
<Grid IsEnabled="{Binding CanInteract}">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Кнопка "Удалить" -->
|
||||
@@ -51,8 +51,8 @@
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" /> <!-- Кнопка меню -->
|
||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
||||
<ColumnDefinition Width="*" /> <!-- Информация -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid.ColumnSpacing>5</Grid.ColumnSpacing>
|
||||
@@ -101,12 +101,12 @@
|
||||
<Grid.ColumnSpacing>5</Grid.ColumnSpacing>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" /> <!-- Id (подпись) | Uuid (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Id (поле ) | Uuid (поле ) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Id (подпись) | Uuid (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Id (поле ) | Uuid (поле ) -->
|
||||
<RowDefinition Height="Auto" /> <!-- SampleName (подпись) | BrandComboBox (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- SampleName (поле ) | BrandComboBox (поле ) -->
|
||||
<RowDefinition Height="Auto" /> <!-- SamplingDateTime (подпись) | SamplingPlace (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- SamplingDateTime (поле ) | SamplingPlace (поле ) -->
|
||||
<RowDefinition Height="Auto" /> <!-- SamplingDateTime (подпись) | SamplingPlace (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- SamplingDateTime (поле ) | SamplingPlace (поле ) -->
|
||||
<RowDefinition Height="*" /> <!-- Пустое пространство -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
Grid.Row="1"
|
||||
IsReadOnly="True"
|
||||
PlaceholderText="ИД"
|
||||
Text="{Binding SelectedId}"
|
||||
Text="{Binding Record.Id}"
|
||||
/>
|
||||
<!-- Uuid (подпись) -->
|
||||
<TextBlock
|
||||
@@ -142,7 +142,7 @@
|
||||
Grid.Row="1"
|
||||
IsReadOnly="True"
|
||||
PlaceholderText="Уникальный ИД"
|
||||
Text="{Binding SelectedUuid}"
|
||||
Text="{Binding Record.Uuid}"
|
||||
/>
|
||||
<!-- SampleName (подпись) -->
|
||||
<TextBlock
|
||||
@@ -156,7 +156,7 @@
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Classes="singleline"
|
||||
Text="{Binding SelectedSampleName}"
|
||||
Text="{Binding Record.SampleName}"
|
||||
PlaceholderText="Название пробы"
|
||||
/>
|
||||
<!-- BrandComboBox (подпись) -->
|
||||
@@ -180,7 +180,7 @@
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:SampleCalibrationViewModel+BrandComboBoxItemViewModel">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
>
|
||||
<Run Text="{Binding Id, StringFormat='[{0}] '}" />
|
||||
@@ -204,7 +204,7 @@
|
||||
Grid.Column="0"
|
||||
Grid.Row="5"
|
||||
PlaceholderText="Дата и время отбора пробы"
|
||||
Text="{Binding SelectedSamplingDateTime, Converter={StaticResource DateTimeConverter}}"
|
||||
Text="{Binding Record.SamplingDateTime, Converter={StaticResource DateTimeConverter}}"
|
||||
/>
|
||||
<!-- SamplingPlace (подпись) -->
|
||||
<TextBlock
|
||||
@@ -219,7 +219,7 @@
|
||||
Grid.Column="1"
|
||||
Grid.Row="5"
|
||||
PlaceholderText="Место отбора пробы"
|
||||
Text="{Binding SelectedSamplingPlace}"
|
||||
Text="{Binding Record.SamplingPlace}"
|
||||
/>
|
||||
|
||||
</Grid>
|
||||
@@ -258,7 +258,7 @@
|
||||
Grid.Row="1"
|
||||
Increment="0.0001"
|
||||
PlaceholderText="Фактический расход смеси (кг/т | гр/кг)"
|
||||
Value="{Binding SelectedMixtureActualRate}"
|
||||
Value="{Binding Record.MixtureActualRate}"
|
||||
/>
|
||||
<!-- MeasuredContent (подпись) -->
|
||||
<TextBlock
|
||||
@@ -274,7 +274,7 @@
|
||||
Grid.Row="1"
|
||||
Increment="0.0001"
|
||||
PlaceholderText="Измеренное содержание смеси (кг/т | гр/кг)"
|
||||
Value="{Binding SelectedMeasuredContent}"
|
||||
Value="{Binding Record.MeasuredContent}"
|
||||
/>
|
||||
<!-- SampleComment (подпись) -->
|
||||
<TextBlock
|
||||
@@ -290,7 +290,7 @@
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="3"
|
||||
PlaceholderText="Дополнительная информация о пробе"
|
||||
Text="{Binding SelectedSampleComment}"
|
||||
Text="{Binding Record.SampleComment}"
|
||||
/>
|
||||
|
||||
</Grid>
|
||||
@@ -363,15 +363,14 @@
|
||||
<core:ZoomPanImage
|
||||
Background="Black"
|
||||
HorizontalAlignment="Stretch"
|
||||
ImageSource="{Binding SelectedImage.Image}"
|
||||
IsVisible="{Binding SelectedImage.IsLoading, Converter={x:Static BoolConverters.Not}}"
|
||||
ImageSource="{Binding Record.Image.Image}"
|
||||
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 StringConverters.IsNotNullOrEmpty}" Path="Record.Image.Data" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.Image.IsLoading" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</core:ZoomPanImage.IsVisible>
|
||||
@@ -379,11 +378,11 @@
|
||||
</core:ZoomPanImage>
|
||||
|
||||
<!-- Оверлей "Изображение загружается" -->
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" >
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" >
|
||||
|
||||
<StackPanel.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="SelectedImage.IsLoading" />
|
||||
<Binding Path="Record.Image.IsLoading" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</StackPanel.IsVisible>
|
||||
@@ -402,8 +401,8 @@
|
||||
>
|
||||
<TextBlock.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 Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.Image.Data" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.Image.IsLoading" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</TextBlock.IsVisible>
|
||||
@@ -417,8 +416,8 @@
|
||||
|
||||
<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 Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.Image.Data" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.Image.IsLoading" />
|
||||
<Binding Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</StackPanel.IsVisible>
|
||||
@@ -433,18 +432,20 @@
|
||||
|
||||
<!-- Кнопка "Получить изображения" -->
|
||||
<Button
|
||||
Command="{Binding CaptureImageCommand}"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CaptureImageCommand}"
|
||||
IsVisible="{Binding !ImagesIsCapturing}"
|
||||
>
|
||||
<TextBlock Text="Получить изображения"/>
|
||||
</Button>
|
||||
|
||||
<!-- Кнопка "Отменить съёмку" -->
|
||||
<Button
|
||||
Command="{Binding CancelImageCapturingCommand}"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CancelImageCapturingCommand}"
|
||||
IsVisible="{Binding ImagesIsCapturing}"
|
||||
>
|
||||
<TextBlock Text="Отменить съёмку"/>
|
||||
</Button>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<Grid Background="{StaticResource MainBackground}">
|
||||
|
||||
<!-- Основная форма -->
|
||||
<Grid IsEnabled="{Binding !MenuOpened}">
|
||||
<Grid IsEnabled="{Binding CanInteract}">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" /> <!-- Кнопка "Удалить" -->
|
||||
@@ -80,7 +80,8 @@
|
||||
<RowDefinition Height="Auto" /> <!-- Id (поле ) | Uuid (поле ) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Type (подпись) -->
|
||||
<RowDefinition Height="Auto" /> <!-- Type (поле ) -->
|
||||
<RowDefinition Height="*" /> <!-- Пустое пространство -->
|
||||
<RowDefinition Height="Auto" /> <!-- Comment (подпись) -->
|
||||
<RowDefinition Height="*" /> <!-- Comment (поле ) -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.RowSpacing>5</Grid.RowSpacing>
|
||||
@@ -99,7 +100,7 @@
|
||||
Grid.Row="1"
|
||||
IsReadOnly="True"
|
||||
PlaceholderText="ИД"
|
||||
Text="{Binding SelectedId}"
|
||||
Text="{Binding Record.Id}"
|
||||
/>
|
||||
<!-- Uuid (подпись) -->
|
||||
<TextBlock
|
||||
@@ -115,7 +116,7 @@
|
||||
Grid.Row="1"
|
||||
IsReadOnly="True"
|
||||
PlaceholderText="Уникальный ИД"
|
||||
Text="{Binding SelectedUuid}"
|
||||
Text="{Binding Record.Uuid}"
|
||||
/>
|
||||
<!-- Type (подпись) -->
|
||||
<TextBlock
|
||||
@@ -131,25 +132,27 @@
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="3"
|
||||
PlaceholderText="Тип"
|
||||
Text="{Binding SelectedType}"
|
||||
Text="{Binding Record.Type}"
|
||||
/>
|
||||
|
||||
</Grid>
|
||||
<!-- Comment (подпись) -->
|
||||
<TextBlock
|
||||
Classes="mini"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="4"
|
||||
Text="Дополнительная информация:"
|
||||
/>
|
||||
<!-- Comment (поле) -->
|
||||
<controls:TouchTextBox
|
||||
Classes="multiline"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="5"
|
||||
PlaceholderText="Дополнительная информация"
|
||||
Text="{Binding Record.Comment}"
|
||||
/>
|
||||
|
||||
<!-- Информация -->
|
||||
<Grid Grid.Column="1">
|
||||
<!-- ИД (подпись) -->
|
||||
<!-- <TextBlock Grid.Row="0" Grid.Column="1" Classes="mini" Text="ИД:" /> -->
|
||||
<!-- ИД (поле) -->
|
||||
<!-- <TextBox Grid.Row="1" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.Id}" PlaceholderText="ИД" IsReadOnly="True" /> -->
|
||||
<!-- Тип (подпись) -->
|
||||
<!-- <TextBlock Grid.Row="2" Grid.Column="1" Classes="mini" Text="Тип:" /> -->
|
||||
<!-- Тип (поле) -->
|
||||
<!-- <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="Партия:" /> -->
|
||||
<!-- Партия (поле) -->
|
||||
<!-- <controls:TouchTextBox Grid.Row="5" Grid.Column="1" Classes="singleline" Text="{Binding EditingRecord.Batch}" PlaceholderText="Партия" /> -->
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
@@ -166,25 +169,19 @@
|
||||
|
||||
<!-- Изображение -->
|
||||
<Grid>
|
||||
|
||||
<!-- Изображение -->
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Изображение -->
|
||||
<core:ZoomPanImage
|
||||
Background="Black"
|
||||
HorizontalAlignment="Stretch"
|
||||
ImageSource="{Binding SelectedImage.Image}"
|
||||
IsVisible="{Binding SelectedImage.IsLoading, Converter={x:Static BoolConverters.Not}}"
|
||||
ImageSource="{Binding Record.Image.Image}"
|
||||
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 StringConverters.IsNotNullOrEmpty}" Path="Record.Image.Data" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.Image.IsLoading" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</core:ZoomPanImage.IsVisible>
|
||||
@@ -196,7 +193,7 @@
|
||||
|
||||
<StackPanel.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Path="SelectedImage.IsLoading" />
|
||||
<Binding Path="Record.Image.IsLoading" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</StackPanel.IsVisible>
|
||||
@@ -215,8 +212,8 @@
|
||||
>
|
||||
<TextBlock.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 Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.Image.Data" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.Image.IsLoading" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</TextBlock.IsVisible>
|
||||
@@ -230,8 +227,8 @@
|
||||
|
||||
<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 Converter="{x:Static StringConverters.IsNullOrEmpty}" Path="Record.Image.Data" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="Record.Image.IsLoading" />
|
||||
<Binding Path="ImagesIsCapturing" />
|
||||
</MultiBinding>
|
||||
</StackPanel.IsVisible>
|
||||
@@ -246,18 +243,20 @@
|
||||
|
||||
<!-- Кнопка "Получить изображения" -->
|
||||
<Button
|
||||
Command="{Binding CaptureImageCommand}"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CaptureImageCommand}"
|
||||
IsVisible="{Binding !ImagesIsCapturing}"
|
||||
>
|
||||
<TextBlock Text="Получить изображения"/>
|
||||
</Button>
|
||||
|
||||
<!-- Кнопка "Отменить съёмку" -->
|
||||
<Button
|
||||
Command="{Binding CancelImageCapturingCommand}"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding CancelImageCapturingCommand}"
|
||||
IsVisible="{Binding ImagesIsCapturing}"
|
||||
>
|
||||
<TextBlock Text="Отменить съёмку"/>
|
||||
</Button>
|
||||
|
||||
@@ -36,31 +36,30 @@
|
||||
|
||||
<Border Background="{StaticResource MainBackground}" BorderThickness="0">
|
||||
|
||||
<Grid Margin="5" RowSpacing="5">
|
||||
<Grid Margin="5">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/> <!-- Меню -->
|
||||
<RowDefinition Height="*"/> <!-- Основной контент -->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Меню -->
|
||||
<ScrollViewer Grid.Row="0" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Disabled">
|
||||
<Grid.RowSpacing>5</Grid.RowSpacing>
|
||||
|
||||
<ScrollViewer.IsEnabled>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="IsScrolling" />
|
||||
<Binding Converter="{x:Static BoolConverters.Not}" Path="SeparatorCalibration.MenuOpened" />
|
||||
</MultiBinding>
|
||||
</ScrollViewer.IsEnabled>
|
||||
<!-- Меню -->
|
||||
<ScrollViewer
|
||||
Grid.Row="0"
|
||||
HorizontalScrollBarVisibility="Hidden"
|
||||
IsEnabled="{Binding CanInteract}"
|
||||
VerticalScrollBarVisibility="Disabled"
|
||||
>
|
||||
|
||||
<Grid ColumnSpacing="5">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Анализ -->
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Калибровка проб -->
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Калибровка сепаратора -->
|
||||
<!-- <ColumnDefinition Width="*" MinWidth="200"/> --> <!-- Камера -->
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Система -->
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Анализ -->
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Марки -->
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Сепараторы -->
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Пробы -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Анализ -->
|
||||
@@ -68,24 +67,19 @@
|
||||
<TextBlock Classes="menu-text" Text="Анализ"/>
|
||||
</Button>
|
||||
|
||||
<!-- Калибровка проб -->
|
||||
<!-- Марки -->
|
||||
<Button Grid.Column="1" Classes="menu" Command="{Binding ChangeSectionCommand}" CommandParameter="1">
|
||||
<TextBlock Classes="menu-text" Text="Калибровка проб"/>
|
||||
<TextBlock Classes="menu-text" Text="Марки"/>
|
||||
</Button>
|
||||
|
||||
<!-- Калибровка сепараторов -->
|
||||
|
||||
<!-- Сепараторы -->
|
||||
<Button Grid.Column="2" Classes="menu" Command="{Binding ChangeSectionCommand}" CommandParameter="2">
|
||||
<TextBlock Classes="menu-text" Text="Калибровка сепараторов"/>
|
||||
<TextBlock Classes="menu-text" Text="Сепараторы"/>
|
||||
</Button>
|
||||
|
||||
<!-- Камера -->
|
||||
<!-- <Button Grid.Column="3" Classes="menu" Command="{Binding ChangeSectionCommand}" CommandParameter="3">
|
||||
<TextBlock Classes="menu-text" Text="Камера"/>
|
||||
</Button> -->
|
||||
|
||||
<!-- Система -->
|
||||
<Button Grid.Column="3" Classes="menu" Command="{Binding ChangeSectionCommand}" CommandParameter="4">
|
||||
<TextBlock Classes="menu-text" Text="Система"/>
|
||||
|
||||
<!-- Пробы -->
|
||||
<Button Grid.Column="3" Classes="menu" Command="{Binding ChangeSectionCommand}" CommandParameter="3">
|
||||
<TextBlock Classes="menu-text" Text="Пробы"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
@@ -93,14 +87,16 @@
|
||||
|
||||
<!-- Основной контент -->
|
||||
<core:SectionPanel Grid.Row="1" ClipToBounds="True" CurrentIndex="{Binding CurrentIndex}" Orientation="Horizontal" IsScrolling="{Binding IsScrolling}">
|
||||
<ContentControl Content="{Binding Analysis}"/> <!-- Анализ -->
|
||||
<ContentControl Content="{Binding SampleCalibration}"/> <!-- Калибровка проб -->
|
||||
<ContentControl Content="{Binding SeparatorCalibration}"/> <!-- Калибровка сепаратора -->
|
||||
<!-- <ContentControl Content="{Binding Camera}"/> --> <!-- Камера -->
|
||||
<ContentControl Content="{Binding System}"/> <!-- Система -->
|
||||
<ContentControl Content="{Binding Analysis}"/> <!-- Анализ -->
|
||||
<ContentControl Content="{Binding BrandCalibration}"/> <!-- Марки -->
|
||||
<ContentControl Content="{Binding SeparatorCalibration}"/> <!-- Сепараторы -->
|
||||
<ContentControl Content="{Binding SampleCalibration}"/> <!-- Пробы -->
|
||||
<!-- <ContentControl Content="{Binding Camera}"/> --> <!-- Камера -->
|
||||
<!-- <ContentControl Content="{Binding System}"/> --> <!-- Система -->
|
||||
</core:SectionPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
<UserControl
|
||||
x:Class="GSS2.Views.Common.CameraView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:GSS2.ViewModels.Common"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
x:DataType="vm:CameraViewModel">
|
||||
|
||||
<UserControl.Resources>
|
||||
<SolidColorBrush x:Key="MainBackground" Color="#001e46" />
|
||||
<SolidColorBrush x:Key="ButtonBackground" Color="#0865b2" />
|
||||
<SolidColorBrush x:Key="ButtonForeground" Color="#ffffff" />
|
||||
<x:Double x:Key="ButtonFontSize">20</x:Double>
|
||||
</UserControl.Resources>
|
||||
|
||||
<UserControl.Styles>
|
||||
|
||||
<Style Selector="Button">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
||||
<Setter Property="Background" Value="{StaticResource ButtonBackground}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource ButtonForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="TextBlock">
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource ButtonFontSize}"/>
|
||||
</Style>
|
||||
|
||||
</UserControl.Styles>
|
||||
|
||||
<Border BorderThickness="0">
|
||||
<Grid>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/> <!-- Камера -->
|
||||
<ColumnDefinition Width="Auto"/> <!-- Осветитель -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ContentControl Grid.Column="0" Content="{Binding Camera}"/> <!-- Камера -->
|
||||
|
||||
<ContentControl Grid.Column="1" Content="{Binding Illuminator}"/> <!-- Осветитель -->
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
@@ -1,11 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace GSS2.Views.Common;
|
||||
|
||||
public partial class CameraView : UserControl
|
||||
{
|
||||
public CameraView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Reference in New Issue
Block a user