GrooveComputerPage.xaml
11.4 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
<Page
x:Class="HHECS.RobotTool.View.GrooveComputerPage"
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:hc="https://handyorg.github.io/handycontrol"
xmlns:local="clr-namespace:HHECS.RobotTool.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewmodel="clr-namespace:HHECS.RobotTool.ViewModel"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
Title="GrooveComputerPage"
d:DataContext="{d:DesignInstance Type=viewmodel:GrooveComputerVM}"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<GroupBox
Grid.Row="0"
Grid.ColumnSpan="2"
Padding="5"
hc:TitleElement.TitlePlacement="Left"
Header="输入参数"
Style="{StaticResource GroupBoxTab.Small}">
<Border Background="{DynamicResource RegionBrush}" CornerRadius="4">
<hc:UniformSpacingPanel ChildWrapping="Wrap" Spacing="10">
<hc:ElementGroup
Height="30"
Margin="0,1"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock VerticalAlignment="Center" Text="坡口宽度(mm)" />
</Border>
<TextBox MinWidth="104" Text="{Binding InputParameter.GrooveWidth, UpdateSourceTrigger=PropertyChanged}" />
</hc:ElementGroup>
<hc:ElementGroup
Height="30"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock VerticalAlignment="Center" Text="坡口深度(mm)" />
</Border>
<TextBox
MinWidth="104"
HorizontalAlignment="Stretch"
Text="{Binding InputParameter.GrooveDepth, UpdateSourceTrigger=PropertyChanged}" />
</hc:ElementGroup>
<hc:ElementGroup
Height="30"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock VerticalAlignment="Center" Text="盖面后单边所需增加余宽(mm)" />
</Border>
<TextBox
MinWidth="60"
HorizontalAlignment="Stretch"
Text="{Binding InputParameter.WeldWidth, UpdateSourceTrigger=PropertyChanged}" />
</hc:ElementGroup>
<hc:ElementGroup
Height="30"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock VerticalAlignment="Center" Text="单层焊接高度(mm)" />
</Border>
<TextBox
MinWidth="123"
HorizontalAlignment="Stretch"
Text="{Binding InputParameter.OneWeldHeight, UpdateSourceTrigger=PropertyChanged}" />
</hc:ElementGroup>
<hc:ElementGroup
Height="30"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock VerticalAlignment="Center" Text="盖面后所需焊缝余高(mm)" />
</Border>
<TextBox
MinWidth="83"
HorizontalAlignment="Stretch"
Text="{Binding InputParameter.WeldHeight, UpdateSourceTrigger=PropertyChanged}" />
</hc:ElementGroup>
<hc:ElementGroup
Height="30"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock VerticalAlignment="Center" Text="焊丝直径(mm)" />
</Border>
<TextBox
MinWidth="104"
HorizontalAlignment="Stretch"
Text="{Binding InputParameter.WeldingWire, UpdateSourceTrigger=PropertyChanged}" />
</hc:ElementGroup>
<hc:ElementGroup
Height="30"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock VerticalAlignment="Center" Text="焊缝长度(mm)" />
</Border>
<TextBox
MinWidth="147"
HorizontalAlignment="Stretch"
Text="{Binding InputParameter.WeldLength, UpdateSourceTrigger=PropertyChanged}" />
</hc:ElementGroup>
<hc:ElementGroup
Height="30"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock VerticalAlignment="Center" Text="打底送丝速度(mm/s)" />
</Border>
<TextBox
MinWidth="147"
HorizontalAlignment="Stretch"
Text="{Binding InputParameter.OneLayerWireFeedingSpeed, UpdateSourceTrigger=PropertyChanged}" />
</hc:ElementGroup>
<hc:ElementGroup
Height="30"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock VerticalAlignment="Center" Text="盖面送丝速度(mm/s)" />
</Border>
<TextBox
MinWidth="147"
HorizontalAlignment="Stretch"
Text="{Binding InputParameter.WireFeedingSpeed, UpdateSourceTrigger=PropertyChanged}" />
</hc:ElementGroup>
<Button
hc:IconElement.Geometry="{StaticResource SearchGeometry}"
Command="{Binding ComputerCommand}"
Content="计算"
Style="{StaticResource ButtonPrimary}" />
<Button
hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}"
Command="{Binding ResetCommand}"
Content="重置"
Style="{StaticResource ButtonDefault}" />
</hc:UniformSpacingPanel>
</Border>
</GroupBox>
<GroupBox
Grid.Row="1"
Grid.ColumnSpan="2"
Margin="0,2"
Padding="5"
hc:TitleElement.TitlePlacement="Left"
Header="输出参数"
Style="{StaticResource GroupBoxTab.Small}">
<Border Background="{DynamicResource RegionBrush}" CornerRadius="4">
<hc:UniformSpacingPanel
VerticalAlignment="Center"
ChildWrapping="Wrap"
Spacing="10">
<hc:ElementGroup
Height="30"
Margin="0,1"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock VerticalAlignment="Center" Text="层数" />
</Border>
<TextBox
MinWidth="205"
IsEnabled="False"
IsReadOnly="True"
Text="{Binding OutputParameter.Layers, UpdateSourceTrigger=PropertyChanged}" />
</hc:ElementGroup>
<hc:ElementGroup
Height="30"
Margin="0,1"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock VerticalAlignment="Center" Text="焊接道数" />
</Border>
<TextBox
MinWidth="110"
IsEnabled="False"
IsReadOnly="True"
Text="{Binding WeldMonitorDataGrids.Count, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" />
</hc:ElementGroup>
</hc:UniformSpacingPanel>
</Border>
</GroupBox>
<DataGrid
Grid.Row="2"
Grid.Column="0"
hc:DataGridAttach.ShowRowNumber="True"
AutoGenerateColumns="False"
HeadersVisibility="All"
IsReadOnly="True"
ItemsSource="{Binding WeldMonitorDataGrids}"
RowHeaderWidth="60"
Style="{StaticResource DataGrid.Small}">
<DataGrid.Columns>
<DataGridTextColumn
Binding="{Binding LayerChannel}"
Header="层-道"
IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding LayerHeight, StringFormat={}{0}mm}" Header="层高" />
<DataGridTextColumn Binding="{Binding StartingPoint}" Header="焊接起点" />
<DataGridTextColumn Binding="{Binding EndingPoint}" Header="焊接终点" />
<DataGridTextColumn Binding="{Binding WeldSpeed, StringFormat={}{0}mm/s}" Header="焊接速度" />
<DataGridTextColumn Binding="{Binding Amplitude, StringFormat={}{0}mm}" Header="振幅" />
<DataGridTextColumn Binding="{Binding SwingFrequency, StringFormat={}{0}Hz}" Header="摆动频率" />
<DataGridTextColumn Binding="{Binding LeftAndRightDwellTime, StringFormat={}{0}s}" Header="左右停留时间" />
</DataGrid.Columns>
</DataGrid>
<wv2:WebView2
x:Name="webView"
Grid.Row="2"
Grid.Column="1"
Source="{Binding MonitorSource}" />
</Grid>
</Page>