forked from amkovkov/GranuSightSoftware2
feat: add Camera View and ViewModel
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
</UserControl.Styles>
|
||||
|
||||
<Border Background="{StaticResource MainBackground}" BorderThickness="0">
|
||||
|
||||
<Grid Margin="5" RowSpacing="5">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
@@ -51,6 +52,7 @@
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Результаты -->
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Калибровка проб -->
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Калибровка сепаратора -->
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Камера -->
|
||||
<ColumnDefinition Width="*" MinWidth="200"/> <!-- Системная страница -->
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -79,8 +81,13 @@
|
||||
<TextBlock Classes="menu-text" Text="Калибровка сепаратора"/>
|
||||
</Button>
|
||||
|
||||
<!-- Системная страница -->
|
||||
<!-- Камера -->
|
||||
<Button Grid.Column="5" Classes="menu" Command="{Binding ChangeSectionCommand}" CommandParameter="5">
|
||||
<TextBlock Classes="menu-text" Text="Камера"/>
|
||||
</Button>
|
||||
|
||||
<!-- Системная страница -->
|
||||
<Button Grid.Column="6" Classes="menu" Command="{Binding ChangeSectionCommand}" CommandParameter="6">
|
||||
<TextBlock Classes="menu-text" Text="Системная страница"/>
|
||||
</Button>
|
||||
|
||||
@@ -94,6 +101,7 @@
|
||||
<ContentControl Content="{Binding Results}"/> <!-- Результаты -->
|
||||
<ContentControl Content="{Binding SampleCalibration}"/> <!-- Калибровка проб -->
|
||||
<ContentControl Content="{Binding SeparatorCalibration}"/> <!-- Калибровка сепаратора -->
|
||||
<ContentControl Content="{Binding Camera}"/> <!-- Камера -->
|
||||
<ContentControl Content="{Binding System}"/> <!-- Системная страница -->
|
||||
</core:SectionPanel>
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<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>
|
||||
@@ -0,0 +1,11 @@
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace GSS2.Views.Common;
|
||||
|
||||
public partial class CameraView : UserControl
|
||||
{
|
||||
public CameraView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user