67 lines
3.2 KiB
XML
67 lines
3.2 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:LindtLeerformPlugin.ViewModels"
|
|
x:Class="LindtLeerformPlugin.Views.CalibrationWindow"
|
|
x:DataType="vm:CalibrationWindowViewModel"
|
|
Title="Leerform Calibration"
|
|
Width="1024" Height="800">
|
|
|
|
<DockPanel>
|
|
<!-- Toolbar -->
|
|
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Spacing="8" Margin="8">
|
|
<Button Content="Start Preview" Command="{Binding StartPreviewCommand}" IsEnabled="{Binding !IsPreviewRunning}" />
|
|
<Button Content="Stop Preview" Command="{Binding StopPreviewCommand}" IsEnabled="{Binding IsPreviewRunning}" />
|
|
<Button Content="Capture Image" Command="{Binding CaptureImageCommand}" />
|
|
</StackPanel>
|
|
|
|
<!-- Status Bar -->
|
|
<Border DockPanel.Dock="Bottom" Background="#1E1E1E" Padding="8,4">
|
|
<StackPanel Orientation="Horizontal" Spacing="16">
|
|
<TextBlock Text="{Binding StatusText}" Foreground="LightGray" />
|
|
<TextBlock Foreground="LightGray">
|
|
<TextBlock.Text>
|
|
<MultiBinding StringFormat="Captured: {0}">
|
|
<Binding Path="CapturedImageCount" />
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Settings Panel -->
|
|
<Border DockPanel.Dock="Right" Width="220" Padding="12" Background="White">
|
|
<ScrollViewer>
|
|
<StackPanel Spacing="8">
|
|
<TextBlock Text="Calibration Settings" FontWeight="Bold" FontSize="14" Foreground="Black" />
|
|
|
|
|
|
<Button Content="Calibrate" Command="{Binding RunCalibrationCommand}" Margin="0,4"
|
|
Background="Red" Foreground="White" FontWeight="Bold" />
|
|
<Button Content="Clear Images" Command="{Binding ClearCalibrationImagesCommand}" Margin="0,4"
|
|
Background="White" Foreground="Red" FontWeight="Bold"
|
|
BorderBrush="Red" BorderThickness="1" />
|
|
|
|
<Separator Margin="0,8" />
|
|
|
|
<TextBlock Text="Calibrated" Foreground="LimeGreen" IsVisible="{Binding IsCalibrated}" />
|
|
<TextBlock Foreground="Gray" IsVisible="{Binding IsCalibrated}">
|
|
<TextBlock.Text>
|
|
<MultiBinding StringFormat="RMS Error: {0:F4}">
|
|
<Binding Path="RmsError" />
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
<CheckBox Content="Apply Calibration" IsChecked="{Binding ApplyCalibration}"
|
|
IsEnabled="{Binding IsCalibrated}" Foreground="Black" Margin="0,4" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Border>
|
|
|
|
<!-- Live Preview -->
|
|
<Border Background="#1A1A1A" Margin="4">
|
|
<Image Source="{Binding PreviewImage}" Stretch="Uniform" />
|
|
</Border>
|
|
</DockPanel>
|
|
|
|
</Window>
|