Skip to content

Commit e8cad45

Browse files
committed
Polish PTZControl2 camera settings
1 parent 20a6823 commit e8cad45

7 files changed

Lines changed: 486 additions & 131 deletions

File tree

PTZControl2/CameraInfoDialog.axaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
MinWidth="480"
88
MinHeight="320"
99
WindowStartupLocation="Manual">
10+
<Window.Styles>
11+
<Style Selector="Button.dialogAction">
12+
<Setter Property="MinWidth" Value="92" />
13+
<Setter Property="HorizontalContentAlignment" Value="Center" />
14+
</Style>
15+
</Window.Styles>
16+
1017
<Grid Margin="16" RowDefinitions="Auto,Auto,*,Auto" RowSpacing="12">
1118
<StackPanel Orientation="Horizontal" Spacing="12">
1219
<TextBlock Text="Camera monitor"
@@ -30,10 +37,12 @@
3037
Orientation="Horizontal"
3138
HorizontalAlignment="Right"
3239
Spacing="8">
33-
<Button Content="Refresh now"
40+
<Button Classes="dialogAction"
41+
Content="Refresh now"
3442
MinWidth="110"
3543
Click="RefreshNowButton_Click" />
36-
<Button Content="Close"
44+
<Button Classes="dialogAction"
45+
Content="Close"
3746
MinWidth="90"
3847
Click="CloseButton_Click" />
3948
</StackPanel>

PTZControl2/HelpDialog.axaml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,25 @@
6969
</StackPanel>
7070

7171
<StackPanel>
72-
<TextBlock Text="Presets and modes" Classes="sectionTitle" />
72+
<TextBlock Text="Presets" Classes="sectionTitle" />
7373
<TextBlock Text="1..8 / NumPad 1..8" Classes="command" />
7474
<TextBlock Text="Restore the matching preset. In memory mode, save the current position to that preset." Classes="hint" />
75+
<TextBlock Text="M" Classes="command" Margin="0,8,0,0" />
76+
<TextBlock Text="Toggle memory mode. Press Esc to cancel memory mode." Classes="hint" />
77+
</StackPanel>
78+
79+
<StackPanel>
80+
<TextBlock Text="Camera positions" Classes="sectionTitle" />
7581
<TextBlock Text="Home / NumPad 0" Classes="command" Margin="0,8,0,0" />
7682
<TextBlock Text="Restore the selected camera's home position." Classes="hint" />
7783
<TextBlock Text="D" Classes="command" Margin="0,8,0,0" />
78-
<TextBlock Text="Restore driver default values for zoom, pan, and tilt." Classes="hint" />
79-
<TextBlock Text="M" Classes="command" Margin="0,8,0,0" />
80-
<TextBlock Text="Toggle memory mode. Press Esc to cancel memory mode." Classes="hint" />
84+
<TextBlock Text="Restore driver default values for zoom, pan, tilt, and supported picture settings." Classes="hint" />
85+
</StackPanel>
86+
87+
<StackPanel>
88+
<TextBlock Text="Panels and preview" Classes="sectionTitle" />
8189
<TextBlock Text="V / I" Classes="command" Margin="0,8,0,0" />
82-
<TextBlock Text="Switch the live-control tabs to Move/Zoom or Picture." Classes="hint" />
90+
<TextBlock Text="Switch the right panel to Move/Zoom or Picture." Classes="hint" />
8391
<TextBlock Text="P" Classes="command" Margin="0,8,0,0" />
8492
<TextBlock Text="Toggle the live preview window without taking focus away from PTZControl2." Classes="hint" />
8593
<TextBlock Text="/ / *" Classes="command" Margin="0,8,0,0" />
@@ -95,16 +103,16 @@
95103
</ScrollViewer>
96104
</TabItem>
97105

98-
<TabItem Header="Live control">
106+
<TabItem Header="Live Control">
99107
<ScrollViewer Margin="4,16">
100108
<StackPanel Spacing="14">
101109
<StackPanel>
102-
<TextBlock Text="Step controls" Classes="sectionTitle" />
110+
<TextBlock Text="Live Control" Classes="sectionTitle" />
103111
<TextBlock Text="Single click or key press" Classes="command" />
104112
<TextBlock Text="Executes one controlled movement or zoom action using the selected step size." Classes="hint" />
105113
<TextBlock Text="Holding a hotkey" Classes="command" Margin="0,8,0,0" />
106114
<TextBlock Text="Does not queue repeated movement actions. PTZControl2 waits until the key is released before the same key can trigger another action." Classes="hint" />
107-
<TextBlock Text="Holding a live-control button" Classes="command" Margin="0,8,0,0" />
115+
<TextBlock Text="Holding a movement button" Classes="command" Margin="0,8,0,0" />
108116
<TextBlock Text="Currently behaves like a single click. Continuous press-and-release movement like the original GUI is planned separately once the backend can model start/stop movement safely." Classes="hint" />
109117
<TextBlock Text="Move/Zoom and Picture tabs" Classes="command" Margin="0,8,0,0" />
110118
<TextBlock Text="Use V for Move/Zoom and I for Picture. The Picture tab controls brightness, contrast, sharpness, and saturation when the selected camera exposes these values." Classes="hint" />
@@ -126,7 +134,7 @@
126134
<TextBlock Text="Click Memory, then click preset 1..8 to save the current camera position." Classes="hint" />
127135
<TextBlock Text="Click Memory again or press Esc to cancel memory mode." Classes="hint" Margin="0,8,0,0" />
128136
<TextBlock Text="Home and Default" Classes="command" Margin="0,8,0,0" />
129-
<TextBlock Text="Home restores the camera home position. Default restores driver default values for zoom, pan, and tilt." Classes="hint" />
137+
<TextBlock Text="Home restores the camera home position. Default restores driver default values for zoom, pan, tilt, and supported picture settings." Classes="hint" />
130138
</StackPanel>
131139
</StackPanel>
132140
</ScrollViewer>

PTZControl2/MainWindow.axaml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
<TextBlock Text="Home" TextWrapping="Wrap" FontSize="13" />
184184
</StackPanel>
185185
</Button>
186-
<Button x:Name="DefaultAllButton" Classes="preset" Background="#4B647C" Click="DefaultAllButton_Click" ToolTip.Tip="Restore driver default values for zoom, pan, and tilt.">
186+
<Button x:Name="DefaultAllButton" Classes="preset" Background="#4B647C" Click="DefaultAllButton_Click" ToolTip.Tip="Restore driver default values for zoom, pan, tilt, and supported picture settings.">
187187
<StackPanel Spacing="4">
188188
<TextBlock Text="" FontSize="22" FontWeight="SemiBold" />
189189
<TextBlock Text="Default" TextWrapping="Wrap" FontSize="13" />
@@ -207,18 +207,25 @@
207207

208208
<Border Grid.Column="1" Classes="panel" Width="430">
209209
<Grid RowDefinitions="Auto,*" RowSpacing="8">
210-
<StackPanel Orientation="Horizontal" Spacing="22">
211-
<Button x:Name="MoveZoomTabButton"
212-
Classes="tabTitle selected"
213-
Click="MoveZoomTabButton_Click">
214-
<TextBlock Text="Move/Zoom" Classes="tabTitleText" />
215-
</Button>
216-
<Button x:Name="PictureTabButton"
217-
Classes="tabTitle"
218-
Click="PictureTabButton_Click">
219-
<TextBlock Text="Picture" Classes="tabTitleText" />
220-
</Button>
221-
</StackPanel>
210+
<Grid ColumnDefinitions="*,Auto">
211+
<StackPanel Orientation="Horizontal" Spacing="22">
212+
<Button x:Name="MoveZoomTabButton"
213+
Classes="tabTitle selected"
214+
Click="MoveZoomTabButton_Click">
215+
<TextBlock Text="Move/Zoom" Classes="tabTitleText" />
216+
</Button>
217+
<Button x:Name="PictureTabButton"
218+
Classes="tabTitle"
219+
Click="PictureTabButton_Click">
220+
<TextBlock Text="Picture" Classes="tabTitleText" />
221+
</Button>
222+
</StackPanel>
223+
<TextBlock Grid.Column="1"
224+
Text="Live camera control"
225+
Foreground="{DynamicResource AppMutedTextBrush}"
226+
FontSize="12"
227+
VerticalAlignment="Center" />
228+
</Grid>
222229
<Grid Grid.Row="1">
223230
<StackPanel x:Name="MoveZoomTabPanel" Spacing="9" Margin="0,4,0,0">
224231
<Grid ColumnDefinitions="76,76,76,28,76" RowDefinitions="76,76,76" ColumnSpacing="8" RowSpacing="8" HorizontalAlignment="Center">
@@ -277,6 +284,7 @@
277284
TickFrequency="1"
278285
IsSnapToTickEnabled="False"
279286
Value="10"
287+
PointerReleased="StepSlider_PointerReleased"
280288
VerticalAlignment="Center" />
281289
</Grid>
282290
</StackPanel>

0 commit comments

Comments
 (0)