MainWindow.xaml
17.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
<Window x:Class="XingYe_ACS.MainWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:MyNamespace="clr-namespace:XingYe_ACS"
xmlns:local="clr-namespace:XingYe_ACS"
mc:Ignorable="d"
Title="木牛流马配送" Height="700" Width="1300"
WindowStartupLocation="CenterOwner" WindowStyle="None"
AllowsTransparency="True" Background="Transparent"
Loaded="Window_Loaded"
Closed="Window_Closed" Icon="/XingYe_ACS;component/Image/Icon.ico">
<Border>
<Grid x:Name="LayoutRoot" Background="White" Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="324*"></ColumnDefinition>
<ColumnDefinition Width="469*"></ColumnDefinition>
<ColumnDefinition Width="503*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Name="Sp_Singal" Grid.Column="0" Grid.Row="1">
<Expander Name="Exp_SignalMonit" Grid.Row="2" BorderBrush="{StaticResource HHLGRed}" IsExpanded="True"
Height="{Binding ElementName=Sp_Singal, Path=ActualHeight}">
<Expander.Header>
<Border BorderThickness="1">
<TextBlock Foreground="White" Width="{Binding ElementName=Exp_SignalMonit, Path=ActualWidth}" FontWeight="Heavy" Background="{StaticResource HHLGRed}">信号监控</TextBlock>
</Border>
</Expander.Header>
<ScrollViewer VerticalScrollBarVisibility="Visible">
<DataGrid Name="DGrid_Agv" CanUserAddRows="False" AutoGenerateColumns="False" Background="Transparent"
CanUserDeleteRows="False"
GridLinesVisibility="Vertical">
<DataGrid.Columns>
<DataGridTextColumn Header="AGV编号" Binding="{Binding Path=strAgvNo}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="码值" Binding="{Binding Path=strBarcode}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="距离" Binding="{Binding Path=intRunDistance}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="电量" Binding="{Binding Path=currentCharge}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="顶升" Binding="{Binding Path=heightState}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="AGV状态" Binding="{Binding Path=agvState}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridCheckBoxColumn Header="在线" Binding="{Binding Path=isOnline}" IsReadOnly="True" CanUserSort="False"></DataGridCheckBoxColumn>
<DataGridCheckBoxColumn Header="存在" Binding="{Binding Path=isEnable}" IsReadOnly="True" CanUserSort="False"></DataGridCheckBoxColumn>
<DataGridTextColumn Header="心跳接收" Binding="{Binding Path=agvHeart}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
</DataGrid.Columns>
<DataGrid.ContextMenu>
<ContextMenu>
<!--<MenuItem Name="MItem_DisplayPath" Header="显示路径" Click="MItem_DisplayPath_Click"></MenuItem>
<MenuItem Name="MItem_HidePath" Header="隐藏路径" Click="MItem_HidePath_Click"></MenuItem>-->
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<Border BorderThickness="1" BorderBrush="Black" Margin="2">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock>正在执行任务号:</TextBlock>
<TextBlock Text="{Binding Path=agvTask.strTaskNo}"></TextBlock>
</StackPanel>
<TextBlock>停车原因:</TextBlock>
<TextBlock TextWrapping="Wrap" Text="{Binding Path= strStopReason}"></TextBlock>
<TextBlock>故障信息:</TextBlock>
<TextBlock TextWrapping="Wrap" Text="{Binding Path= strAgvError}"></TextBlock>
</StackPanel>
</Border>
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</DataGrid>
</ScrollViewer>
</Expander>
</StackPanel>
<TabControl Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2">
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<Border BorderBrush="{StaticResource HHLGRed}" BorderThickness="1">
<TextBlock>监控界面</TextBlock>
</Border>
<Border BorderThickness="1" BorderBrush="{StaticResource HHLGRed}">
<TextBlock Name="TextBlock_OnLineAgvCount" Foreground="White" Width="auto" Background="{StaticResource HHLGRed}">|</TextBlock>
</Border>
</StackPanel>
</TabItem.Header>
<Grid Grid.Row="1" Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Name="PathLayOut1" Height="*"></RowDefinition>
<RowDefinition Name="PathLayOut2" Height="137"></RowDefinition>
</Grid.RowDefinitions>
<Border BorderThickness="1" BorderBrush="Black">
<ScrollViewer HorizontalScrollBarVisibility="Auto">
<Canvas Name="Canvas_Monitor">
</Canvas>
</ScrollViewer>
</Border>
<Grid Name="StackMsg" Grid.Row="2" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<StackPanel Name="Canvas_ErrMsg" Grid.Column="0">
<StackPanel>
<StackPanel Background="{StaticResource HHLGRed}" Height="2"></StackPanel>
<TabControl>
<TabItem Header="异常信息">
<TextBox Name="TBox_EMessage" TextWrapping="Wrap" MinHeight="100" MaxHeight="100" ScrollViewer.VerticalScrollBarVisibility="Visible" IsReadOnly="True">
<TextBox.ContextMenu>
<ContextMenu>
<MenuItem Header="清除异常信息" Click="TBox_EMessage_Clear_Click"></MenuItem>
</ContextMenu>
</TextBox.ContextMenu>
</TextBox>
</TabItem>
</TabControl>
</StackPanel>
</StackPanel>
<StackPanel Name="Canvas_BussErrMsg" Grid.Column="1">
<StackPanel>
<StackPanel Background="{StaticResource HHLGRed}" Height="2"></StackPanel>
<TabControl>
<TabItem Header="失败信息">
<TextBox Name="TBox_BussErrMsg" TextWrapping="Wrap" MinHeight="100" MaxHeight="100" ScrollViewer.VerticalScrollBarVisibility="Visible" IsReadOnly="True">
<TextBox.ContextMenu>
<ContextMenu>
<MenuItem Header="清除异常信息" Click="TBox_BussErrMsg_Clear_Click"></MenuItem>
</ContextMenu>
</TextBox.ContextMenu>
</TextBox>
</TabItem>
</TabControl>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</TabItem>
</TabControl>
<Grid Name="Spl_title" Grid.Row="0" Grid.ColumnSpan="3">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Image Height="40"
MouseLeftButtonDown="Image_MouseLeftButtonDown" Source="Image/华恒logo-ok.png"></Image>
<Button Name="BtnMin" Click="BtnMin_Click" HorizontalAlignment="Center" Grid.Column="1" Background="{StaticResource HHLGRed}" Foreground="White" Width="20" Margin="2">-</Button>
<Button Name="BtnMax" Click="BtnMax_Click" Grid.Column="2" Background="{StaticResource HHLGRed}" Foreground="White" Width="20" Margin="2">
<Button.Content>
<Rectangle Height="10" Width="10" Fill="White"></Rectangle>
</Button.Content>
</Button>
<Button Name="BtnClose" Grid.Column="3" Background="{StaticResource HHLGRed}" Foreground="White" Width="20" Margin="2" Click="BtnClose_Click">X</Button>
<StackPanel Grid.Row="1" Grid.ColumnSpan="7" Height="40" Orientation="Horizontal" Style="{StaticResource TitleAreaStyle}" ButtonBase.Click="StackPanel_Click">
<Button Name="Btn_UserManager" Style="{StaticResource TitleButton}" Margin="2" Visibility ="Collapsed">
<Button.Content>
<StackPanel Orientation="Horizontal">
<StackPanel Height="30" Width="30" Background="{StaticResource User}">
<StackPanel.RenderTransform>
<SkewTransform AngleX="0"></SkewTransform>
</StackPanel.RenderTransform>
</StackPanel>
<TextBlock VerticalAlignment="Center">用户管理</TextBlock>
</StackPanel>
</Button.Content>
<Button.RenderTransform>
<SkewTransform AngleX="25"></SkewTransform>
</Button.RenderTransform>
</Button>
<Button Name="Btn_CposManager" Style="{StaticResource TitleButton}" Margin="2" Visibility ="Collapsed">
<Button.RenderTransform>
<SkewTransform AngleX="25"></SkewTransform>
</Button.RenderTransform>
<Button.Content>
<StackPanel Orientation="Horizontal">
<StackPanel Height="30" Width="30" Background="{StaticResource CposManager}"></StackPanel>
<TextBlock VerticalAlignment="Center">库位管理</TextBlock>
</StackPanel>
</Button.Content>
</Button>
<Button Name="Btn_TaskManager" Style="{StaticResource TitleButton}" Margin="2" Visibility ="Visible">
<Button.RenderTransform>
<SkewTransform AngleX="25"></SkewTransform>
</Button.RenderTransform>
<Button.Content>
<StackPanel Orientation="Horizontal">
<StackPanel Height="30" Width="30" Background="{StaticResource TaskManager}" VerticalAlignment="Center"></StackPanel>
<TextBlock VerticalAlignment="Center">任务管理</TextBlock>
</StackPanel>
</Button.Content>
</Button>
<Button Name="Btn_MachineManager" Style="{StaticResource TitleButton}" Margin="2" Visibility ="Visible">
<Button.RenderTransform>
<SkewTransform AngleX="25"></SkewTransform>
</Button.RenderTransform>
<Button.Content>
<StackPanel Orientation="Horizontal">
<StackPanel Height="30" Width="30" Background="{StaticResource Organization}" VerticalAlignment="Center"></StackPanel>
<TextBlock VerticalAlignment="Center">机构管理</TextBlock>
</StackPanel>
</Button.Content>
</Button>
<Button Name="Btn_Goods" Style="{StaticResource TitleButton}" Margin="2" Visibility="Collapsed">物料管理
<Button.RenderTransform>
<SkewTransform AngleX="25"></SkewTransform>
</Button.RenderTransform>
</Button>
<Button Name="Btn_History" Style="{StaticResource TitleButton}" Margin="2" Visibility ="Collapsed">
<Button.RenderTransform>
<SkewTransform AngleX="25"></SkewTransform>
</Button.RenderTransform>
<Button.Content>
<StackPanel Orientation="Horizontal">
<StackPanel Height="30" Width="30" Background="{StaticResource History}" VerticalAlignment="Center"></StackPanel>
<TextBlock VerticalAlignment="Center">历史查询</TextBlock>
</StackPanel>
</Button.Content>
</Button>
<Button Name="Btn_RunData" Style="{StaticResource TitleButton}" Margin="2" Visibility ="Collapsed">
<Button.RenderTransform>
<SkewTransform AngleX="25"></SkewTransform>
</Button.RenderTransform>
<Button.Content>
<StackPanel Orientation="Horizontal">
<StackPanel Height="30" Width="30" Background="{StaticResource RunData}" VerticalAlignment="Center"></StackPanel>
<TextBlock VerticalAlignment="Center">运行数据</TextBlock>
</StackPanel>
</Button.Content>
</Button>
<Button Name="Btn_Test" Style="{StaticResource TitleButton}" Margin="2" Visibility ="Visible">
<Button.RenderTransform>
<SkewTransform AngleX="25"></SkewTransform>
</Button.RenderTransform>
<Button.Content>
<StackPanel Orientation="Horizontal">
<StackPanel Height="30" Width="30" Background="{StaticResource ManuTask}" VerticalAlignment="Center"></StackPanel>
<TextBlock VerticalAlignment="Center">手动任务</TextBlock>
</StackPanel>
</Button.Content>
</Button>
</StackPanel>
</Grid>
<Grid Grid.Row="2" Grid.ColumnSpan="3">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Background="{StaticResource HHLGRed}" Height="2"></StackPanel>
<TextBlock Grid.Row="1" HorizontalAlignment="Center" Foreground="{StaticResource HHAst2}"
FontFamily="Times New Roman" >控制台系统</TextBlock>
</Grid>
</Grid>
</Border>
</Window>