forked from amkovkov/GranuSightSoftware2
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
130 lines
5.6 KiB
XML
130 lines
5.6 KiB
XML
<UserControl
|
|
x:Class="GSS2.Views.NumericKeyboardView"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:GSS2.ViewModels"
|
|
x:DataType="vm:NumericKeyboardViewModel"
|
|
Value="{Binding Value, Mode=TwoWay}">
|
|
|
|
<UserControl.Resources>
|
|
<SolidColorBrush x:Key="MainBackground" Color="#001e46" />
|
|
<SolidColorBrush x:Key="ButtonBackground" Color="#0865b2" />
|
|
<SolidColorBrush x:Key="ButtonForeground" Color="#ffffff" />
|
|
</UserControl.Resources>
|
|
|
|
<UserControl.Styles>
|
|
|
|
<Style Selector="Button">
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Background" Value="{StaticResource ButtonBackground}" />
|
|
<Setter Property="Foreground" Value="{StaticResource ButtonForeground}" />
|
|
<Setter Property="CornerRadius" Value="5" />
|
|
</Style>
|
|
|
|
<Style Selector="Button:pointerover /template/ ContentPresenter">
|
|
<Setter Property="Background" Value="#004a94" />
|
|
<Setter Property="Foreground" Value="#eef7ff" />
|
|
</Style>
|
|
|
|
<Style Selector="Button:pressed /template/ ContentPresenter">
|
|
<Setter Property="Background" Value="#004a94" />
|
|
<Setter Property="Foreground" Value="#eef7ff" />
|
|
</Style>
|
|
|
|
<!-- Стиль для поля ввода -->
|
|
<Style Selector="TextPresenter">
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="CaretBrush" Value="#004a94" />
|
|
</Style>
|
|
|
|
<!-- Стиль обёртки TextPresenter -->
|
|
<Style Selector="Border.DisplayBorder">
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="Background" Value="#eef7ff" />
|
|
<Setter Property="CornerRadius" Value="5" />
|
|
</Style>
|
|
|
|
</UserControl.Styles>
|
|
|
|
<Grid Background="{StaticResource MainBackground}">
|
|
<Grid Margin="5" RowSpacing="5">
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0" ColumnSpacing="5">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="3*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border Grid.Column="0" Classes="DisplayBorder">
|
|
<TextPresenter x:Name="Text" FontSize="20" Foreground="#004a94" />
|
|
</Border>
|
|
|
|
<Button Grid.Column="1" Click="Backspace" Content="⌫" />
|
|
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1" Grid.RowSpan="4" ColumnSpacing="5" RowSpacing="5">
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Button Grid.Row="0" Grid.Column="0" Click="KeyPressed" Content="1" />
|
|
<Button Grid.Row="0" Grid.Column="1" Click="KeyPressed" Content="2" />
|
|
<Button Grid.Row="0" Grid.Column="2" Click="KeyPressed" Content="3" />
|
|
<Button Grid.Row="1" Grid.Column="0" Click="KeyPressed" Content="4" />
|
|
<Button Grid.Row="1" Grid.Column="1" Click="KeyPressed" Content="5" />
|
|
<Button Grid.Row="1" Grid.Column="2" Click="KeyPressed" Content="6" />
|
|
<Button Grid.Row="2" Grid.Column="0" Click="KeyPressed" Content="7" />
|
|
<Button Grid.Row="2" Grid.Column="1" Click="KeyPressed" Content="8" />
|
|
<Button Grid.Row="2" Grid.Column="2" Click="KeyPressed" Content="9" />
|
|
<Button Grid.Row="3" Grid.Column="0" Click="KeyPressed" Content="-" />
|
|
<Button Grid.Row="3" Grid.Column="1" Click="KeyPressed" Content="0" />
|
|
<Button Grid.Row="3" Grid.Column="2" Click="KeyPressed" Content="," />
|
|
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="5" ColumnSpacing="5">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Button Grid.Column="0" Click="MoveCursorLeft" Content="◀" />
|
|
<Button Grid.Column="1" Click="Accept" Command="{Binding AcceptCommand}" Content="Применить" />
|
|
<Button Grid.Column="2" Click="Cancel" Command="{Binding CancelCommand}" Content="Отменить" />
|
|
<Button Grid.Column="3" Click="MoveCursorRight" Content="▶" />
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
</UserControl>
|