<Window
    x:Class="Khd.Core.Wpf.Form.FormBoard"
    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:input="clr-namespace:System.Windows.Input;assembly=PresentationCore"
    xmlns:local="Khd.Core.Wpf.Form.FormBoard"
    xmlns:hc="https://handyorg.github.io/handycontrol"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Title="FormBoard"
    Width="1920"
    Height="1080"
    input:InputMethod.IsInputMethodEnabled="False"
    Closed="Close"
    Loaded="FormBoard_Loaded"
    WindowStartupLocation="CenterScreen"
    WindowState="Normal"
    WindowStyle="None"
    mc:Ignorable="d">
    <Window.Resources>

        <ResourceDictionary>

            <ResourceDictionary.MergedDictionaries>
                <!--<hc:ThemeResources/>
                <hc:Theme/>-->
                <ResourceDictionary Source="/CSS/SearchBtnClass.xaml" />
                <ResourceDictionary Source="/CSS/SearchTextClass.xaml" />
                <ResourceDictionary Source="/CSS/DataGridClass.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <Style x:Key="CustomButtonStyle" TargetType="{x:Type Button}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Grid>
                                <Border
                                    x:Name="border"
                                    Background="#213269"
                                    BorderBrush="#172557"
                                    BorderThickness="0,0,0,3" />
                                <ContentPresenter
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    RecognizesAccessKey="True"
                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal" />
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
                                                    <EasingColorKeyFrame KeyTime="0" Value="#213269" />
                                                </ColorAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed" />
                                        <VisualState x:Name="Disabled" />
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsFocused" Value="True" />
                                <Trigger Property="IsDefaulted" Value="True" />
                                <Trigger Property="IsMouseOver" Value="True" />
                                <Trigger Property="IsPressed" Value="True" />
                                <Trigger Property="IsEnabled" Value="False" />
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <!--  TextBox默认样式  -->
            <Style x:Key="DefaultTextBox" TargetType="{x:Type TextBox}" />
            <Style x:Key="dgCell" TargetType="TextBlock">
                <Setter Property="TextAlignment" Value="Center" />
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Setter Property="VerticalAlignment" Value="Center" />
            </Style>
            <Style x:Key="DefaultButton" TargetType="{x:Type Button}">
                <Setter Property="Foreground" Value="White" />
                <Setter Property="FontFamily" Value="Microsoft YaHei" />
                <Setter Property="FontSize" Value="20" />

                <!--<Setter Property="FontWeight" Value="Bold"/>-->
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <Border
                                BorderBrush="{TemplateBinding Control.BorderBrush}"
                                BorderThickness="0"
                                CornerRadius="30,30,30,30">
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <GradientStop Offset="0.0" Color="#2c78fa" />
                                        <GradientStop Offset="0.2" Color="#2c78fa" />
                                        <GradientStop Offset="0.0" Color="#2c78fa" />
                                    </LinearGradientBrush>
                                </Border.Background>
                                <ContentPresenter
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Content="{TemplateBinding ContentControl.Content}" />
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="DefaultButtonSend" TargetType="{x:Type Button}">
                <Setter Property="Foreground" Value="White" />
                <Setter Property="FontFamily" Value="Microsoft YaHei" />
                <Setter Property="FontSize" Value="20" />

                <!--<Setter Property="FontWeight" Value="Bold"/>-->
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <Border
                                BorderBrush="{TemplateBinding Control.BorderBrush}"
                                BorderThickness="0"
                                CornerRadius="90,90,90,90">
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <GradientStop Offset="0.0" Color="#2c78fa" />
                                        <GradientStop Offset="0.2" Color="#2c78fa" />
                                        <GradientStop Offset="0.0" Color="#2c78fa" />
                                    </LinearGradientBrush>
                                </Border.Background>
                                <ContentPresenter
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Content="{TemplateBinding ContentControl.Content}" />
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="EnableButtonSend" TargetType="{x:Type Button}">
                <Setter Property="Foreground" Value="White" />
                <Setter Property="FontFamily" Value="Microsoft YaHei" />
                <Setter Property="FontSize" Value="20" />

                <!--<Setter Property="FontWeight" Value="Bold"/>-->
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <Border
                                BorderBrush="{TemplateBinding Control.BorderBrush}"
                                BorderThickness="0"
                                CornerRadius="90,90,90,90">
                                <Border.Background>
                                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                        <GradientStop Offset="0.0" Color="Gray" />
                                        <GradientStop Offset="0.2" Color="Gray" />
                                        <GradientStop Offset="0.0" Color="Gray" />
                                    </LinearGradientBrush>
                                </Border.Background>
                                <ContentPresenter
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Content="{TemplateBinding ContentControl.Content}" />
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <!-- 周义帆 20231008 一下代码添加-->
            <!--  清空按钮样式  -->
            <Style  x:Key="qingkongButton" TargetType ="{x:Type Button}" >
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="1" CornerRadius="5">
                                <Border.Background>#1E90FF</Border.Background>
                                <ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Foreground" Value="White"></Setter>
                <Setter Property="FontSize" Value="14"></Setter>
            </Style>
            <!--  警告按钮样式  -->
            <Style  x:Key="jinggaoButton" TargetType ="{x:Type Button}" >
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="1" CornerRadius="5">
                                <Border.Background>#EE0000</Border.Background>
                                <ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Foreground" Value="White"></Setter>
                <Setter Property="FontSize" Value="14"></Setter>
            </Style>
            <!--TextBox样式-->
            <Style x:Key="XingHaoBianMaYangShi" TargetType="{x:Type TextBox}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="TextBox">
                            <Border BorderThickness="1" BorderBrush="Gray" CornerRadius="8" Background="{TemplateBinding Background}">
                                <ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center"  BorderThickness="0" IsTabStop="False"></ScrollViewer>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
                <Setter Property="HorizontalContentAlignment" Value="Left"></Setter>

            </Style>
            <!--Plc信息TextBox样式-->
            <Style x:Key="tbxStyle" TargetType="{x:Type TextBox}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type TextBox}">
                            <Grid>
                                <Border BorderThickness="2" BorderBrush="Gray" CornerRadius="4" Background="{TemplateBinding Background}">
                                    <ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center" Background="{x:Null}" BorderThickness="0" IsTabStop="False"></ScrollViewer>
                                </Border>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <!--  查询按钮样式  -->
            <Style  x:Key="chaxunButton" TargetType ="{x:Type Button}" >
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="1" CornerRadius="5">
                                <Border.Background>#66CD00</Border.Background>
                                <ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Foreground" Value="White"></Setter>
                <Setter Property="FontSize" Value="14"></Setter>
            </Style>
            <!--  修改按钮样式  -->
            <Style  x:Key="xiugaiButton" TargetType ="{x:Type Button}" >
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="1" CornerRadius="5">
                                <Border.Background>#DAA520</Border.Background>
                                <ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Foreground" Value="White"></Setter>
                <Setter Property="FontSize" Value="14"></Setter>
            </Style>
            <!--  订单清空备份按钮样式  -->
            <Style  x:Key="ClearOrderButton" TargetType ="{x:Type Button}" >
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Button}">
                            <Border BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="1" CornerRadius="5">
                                <Border.Background>#FF7F00</Border.Background>
                                <ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Foreground" Value="White"></Setter>
                <Setter Property="FontSize" Value="14"></Setter>
            </Style>
        </ResourceDictionary>
    </Window.Resources>
    <Viewbox Stretch="Fill">
        <Canvas
            Width="1920"
            Height="1080"
            Background="#172557">
            <!--<Grid   Width="1920" Height="1200" >
                <TabControl>
                    <TabItem Header="用户管理" FontSize="25"   Foreground="#515A6E" Width="160" Height="50" >

                    </TabItem>
                </TabControl>
            </Grid>-->
         
            <!--  上件操作  -->
            <StackPanel
                x:Name="UpperStart"
                Canvas.Left="174"
                Canvas.Top="110"
                Width="1740"
                Height="890"
                HorizontalAlignment="Right"
                Background="#213269" Visibility="Visible">
                <!--  订单信息  -->
                <StackPanel
                    Width="1746"
                    Height="110"
                    HorizontalAlignment="Left">

                    <StackPanel
                        Width="1745"
                        Height="90"
                        Margin="0"
                        HorizontalAlignment="Left"
                        Orientation="Horizontal">
                        <Label
                             Background="Transparent"
                    BorderThickness="0"
                            Width="100"
                            Margin="75,0,0,0"
                            Content="载具号 :"
                            FontSize="25"
                            Foreground="White" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                        <TextBox x:Name="CarNo" HorizontalAlignment="Center"  VerticalAlignment="Center" Width="150" Height="50"  IsEnabled="False"
                         FontSize="30" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="0,0,0,0" Style="{StaticResource XingHaoBianMaYangShi}" TextChanged="CarNo_TextChanged"/>
                        <!--<TextBox  x:Name="CarNo"
                            Width="200"
                            Margin="0,10,20,10"
                            FontSize="40"
                            IsEnabled="False"
                            HorizontalContentAlignment="Center"
                            VerticalContentAlignment="Center" Style="{StaticResource XingHaoBianMaYangShi}"/>-->
                        <Image x:Name="imgzjydw" Source="..\Resources\state-n@1x.png" Height="40" Width="40" Margin="20,0,0,0"  Visibility="Hidden" />
                        <Label x:Name="labzjydw" Content="已到位" FontSize="20" Foreground="White" Width="100" Margin="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Visibility="Hidden"/>
                        <Image x:Name="imgzjwdw" Source="..\Resources\state-b@1x.png" Height="40" Width="40" Margin="0" Visibility="Hidden"/>
                        <Label x:Name="labzjwdw" Content="未到位"  FontSize="20" Foreground="White" Width="100" Margin="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Visibility="Hidden"/>
                        <Label
                            Width="125"
                            Margin="10,0,0,0"
                            Content="上件物料 :"
                            FontSize="25"
                            Foreground="White"
                            HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                        <!--<TextBox
                            x:Name="tBoxMessage"
                            Width="200"
                            Margin="0,10,0,10"
                            FontSize="20"
                            Foreground="White"
                            IsEnabled="False"
                            HorizontalContentAlignment="Center"
                            VerticalContentAlignment="Center" Style="{StaticResource XingHaoBianMaYangShi}"/>-->

                        <TextBox 
                         x:Name="tBoxMessage"
                         HorizontalAlignment="Center"
                         VerticalAlignment="Center"
                         Width="255"
                         Height="50"
                         FontSize="20"
                         HorizontalContentAlignment="Left"
                         VerticalContentAlignment="Center"
                         Margin="20,0,20,0"
                         MaxLength="17"
                         PreviewKeyDown="txtInput_PreviewKeyDown"
                         Style="{StaticResource XingHaoBianMaYangShi}"/>
                        <Button
                            x:Name="btn_sendNullCar"
                            Width="100"
                            Height="50"
                            Margin="0,0,0,0"
                            Click="btnsendNullCar_Click"
                            Content="清空"
                            FontSize="25"
                            IsCancel="True"
                            Style="{StaticResource qingkongButton}"/>
                        <Label
                            Width="125"
                            Margin="125,0,0,0"
                            Content="车身长度 :"
                            FontSize="25"
                            Foreground="White"
                            HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Visibility="Visible"/>
                        <TextBox x:Name="tbx_CheLiangChangDu" HorizontalAlignment="Center"  VerticalAlignment="Center" Width="120" Height="50"  IsEnabled="False"
                         FontSize="30" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10,0,20,0" Style="{StaticResource XingHaoBianMaYangShi}" Visibility="Visible" MaxLength="1"/>
                        <Button Width="100" Height="50" VerticalAlignment="Center" Foreground="White" FontSize="25"  Style="{StaticResource  xiugaiButton}" Margin="10,0,0,0" Click="BtnXiuGaiCheShenChangDu_Click">
                            <TextBlock x:Name="QingKongButton" Text="编辑"/>
                        </Button>
                    </StackPanel>
                    <StackPanel
                        Height="20"
                        Margin="0"
                        Background="#172557" />
                </StackPanel>
                <StackPanel
                    Width="1746"
                    Height="750"
                    HorizontalAlignment="Left"
                    Focusable="False">
                    <StackPanel Orientation="Horizontal" Visibility="Collapsed">
                        <Image
                        Width="40"
                        Height="40"
                        Margin="120,0,0,0"
                        Source="..\Resources\yizhuangzaichanpin.png" />
                        <Label
                        Width="110"
                        Margin="0"
                        HorizontalAlignment="Left"
                        Content="物料选择"
                        FontSize="25"
                        Foreground="White" />
                    </StackPanel>

                    <StackPanel                       
                        Height="80"
                        Width="1590"
                        Margin="0,0,0,10"
                        Background="#213269"
                        Orientation="Horizontal" Visibility="Visible">
                        <Label
                            Width="125"
                            Height="70"
                            Margin="0,0,10,0"
                            Content="发车反馈 :"
                            FontSize="25"
                            Foreground="White"
                            HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                        <Label x:Name="lba_ThrifTtitle" 
                               Height="60"
                               Width="350"
                               VerticalAlignment="Center"
                               HorizontalContentAlignment="Center" 
                               VerticalContentAlignment="Center" 
                               FontSize="30"
                               Margin="0,5,0,5"
                               />
                        <Label 
                            Foreground="White" 
                            FontSize="25"  
                            HorizontalAlignment="Stretch" 
                            VerticalAlignment="Stretch" 
                            HorizontalContentAlignment="Center" 
                            VerticalContentAlignment="Center" 
                            Content="Vin流水号 : " 
                            Margin="20,0,0,0"/>
                        <TextBox 
                            x:Name="MoHuChaXunWuLiaoName" 
                            HorizontalAlignment="Center"  
                            VerticalAlignment="Center"
                            Width="180" 
                            Height="50" 
                            FontSize="30" 
                            HorizontalContentAlignment="Left" 
                            VerticalContentAlignment="Center" 
                            Margin="10,0,20,0" 
                            Style="{StaticResource XingHaoBianMaYangShi}"/>
                        <Button 
                            Width="100" 
                            Height="50" 
                            VerticalAlignment="Center" 
                            Foreground="White" 
                            FontSize="25"  
                            Style="{StaticResource chaxunButton}" 
                            Click="ChaXunButton_Click" >
                            <TextBlock 
                                x:Name="ChaXunButton" 
                                Text="查询"/>
                        </Button>
                        <Button 
                            Width="100"
                            Height="50" 
                            VerticalAlignment="Center"  
                            Foreground="White" 
                            FontSize="25"  
                            Style="{StaticResource qingkongButton}" 
                            Margin="20,0,0,0" 
                            Click="QingKongButton_Click">
                            <TextBlock x:Name="XiugaiButton" 
                                       Text="清空"/>
                        </Button>
                        <Button 
                            Width="150" 
                            Height="55" 
                            VerticalAlignment="Center"  
                            Foreground="White" 
                            FontSize="25"  
                            Margin="150,0,0,0" 
                            Visibility="Visible" 
                            Style="{StaticResource ClearOrderButton}" 
                            Click="btn_ClearOrder_Click">
                            <TextBlock x:Name="btn_clearOrder" 
                                       Text="订单清空"/>
                        </Button>
                        <Button 
                            Width="150" 
                            Height="55" 
                            VerticalAlignment="Center"  
                            Foreground="White" 
                            FontSize="25"  
                            Margin="60,0,0,0" 
                            Visibility="Visible" 
                            Style="{StaticResource qingkongButton}" 
                            Click="btn_dingdandaoru_Click">
                            <TextBlock x:Name="btn_dingdandaoru" 
                                       Text="订单导入"/>
                        </Button>
                    </StackPanel>
                    <DataGrid 
                        x:Name="LoadMaterial"
                        Width="1600"
                        Height="630"
                        AlternationCount="2"
                        AutoGenerateColumns="False"
                        Background="#172557"
                        CanUserAddRows="False"
                        CanUserReorderColumns="False"
                        CanUserResizeColumns="False"
                        CanUserResizeRows="False"
                        Focusable="False"
                        HeadersVisibility="Column"
                        IsReadOnly="True"
                        LoadingRow="dgData_LoadingRow"
                        RowHeaderWidth="0"
                        SelectionMode="Single" FontSize="16"
                         Visibility="Visible">
                        <DataGrid.Columns>
                            <DataGridTemplateColumn
                                x:Name="grid1"
                                Width="100"
                                MinWidth="10"
                                Header=" 序号"
                                IsReadOnly="True">
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock
                                            Margin="0"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Focusable="False"
                                            FontSize="20"
                                            Text="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}, Mode=FindAncestor}}" />
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>

                            <DataGridTextColumn
                                Width="370"
                                Binding="{Binding order_code}"
                                CanUserSort="False"
                                ElementStyle="{StaticResource dgCell}"
                                FontSize="20"
                                Header="Vin条码"
                                IsReadOnly="True" />

                            <DataGridTextColumn
                                Width="*"
                                Binding="{Binding prod_code}"
                                CanUserSort="False"
                                ElementStyle="{StaticResource dgCell}"
                                FontSize="20"
                                Header="物料描述"
                                IsReadOnly="True" />

                            <DataGridTextColumn
                                Width="100"
                                Binding="{Binding line_code}"
                                CanUserSort="False"
                                ElementStyle="{StaticResource dgCell}"
                                FontSize="20"
                                Header="线别"
                                IsReadOnly="True" />

                            <DataGridTextColumn
                                Width="150"
                                Binding="{Binding isover}"
                                CanUserSort="False"
                                ElementStyle="{StaticResource dgCell}"
                                FontSize="20"
                                Header="订单状态"
                                IsReadOnly="True" />

                            <DataGridTextColumn
                                Width="255"
                                Binding="{Binding est}"
                                CanUserSort="False"
                                ElementStyle="{StaticResource dgCell}"
                                FontSize="20"
                                Header="订单日期"
                                IsReadOnly="True" />



                        </DataGrid.Columns>
                        <DataGrid.CellStyle>
                            <Style TargetType="{x:Type DataGridCell}">
                                <Setter Property="Background" Value="#213269" />
                                <Setter Property="Foreground" Value="White" />
                                <Setter Property="Height" Value="50" />
                                <Setter Property="HorizontalContentAlignment" Value="Center" />
                            </Style>

                        </DataGrid.CellStyle>
                        <DataGrid.RowStyle>
                            <Style TargetType="{x:Type DataGridRow}">
                                <Setter Property="Background" Value="#213269" />
                                <Setter Property="Foreground" Value="White" />
                                <Setter Property="Height" Value="50" />
                            </Style>
                        </DataGrid.RowStyle>
                        <DataGrid.RowHeaderStyle>
                            <Style TargetType="{x:Type DataGridRowHeader}">
                                <Setter Property="Background" Value="#213269" />
                                <Setter Property="Foreground" Value="White" />
                                <Setter Property="Height" Value="50" />
                                <Setter Property="HorizontalContentAlignment" Value="Center" />
                            </Style>
                        </DataGrid.RowHeaderStyle>
                        <DataGrid.ColumnHeaderStyle>
                            <Style TargetType="{x:Type DataGridColumnHeader}">
                                <Setter Property="Background" Value="#172560" />
                                <Setter Property="Foreground" Value="White" />
                                <Setter Property="Height" Value="50" />
                                <Setter Property="HorizontalContentAlignment" Value="Center" />
                                <Setter Property="Margin" Value="0,0,0,0" />
                                <Setter Property="BorderThickness" Value="5" />
                                <Setter Property="BorderBrush" Value="#172540" />
                                <Setter Property="FontSize" Value="30" />
                            </Style>
                        </DataGrid.ColumnHeaderStyle>
                    </DataGrid>

                    <WrapPanel
                        Height="60"
                        Margin="0"
                        HorizontalAlignment="Center"
                        DataContext="{Binding GridPagingService}" Width="650" Visibility="Collapsed" >
                        <Button
                            Margin="5" x:Name="FristPageButton"
                            Padding="15,5"
                            Command="{Binding FirstPage}"
                            Content="首页" />
                        <Button
                            x:Name="PrevPageButton"
                            Margin="5"
                            Padding="15,5"
                            Command="{Binding PrevPage}"
                            Content="上一页"/>
                        <TextBlock
                            Margin="5"
                            VerticalAlignment="Center"
                            Foreground="White"
                            Text="第" />
                        <TextBlock
                            Margin="5"
                            VerticalAlignment="Center"
                            Foreground="White"
                            Text="{Binding Current}" />
                        <TextBlock
                            Margin="5"
                            VerticalAlignment="Center"
                            Foreground="White"
                            Text="页" />
                        <TextBlock
                            VerticalAlignment="Center"
                            Foreground="White"
                            Text="共" />
                        <TextBlock
                            Margin="5"
                            VerticalAlignment="Center"
                            Foreground="White"
                            Text="{Binding Total}" />
                        <TextBlock
                            Margin="5"
                            VerticalAlignment="Center"
                            Foreground="White"
                            Text="页" />
                        <Button
                            x:Name="NextPageButton"
                            Margin="5"
                            Padding="15,5"
                            Command="{Binding NextPage}"
                            Content="下一页"  />
                        <Button
                            Margin="5"
                            Padding="15,5"
                            Command="{Binding LastPage}"
                            Content="尾页" />
                        <TextBlock
                            Margin="5"
                            VerticalAlignment="Center"
                            Foreground="White"
                            Text="跳转" />
                        <ComboBox
                            Margin="5"
                            VerticalContentAlignment="Center"
                            ItemsSource="{Binding SelectList}"
                            SelectedIndex="{Binding SelectedIndex}" />
                        <TextBlock
                            Margin="5"
                            VerticalAlignment="Center"
                            Foreground="White"
                            Text="每页" />
                        <ComboBox
                            Margin="5"
                            VerticalContentAlignment="Center"
                            ItemsSource="{Binding SplitCount}"
                            SelectedItem="{Binding CurrentSplit}" />
                        <TextBlock
                            Margin="5"
                            VerticalAlignment="Center"
                            Foreground="White"
                            Text="个数据" />
                    </WrapPanel>
                </StackPanel>
            </StackPanel>

            <StackPanel
                Width="1915"
                Height=" 90"
                HorizontalAlignment="Left"
                Background="#213269"
                Orientation="Horizontal">
                <StackPanel Orientation ="Horizontal" Width="1000">
                    <Image
                    Width="160"
                    Height="95"
                    Margin="0,0,0,0"
                    Source="../Resources/yadiLogo.png" />
                    <Label
                    Background="Transparent"
                    BorderThickness="0"
                    Width="400"
                    Height="55"
                    Margin="0"
                    Content="爱玛悬挂链"
                    FontSize="25"
                    Foreground="White"
                    HorizontalContentAlignment="Center"
                    VerticalContentAlignment="Center"/>
                    <Label
                    Name="lab_Title"
                    Background="Transparent"
                    BorderThickness="0"
                    Width="400"
                    Height="55"
                    Margin="0"
                    Content=""
                    FontSize="25"
                    Foreground="White"
                    HorizontalContentAlignment="Center"
                    VerticalContentAlignment="Center"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Margin="0,0,0,0" Width="920">
                    <Image
                    Width="40"
                    Height="40"
                    Margin="240,0,0,0"
                    Source="..\Resources\riqi.png" />
                    <Label
                    x:Name="LabDate"
                    Height="55"
                    Margin="25,0,0,0"
                    FontSize="30"
                        Width="255"
                    Foreground="White" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                    <Image
                    Width="40"
                    Height="40"
                    Margin="20,0,0,0"
                    Source="..\Resources\shijian.png" />
                    <Label
                    x:Name="LabTime"
                    Height="55"
                    Margin="20,0,0,0"
                    FontSize="30"
                        Width="170"
                    Foreground="White" VerticalContentAlignment="Center" HorizontalContentAlignment="Center"/>
                </StackPanel>
            </StackPanel>

            <StackPanel
                x:Name="PanelMenuPanel"
                Width="150"
                Height="970"
                Margin="0,110,0,0"
                HorizontalAlignment="Left">
                <Button
                    x:Name="BtnUp"
                    Width="150"
                    Height="100"
                    Click="BtnUpMenu_Click"
                    FontSize="18"
                    Foreground="White"
                    IsCancel="True"
                    Style="{StaticResource CustomButtonStyle}">
                    <StackPanel Orientation="Horizontal">
                        <Image
                            x:Name="imgshangjiancaouzo"
                            Width="40"
                            Height="40"
                            Margin="0,0,0,0"
                            Source="..\Resources\kucun1.png" />
                        <TextBlock VerticalAlignment="Center"><Run Text="上件操作" /></TextBlock>
                    </StackPanel>

                </Button>
                <Button 
                    x:Name="BtnWareHouseXX" 
                    Height="100" Width="150"
                    Style="{StaticResource CustomButtonStyle}" 
                    Foreground="White" FontSize="18" IsCancel="True"
                    Click="BtnPlcMessage_Click">
                    <StackPanel 
                        Orientation="Horizontal">
                        <Image
                            x:Name="imgPlcMessage" Source="..\Resources\caozuo.png" 
                            Height="40"
                            Width="40" 
                            Margin="0,0,0,0" />
                        <TextBlock 
                            VerticalAlignment="Center"><Run Text="PLC信息看板"/></TextBlock>
                    </StackPanel>

                </Button>

            </StackPanel>

            <StackPanel
                Canvas.Top="980"
                Width="150"
                Height="100">
                <Button
                    Width="150"
                    Height="100"
                    Click="btnExit_Click"
                    Focusable="False"
                    FontSize="18"
                    Foreground="White"
                    Style="{StaticResource CustomButtonStyle}">
                    <StackPanel Orientation="Horizontal">
                        <Image
                            x:Name="imgtc"
                            Width="40"
                            Height="40"
                            Margin="0,0,0,0"
                            Source="..\Resources\tuichu.png" />
                        <TextBlock VerticalAlignment="Center"><Run Text="退出" /></TextBlock>
                    </StackPanel>
                </Button>
            </StackPanel>
            <StackPanel
                x:Name="InventoryAreaDownMessage"
                Width="1740"
                Height="80"
                Margin="176,1000,0,0">
                <StackPanel
                    Width=" 30"
                    Height="30"
                    Margin="-720,0,0,0"
                    Background="LawnGreen" Visibility="Collapsed" />
                <StackPanel
                    Width=" 30"
                    Height="30"
                    Margin="-380,-30,0,0"
                    Background="Blue" Visibility="Collapsed"/>
                <StackPanel
                    Width=" 30"
                    Height="30"
                    Margin="-40,-30,0,0"
                    Background="Red" Visibility="Collapsed"/>
                <StackPanel
                    Width=" 30"
                    Height="30"
                    Margin="340,-30,0,0"
                    Background="Purple" Visibility="Collapsed"/>
                <StackPanel
                    Width=" 30"
                    Height="30"
                    Margin="610,-30,0,0"
                    Background="Pink" Visibility="Collapsed"/>
                <Label
                    Width="1500"
                    Height="60"
                    Margin="0,-40,0,0"
                    HorizontalAlignment="Left"
                    Content="                                                           :入库中        :已入库        :正在出库       :倒库        :下件返回库里"
                    FontSize="30px"
                    Foreground="White" Visibility="Collapsed" />
                <Label
                    x:Name="MaterielNum"
                    Width="1700"
                    Height="80"
                    Margin="0,-2,0,0"
                    HorizontalAlignment="Left"
                    Content=" "
                    FontSize="16px"
                    Foreground="White" />
            </StackPanel>
            
            <!--  plc信息面板 -->
            <StackPanel x:Name="splPlcMessage" Height="890" Width="1745"  Background="#213269" Canvas.Left="175" Canvas.Top="110" Visibility="Hidden" Orientation="Horizontal">
                <StackPanel Orientation="Horizontal">
                    <StackPanel Orientation="Vertical" Margin="20,5,0,0">
                        <StackPanel Orientation="Horizontal" Margin="0">
                            <Image
                            x:Name="img_plcmesssage"
                            Width="40"
                            Height="35"
                            Margin="60,0,0,0"
                            Source="..\Resources\chanpintiaoma.png" Visibility="Visible"/>
                            <Label Content="PLC交互信息" Foreground="White" FontSize="20" Width="150" Height="40" Margin="10,0,80,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                        </StackPanel>
                        <Border Background="#213269" BorderBrush="Silver" BorderThickness="2" CornerRadius="10" Width="570" Margin="0,5,0,0">
                            <StackPanel Height="465"  Width="570">
                                <StackPanel Orientation="Horizontal" Height="65">
                                    <Label Content="交互点" Foreground="White" FontSize="15" Width="60" Height="60" Margin="50,0,80,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                    <Label Content="载具号" Foreground="White" FontSize="10" Width="60" Height="60" Margin="-20,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                    <Label Content="PLC到位" Foreground="White" FontSize="10" Width="60" Height="60" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                    <Label Content="PLC处理状态" Foreground="White" FontSize="10" Width="80" Height="60" Margin="-10,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                    <Label Content="小车去向" Foreground="White" FontSize="10" Width="60" Height="60" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                    <Label Content="WCS处理状态" Foreground="White" FontSize="10" Width="80" Height="60" Margin="-10,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Height="65">
                                    <Label Content="K48" Foreground="White"  FontSize="20" Width="100" Height="50" Margin="30,0,60,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                    <TextBox Text="0" x:Name="tbxK48XCID"  FontSize="15" Width="60" Height="50" Margin="-20,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK48GJDW"  FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK48CLZT"  FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK48XCQX"  FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  MaxLength="3" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK48WCSCLZT"  FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"   Style="{StaticResource tbxStyle}" MaxLength="1"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Height="65">
                                    <Label Content="K46" Foreground="White"  FontSize="20" Width="100" Height="50" Margin="30,0,60,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                    <TextBox Text="0" x:Name="tbxK46XCID"   FontSize="15" Width="60" Height="50" Margin="-20,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK46GJDW"   FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK46CLZT"   FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK46XCQX"   FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  MaxLength="3" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK46WCSCLZT"   FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"   MaxLength="1" Style="{StaticResource tbxStyle}"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Height="65">
                                    <Label Content="K22" Foreground="White" FontSize="20" Width="100" Height="50" Margin="30,0,60,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                    <TextBox Text="0" x:Name="tbxK22XCID"   FontSize="15" Width="60" Height="50"  Margin="-20,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK22GJDW"   FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}" />
                                    <TextBox Text="0" x:Name="tbxK22CLZT"   FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK22XCQX"   FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  MaxLength="3" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK22WCSCLZT"   FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"   MaxLength="1" Style="{StaticResource tbxStyle}"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Height="65">
                                    <Label Content="K18" Foreground="White"  FontSize="20" Width="100" Height="50" Margin="30,0,60,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                    <TextBox Text="0" x:Name="tbxK18XCID"  FontSize="15" Width="60" Height="50"  Margin="-20,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK18GJDW"  FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK18CLZT"   FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK18XCQX"   FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"   MaxLength="3" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK18WCSCLZT"  FontSize="15" Width="60" Height="50" Margin="0,0,10,0"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  MaxLength="1" Style="{StaticResource tbxStyle}"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Height="65">
                                    <Label Content="K07"  Foreground="White" FontSize="20" Width="100" Height="50" Margin="30,0,60,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                    <TextBox Text="0" x:Name="tbxK07XCID"   FontSize="15" Width="60" Height="50" Margin="-20,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True"  Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK07GJDW"   FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK07CLZT"   FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK07XCQX" FontSize="15" Width="60" Height="50" Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  MaxLength="3" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK07WCSCLZT"   FontSize="15" Width="60" Height="50"  Margin="0,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  MaxLength="1" Style="{StaticResource tbxStyle}"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Height="65">
                                    <Label Content="K02" Foreground="White" FontSize="20" Width="100" Height="50" Margin="30,0,60,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                    <TextBox Text="0" x:Name="tbxK02XCID"  FontSize="15" Width="60" Height="50" Margin="-20,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}" />
                                    <TextBox Text="0" x:Name="tbxK02GJDW"  FontSize="15" Width="60" Height="50" Margin="0,0,10,0"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK02CLZT"  FontSize="15" Width="60" Height="50" Margin="0,0,10,0"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK02XCQX"  FontSize="15" Width="60" Height="50" Margin="0,0,10,0"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  MaxLength="3"  Style="{StaticResource tbxStyle}"/>
                                    <TextBox Text="0" x:Name="tbxK02WCSCLZT" FontSize="15" Width="60" Height="50" Margin="0,0,10,0"  HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  MaxLength="1" Style="{StaticResource tbxStyle}"/>
                                </StackPanel>
                            </StackPanel>
                        </Border>
                        <StackPanel Orientation="Vertical" Margin="0">
                            <Border Background="#213269" BorderBrush="Silver" BorderThickness="2" CornerRadius="10" Width="570" Margin="0,5,0,0">
                                <StackPanel Height="350"  Width="400" Margin="0,0,0,0">
                                    <StackPanel Orientation="Horizontal" Height="65">
                                        <Label Content="物料信息交互点" Foreground="White" FontSize="15" Width="125" Height="60" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                        <Label Content="车身长度" Foreground="White" FontSize="15" Width="70" Height="60" Margin="55,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                        <Label Content="PLC处理状态" Foreground="White" FontSize="15" Width="110" Height="60" Margin="10,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal" Height="65">
                                        <Label Content="2号上件点(K46)" Foreground="White"  FontSize="15" Width="125" Height="60" Margin="30,0,50,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                        <TextBox Text="0" x:Name="tbxK48WriteMaterial"  FontSize="15" Width="60" Height="50" Margin="10,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                        <TextBox Text="0" x:Name="tbxK48WriteMaterialPlc"  FontSize="15" Width="60" Height="50" Margin="40,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal" Height="65">
                                        <Label Content="1号上件点(K48)" Foreground="White"  FontSize="15" Width="125" Height="60" Margin="30,0,50,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                        <TextBox Text="0" x:Name="tbxK46WriteMaterial"  FontSize="15" Width="60" Height="50" Margin="10,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                        <TextBox Text="0" x:Name="tbxK46WriteMaterialPlc"  FontSize="15" Width="60" Height="50" Margin="40,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal" Height="65">
                                        <Label Content="1线下件点(K07)" Foreground="White"  FontSize="15" Width="125" Height="60" Margin="30,0,50,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                        <TextBox Text="0" x:Name="tbxK07WriteMaterial"  FontSize="15" Width="60" Height="50" Margin="10,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                        <TextBox Text="0" x:Name="tbxK07WriteMaterialPlc"  FontSize="15" Width="60" Height="50" Margin="40,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal" Height="65">
                                        <Label Content="2线下件点(K02)" Foreground="White"  FontSize="15" Width="125" Height="60" Margin="30,0,50,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                        <TextBox Text="0" x:Name="tbxK02WriteMaterial"  FontSize="15" Width="60" Height="50" Margin="10,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                        <TextBox Text="0" x:Name="tbxK02WriteMaterialPlc"  FontSize="15" Width="60" Height="50" Margin="40,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}"/>
                                    </StackPanel>
                                </StackPanel>
                            </Border>
                        </StackPanel>
                    </StackPanel>
                    <StackPanel Orientation="Vertical"  Margin="20,10,0,0">
                        <StackPanel Orientation="Horizontal" >
                            <Image
                            x:Name="img_plccaozuo"
                            Width="40"
                            Height="35"
                            Margin="60,0,0,0"
                            Source="..\Resources\zaijudaoweizhuangtai.png" Visibility="Visible" />
                            <Label Content="上件闸口人工操作" Foreground="White" FontSize="20" Width="180" Height="40" Margin="10,0,80,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                        </StackPanel>
                        <StackPanel Height="150">
                            <Border Background="#213269" BorderBrush="Silver" BorderThickness="2" CornerRadius="10" Height="150" Width="570" Margin="0,0,0,0">
                                <StackPanel Height="255"  Width="570" HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <StackPanel Orientation="Horizontal" Height="75" Width="565"  HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,55,0,0">
                                        <Label Content="K46电气状态" Foreground="White" FontSize="20" Width="300" Height="60" Margin="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                        <TextBox Text="" x:Name="tbx_K46State"  FontSize="20" Width="150" Height="50" Margin="5,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}" />
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal" Height="75" Width="565">
                                        <Label Content="K48电气状态" Foreground="White" FontSize="20" Width="300" Height="60" Margin="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                        <TextBox Text="" x:Name="tbx_K48State"  FontSize="20" Width="150" Height="50" Margin="5,0,10,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True" Style="{StaticResource tbxStyle}" />
                                    </StackPanel>
                                </StackPanel>
                            </Border>
                        </StackPanel>
                        <StackPanel x:Name="spl_sunhuaizhakoumianban" >
                            <Border  Background="#213269" BorderBrush="Silver" BorderThickness="2" CornerRadius="10" Width="570" Margin="0,5,0,0">
                                <StackPanel Height="255"  Width="570" HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <StackPanel Orientation="Horizontal" Height="75" Width="565"  HorizontalAlignment="Center" VerticalAlignment="Center">
                                        <Label x:Name="lab_shangjiandianzhuangtai" Content="" Foreground="White" FontSize="30" Width="570" Height="60" Margin="0,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal" Height="75" Name="spl_sunhuaizhakouquxiang" Visibility="Visible">
                                        <Label Content="上件维护损坏后K22走向设置 :" Foreground="White"  FontSize="20" Width="290" Height="50" Margin="10,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                                        <Button  Width="90" Height="55" VerticalAlignment="Center"  Foreground="White" FontSize="25"  Style="{StaticResource qingkongButton}" Margin="20,0,0,0" Visibility="Visible" Click="Btn_K22QuXiang1_Click">
                                            <TextBlock x:Name="Btn_K22QuXiang1" Text="直通1"/>
                                        </Button>
                                        <Button Width="90" Height="55" VerticalAlignment="Center"  Foreground="White" FontSize="25"  Style="{StaticResource qingkongButton}" Margin="40,0,0,0" Visibility="Visible" Click ="Btn_K22QuXiang2_Click">
                                            <TextBlock x:Name="Btn_K22QuXiang2" Text="弯通2"/>
                                        </Button>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal" Height="75">
                                        <Button  Width="155" Height="55" VerticalAlignment="Center"  Foreground="White" FontSize="25"  Style="{StaticResource jinggaoButton}" Margin="60,0,0,0" Visibility="Visible" Click="Btn_shangjiansunhuai_Click">
                                            <TextBlock x:Name="Btn_shangjiansunhuai" Text="上件损坏确认"/>
                                        </Button>
                                        <Button Width="155" Height="55" VerticalAlignment="Center"  Foreground="White" FontSize="25"  Style="{StaticResource chaxunButton}" Margin="150,0,0,0" Visibility="Visible" Click ="Btn_shangjianweixiu_click">
                                            <TextBlock x:Name="Btn_shangjianweixiu" Text="上件维修确认"/>
                                        </Button>
                                    </StackPanel>
                                </StackPanel>
                            </Border>
                        </StackPanel>
                    </StackPanel>
                    <StackPanel Orientation="Vertical"  Margin="20,5,0,0" Width="540">
  
                        <StackPanel Orientation="Horizontal" >
                            <Image
                                Width="40"
                                Height="35"
                                Margin="60,0,0,0"
                                Source="..\Resources\kucun.png" Visibility="Visible" />
                            <Label Content="订单状态重置" Foreground="White" FontSize="20" Width="180" Height="40" Margin="10,0,0,0" HorizontalContentAlignment="Left" VerticalContentAlignment="Center"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" >
                            <Border  Background="#213269" BorderBrush="Silver" BorderThickness="2" CornerRadius="10" Width="530" Margin="0,5,0,0">
                                <StackPanel Orientation="Vertical" >
                                    <StackPanel Orientation="Horizontal" >
                                        <Label Content="上线挂具号 :" 
                                           Foreground="White" 
                                           FontSize="20" 
                                           Width="150" 
                                           Height="60" 
                                           Margin="10,0,20,0" 
                                           HorizontalContentAlignment="Center" 
                                           VerticalContentAlignment="Center"/>
                                        <TextBox 
                                            x:Name="tbx_JieBangByCarNo"  
                                            FontSize="20" 
                                            Width="100" 
                                            Height="45" 
                                            Margin="5,0,0,0" 
                                            HorizontalContentAlignment="Center" 
                                            VerticalContentAlignment="Center" 
                                            IsReadOnly="False" 
                                            Style="{StaticResource tbxStyle}" />
                                        <Button  Width="80" Height="45" VerticalAlignment="Center"  Foreground="White" FontSize="20"  Style="{StaticResource chaxunButton}" Margin="30,0,0,0" Visibility="Visible" Click="Btn_ChaXunByCarNo_Click">
                                            <TextBlock x:Name="Btn_ChaXunByCarNo" Text="查询"/>
                                        </Button>
                                        <Button  Width="80" Height="45" VerticalAlignment="Center"  Foreground="White" FontSize="20"  Style="{StaticResource qingkongButton}" Margin="30,0,0,0" Visibility="Visible" Click="Btn_ChaXunByCarNoClear_Click">
                                            <TextBlock x:Name="Btn_ChaXunByCarNoClear" Text="清空"/>
                                        </Button>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal" >
                                        <Label Content="对应Vin条码 :" 
                                               Foreground="White" 
                                               FontSize="20" 
                                               Width="150" 
                                               Height="60" 
                                               Margin="10,0,20,0" 
                                               HorizontalContentAlignment="Center" 
                                               VerticalContentAlignment="Center"/>
                                        <TextBox x:Name="tbx_JieBangByVin"                                              
                                                FontSize="20" 
                                                Width="220" 
                                                Height="45" 
                                                Margin="5,0,0,0" 
                                                HorizontalContentAlignment="Center" 
                                                VerticalContentAlignment="Center" 
                                                IsReadOnly="True" 
                                                Style="{StaticResource tbxStyle}" />
                                        <Button  Width="90" Height="45" VerticalAlignment="Center"  Foreground="White" FontSize="20"  Style="{StaticResource ClearOrderButton}" Margin="15,0,0,0" Visibility="Visible" Click="Btn_JieBangByCarNo_Click">
                                            <TextBlock x:Name="Btn_JieBangByCarNo" Text="解绑重置"/>
                                        </Button>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal" >
                                        <Label Content="一键重置所有订单、挂具状态  >>>" 
                                           Foreground="White" 
                                           FontSize="20" 
                                           Width="350" 
                                           Height="60" 
                                           Margin="10,0,0,0" 
                                           HorizontalContentAlignment="Center" 
                                           VerticalContentAlignment="Center"/>
                                        <Button  Width="130" Height="45" VerticalAlignment="Center"  Foreground="White" FontSize="20"  Style="{StaticResource jinggaoButton}" Margin="15,0,0,0" Visibility="Visible" Click="Btn_JieBangAll_Click">
                                            <TextBlock x:Name="Btn_JieBangAll" Text="一键重置"/>
                                        </Button>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal" >
                                        <Label Content="--->注:携带物料挂具解绑重置后视为空车,从下件返回!" 
                                           Foreground="Orange" 
                                           FontSize="20" 
                                           Width="525" 
                                           Height="55" 
                                           Margin="0" 
                                           HorizontalContentAlignment="Center" 
                                           VerticalContentAlignment="Center"/>
                                    </StackPanel>
                                </StackPanel>
                            </Border>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
            </StackPanel>
        </Canvas>
    </Viewbox>
</Window>
