WinTaskManager.xaml
8.67 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
<Window x:Class="XingYe_ACS.UI.WinTaskManager"
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:local="clr-namespace:XingYe_ACS.UI"
mc:Ignorable="d"
Title="任务管理" Height="700" Width="1300"
WindowStartupLocation="CenterScreen"
WindowStyle="None" AllowsTransparency="True" Background="Transparent"
Loaded="Window_Loaded" Icon="/XingYe_ACS;component/Image/Icon.ico">
<Border Background="White" BorderThickness="1" BorderBrush="{StaticResource HHLGRed}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
</Grid.RowDefinitions>
<Grid Name="Spl_title" Grid.Row="0" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown" Foreground="{StaticResource HHAst2}" FontSize="20">任 务 管 理</TextBlock>
<Button Name="BtnClose" Grid.Column="1" Background="{StaticResource HHLGRed}" Foreground="White" Width="20" Margin="2" Click="BtnClose_Click">X</Button>
</Grid>
<DataGrid Name="DGrid_Tasks" Grid.Row="1" CanUserAddRows="False" CanUserDeleteRows="False" AutoGenerateColumns="False" BorderThickness="1" BorderBrush="{StaticResource HHLGRed}">
<DataGrid.Columns>
<DataGridTextColumn Header="主任务号" Binding="{Binding Path=strTaskNo}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="任务类型" Binding="{Binding Path=strTaskID}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="执行小车号" Binding="{Binding Path=strTaskAgv}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="起始名称" Binding="{Binding Path=strInitial}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="终点名称" Binding="{Binding Path=strTarget}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="起点" Binding="{Binding Path=startPoint.strBarcode}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="终点" Binding="{Binding Path=endPoint.strBarcode}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="任务接收时间" Binding="{Binding Path=strAcceptTime}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridCheckBoxColumn Header="任务提交" Binding="{Binding Path=isTaskSubmit}" IsReadOnly="True" CanUserSort="False"></DataGridCheckBoxColumn>
<DataGridTextColumn Header="任务开始时间" Binding="{Binding Path=strBeginTime}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="任务结束时间" Binding="{Binding Path=strEndTime}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="任务异常信息" Binding="{Binding Path=taskErrMsg}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
</DataGrid.Columns>
<DataGrid.ContextMenu>
<ContextMenu>
<!--<MenuItem Name="MItem_TaskUpdate" Header="修改任务站台" Click="MItem_TaskUpdate_Click"></MenuItem>-->
<MenuItem Name="MItem_TaskClear" Header="清除任务" Click="MItem_TaskClear_Click"></MenuItem>
<!--<MenuItem Name="MItem_ErrHandle" Header="异常处理" Click="MItem_ErrHandle_Click"></MenuItem>-->
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="{StaticResource HHLGRed}"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="FontSize" Value="20" />
<Setter Property="BorderBrush" Value="{StaticResource HHLGRed}"></Setter>
<Setter Property="BorderThickness" Value="5"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<DataGrid Name="DGrid_SonTask" BorderThickness="3" BorderBrush="{StaticResource HHAst1}" ItemsSource="{Binding Path=sonTaskList}" CanUserAddRows="False" CanUserDeleteRows="False" AutoGenerateColumns="False" IsReadOnly="True">
<DataGrid.Columns>
<DataGridTextColumn Header="序号" Binding="{Binding Path=intSerialNo}" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="子任务号" Binding="{Binding Path=intSonTaskNo}" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="子任务类型" Binding="{Binding Path=sonTaskType}" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="起点" Binding="{Binding Path=startPoint.strBarcode}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="终点" Binding="{Binding Path=endPoint.strBarcode}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridCheckBoxColumn Header="是否载货" Binding="{Binding Path=isCarry}" IsReadOnly="True" CanUserSort="False"></DataGridCheckBoxColumn>
<DataGridTextColumn Header="是否询问" Binding="{Binding Path=taskRequestType}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="心跳接收" Binding="{Binding Path=agv.agvHeart}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="车头方向" Binding="{Binding Path=agvDirection}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="托盘方向" Binding="{Binding Path=dialDirection}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="子任务状态" Binding="{Binding Path=sonTaskState}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="开始时间" Binding="{Binding Path=strBeginTime}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
<DataGridTextColumn Header="结束时间" Binding="{Binding Path=strEndTime}" IsReadOnly="True" CanUserSort="False"></DataGridTextColumn>
</DataGrid.Columns>
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="{StaticResource HHLGRed}"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="FontSize" Value="15" />
<Setter Property="BorderBrush" Value="{StaticResource HHLGRed}"></Setter>
<Setter Property="BorderThickness" Value="2"></Setter>
<Setter Property="HorizontalContentAlignment" Value="Center" />
</Style>
</DataGrid.ColumnHeaderStyle>
</DataGrid>
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</DataGrid>
<TextBlock Grid.Row="2" FontSize="20" HorizontalAlignment="Center" Foreground="{StaticResource HHAst2}">控制台系统</TextBlock>
</Grid>
</Border>
</Window>