WinTaskManager.xaml 8.67 KB
<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>