WinTest.xaml
16.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<Window
x:Class="RCS.WinClient.Views.Pages.WinTest"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:RCS.WinClient.Views.Pages"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="手动任务"
Width="500"
Height="500"
AllowsTransparency="True"
Background="Transparent"
Loaded="Window_Loaded"
ResizeMode="CanResizeWithGrip"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="0" ResizeBorderThickness="2" />
</WindowChrome.WindowChrome>
<Window.Resources>
<Style x:Key="NoMouseOverButtonStyle" TargetType="{x:Type Button}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border
x:Name="Chrome"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
SnapsToDevicePixels="true">
<ContentPresenter
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Border
Background="White"
BorderBrush="{StaticResource HHLGRed}"
BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Grid
Name="Spl_title"
Grid.Row="0"
Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Border
x:Name="Btn_Nail"
Grid.Column="0"
Width="30">
<Image
Width="30"
HorizontalAlignment="Left"
MouseLeftButtonDown="Btn_Nail_MouseLeftButtonDown"
Source="/RCS.WinClient;component/Page/Top.png" />
</Border>
<!--<Button
x:Name="Btn_Nail"
Grid.Column="0"
Width="30"
HorizontalAlignment="Left"
BorderThickness="0"
Click="Button_Click"
Style="{StaticResource NoMouseOverButtonStyle}">
<Button.Background>
<ImageBrush ImageSource="/RCS.WinClient;component/Page/Top.png" />
</Button.Background>
<Button.Foreground>
<SolidColorBrush Color="Black" />
</Button.Foreground>
-->
<!--<Button.Style>
<Style BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
<Style.Triggers>
-->
<!-- 覆盖默认的鼠标悬停样式 -->
<!--
<Trigger Property="IsMouseOver" Value="True">
-->
<!-- 这里不设置任何属性,或者设置为你希望鼠标悬停时的样式 -->
<!-- 例如,保持背景色不变 -->
<!--<Setter Property="Background" Value="{TemplateBinding Background}" />-->
<!--
<Setter Property="Background" Value="White" />
<Setter Property="Foreground" Value="{TemplateBinding Foreground}" />
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>-->
<!--
</Button>-->
<TextBlock
Grid.Column="1"
Grid.ColumnSpan="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Bottom"
FontSize="20"
Foreground="{StaticResource HHAst2}"
MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"
TextAlignment="Center">
手 动 任 务
</TextBlock>
<Button
Name="BtnClose"
Grid.Column="3"
Width="20"
Margin="2"
Background="{StaticResource HHLGRed}"
Click="BtnClose_Click"
Foreground="White">
X
</Button>
</Grid>
<StackPanel
Grid.Row="1"
Height="2"
Background="{StaticResource HHLGRed}" />
<TabControl Grid.Row="2" FontSize="16">
<TabItem
Height="26"
Margin="-2,0,-2,0"
VerticalAlignment="Bottom"
BorderBrush="Green"
BorderThickness="2"
Header="单步任务">
<StackPanel>
<TextBlock>任务类型</TextBlock>
<ComboBox
x:Name="ComBox_ManualTask"
SelectedIndex="-1"
SelectionChanged="ComBox_ManualTask_SelectionChanged" />
<TextBlock Margin="0,10,0,0">AGV编号</TextBlock>
<ComboBox
Name="Tbox_Agv"
SelectedIndex="-1"
SelectionChanged="Tbox_Agv_SelectionChanged" />
<!--<TextBlock Margin="0,10,0,0">起点(选填:默认当前点):</TextBlock>
<TextBox Name="Tbox_Spoint"></TextBox>-->
<TextBlock Margin="0,10,0,0">目标:</TextBlock>
<ComboBox Name="ComBox_Position" IsEditable="True" />
<TextBlock Margin="0,10,0,0">高度或角度:</TextBlock>
<TextBox Name="Tbx_HeightAngle" />
<WrapPanel Margin="0,10,120,0" Visibility="Collapsed">
<Viewbox Height="20">
<RadioButton
x:Name="YesRadio"
HorizontalAlignment="Left"
GroupName="cycle" />
</Viewbox>
<TextBlock Margin="0,0,20,0">循环</TextBlock>
<Viewbox Height="20">
<RadioButton x:Name="NoRadio" GroupName="cycle" />
</Viewbox>
<TextBlock>不循环</TextBlock>
</WrapPanel>
<Button
x:Name="Btn_OK"
Height="52"
Margin="120,50,120,0"
Background="{StaticResource HHLGRed}"
Click="Btn_OK_Click"
Content="单步任务发送"
Foreground="White" />
</StackPanel>
</TabItem>
<TabItem
Height="26"
Margin="-2,0,-2,0"
VerticalAlignment="Bottom"
BorderBrush="Green"
BorderThickness="2"
Header="复合任务">
<StackPanel>
<TextBlock Height="26">任务类型选择</TextBlock>
<ComboBox
Name="ComBox_TaskType"
SelectedIndex="-1"
SelectionChanged="ComBox_TaskType_SelectionChanged" />
<TextBlock Margin="0,10,0,0">起点</TextBlock>
<ComboBox
Name="ComBox_StartStation"
Height="26"
IsEditable="True"
KeyUp="ComBox_KeyUp" />
<TextBlock Margin="0,10,0,0">终点</TextBlock>
<ComboBox
Name="ComBox_EndStation"
Height="26"
IsEditable="True"
KeyUp="ComBox_KeyUp" />
<WrapPanel Margin="0,10,120,0" Visibility="Collapsed">
<Viewbox Height="20">
<RadioButton
x:Name="YesTaskRadio"
HorizontalAlignment="Left"
GroupName="cycle" />
</Viewbox>
<TextBlock Margin="0,0,20,0">循环</TextBlock>
<Viewbox Height="20">
<RadioButton x:Name="NoTaskRadio" GroupName="cycle" />
</Viewbox>
<TextBlock>不循环</TextBlock>
</WrapPanel>
<Button
Name="Btn_Task"
Height="52"
Margin="120,50,120,0"
Background="{StaticResource HHLGRed}"
Click="Btn_Task_Click"
Content="复合任务发送"
Foreground="White" />
</StackPanel>
</TabItem>
<TabItem
Height="26"
Margin="-2,0,-2,0"
VerticalAlignment="Bottom"
BorderBrush="Green"
BorderThickness="2"
Header="循环测试">
<StackPanel>
<TextBlock>任务类型</TextBlock>
<ComboBox x:Name="ComBox_ManualTask1" />
<TextBlock Margin="0,10,0,0">AGV编号</TextBlock>
<ComboBox Name="Tbox_Agv1" />
<Button
Name="Btn_StartManualTask"
Height="52"
Margin="120,20,120,0"
Background="{StaticResource HHLGRed}"
Click="Btn_StartManualTask_Click"
Foreground="White">
开始循环任务
</Button>
<Button
Name="Btn_StopManualTask"
Height="52"
Margin="120,20,120,0"
Background="{StaticResource HHLGRed}"
Click="Btn_StopManualTask_Click"
Foreground="White">
结束循环任务
</Button>
</StackPanel>
</TabItem>
<TabItem
Height="26"
Margin="-2,0,-2,0"
VerticalAlignment="Bottom"
BorderBrush="Green"
BorderThickness="2"
Header="循环随机测试">
<StackPanel>
<TextBlock Margin="0,10,0,0">并发任务数量:</TextBlock>
<TextBox Name="Tbox_RadomCount" Text="4" />
<TextBlock Margin="0,10,0,0">任务类型:</TextBlock>
<StackPanel
x:Name="Panel_TaskType"
MinHeight="20"
Orientation="Horizontal" />
<Button
Name="Btn_StartRadomTask"
Height="52"
Margin="120,20,120,0"
Background="{StaticResource HHLGRed}"
Click="Btn_StartRadomTask_Click"
Foreground="White">
开始随机循环任务
</Button>
<Button
Name="Btn_StopRadomTask"
Height="52"
Margin="120,20,120,0"
Background="{StaticResource HHLGRed}"
Click="Btn_StopRadomTask_Click"
Foreground="White">
结束随机循环任务
</Button>
</StackPanel>
</TabItem>
<!--<TabItem
BorderBrush="Green"
BorderThickness="2"
Header="结束循环"
Visibility="Collapsed">
<StackPanel Visibility="Collapsed">
<TextBlock>任务类型</TextBlock>
<ComboBox x:Name="ComBox_ManualTask1" />
<TextBlock Margin="0,10,0,0">AGV编号</TextBlock>
<ComboBox Name="Tbox_Agv1" />
<Button
Name="Btn_StopManualTask"
Height="52"
Margin="120,20,120,0"
Background="{StaticResource HHLGRed}"
Click="Btn_StopManualTask_Click"
Foreground="White">
循环任务结束
</Button>
</StackPanel>
</TabItem>-->
</TabControl>
<!--<TabControl Grid.Row="2">
<TabItem FontSize="16" Header="单步任务">
</TabItem>
<TabItem
BorderBrush="Green"
BorderThickness="2"
FontSize="16"
Header="一键关机"
Visibility="Collapsed">
<StackPanel>
<TextBlock>关机选择</TextBlock>
<ComboBox Name="Combo_offType">
<ComboBoxItem>单独关机</ComboBoxItem>
<ComboBoxItem>全部关机</ComboBoxItem>
</ComboBox>
<TextBlock Height="29">小车号</TextBlock>
<TextBox Name="TBox_offAgvNo">A22_61</TextBox>
<Button
Name="Btn_Off"
Height="52"
Margin="120,20"
Background="{StaticResource HHLGRed}"
Click="Btn_Off_Click"
Foreground="White">
关 机
</Button>
</StackPanel>
</TabItem>
</TabControl>-->
<StackPanel
Grid.Row="3"
Height="2"
Background="{StaticResource HHLGRed}" />
<TextBlock
Grid.Row="4"
HorizontalAlignment="Center"
FontSize="20"
Foreground="{StaticResource HHAst2}">
控制台系统
</TextBlock>
</Grid>
</Border>
</Window>