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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user