WinMain.xaml 8.53 KB
<win:BaseWindow
    xmlns:win="clr-namespace:HHECS.View.Win"
    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:model ="clr-namespace:HHECS.Model.Entities;assembly=HHECS.Model"
        x:Class="HHECS.View.WinMain"
    mc:Ignorable="d"
        Title="华恒ECS" Loaded="Window_Loaded" Closed="Window_Closed" Background="#FF293955">

    <DockPanel>
        <Menu x:Name="MenuMain" DockPanel.Dock="Top" MenuItem.Click="MenuMain_Checked" Background="#FFD6DBE9">
            <Menu.ItemTemplate>
                <HierarchicalDataTemplate DataType="{x:Type model:MenuOperation}" ItemsSource="{Binding Children}">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding MenuName}"/>
                    </StackPanel>
                </HierarchicalDataTemplate>
            </Menu.ItemTemplate>
        </Menu>
        <ToolBar DockPanel.Dock="Top" Background="#FFCFD6E5" FontSize="12">
            <Button x:Name="Btn_LED" Click="Btn_LED_Click" Content="测试LED" Visibility="Collapsed"/>
            <Button x:Name="Btn_ReConnectWMS" Click="Btn_ReConnectWMS_Click"  Content="连接WMS"/>
            <Button x:Name="Btn_BeginExcute" Click="Btn_BeginExcute_Click" Content="开始处理"/>
            <Button x:Name="Btn_EndExcute" Click="Btn_EndExcute_Click" IsEnabled="False" Content="停止处理"/>
            <Button x:Name="Btn_GoBack" Click="Btn_GoBack_Click" Background="AliceBlue" Content="拣选台回库" Visibility="Collapsed" />
        </ToolBar>

        <StatusBar DockPanel.Dock="Bottom" Background="#FF007ACC">
            <Label x:Name="Lab1" Foreground="White"/>
        </StatusBar>
        <Grid>
            <TabControl >
                <TabItem Header="主页">
                    <Grid x:Name="GridMain" >
                        <Grid.RowDefinitions>
                            <RowDefinition Height="35"/>
                            <RowDefinition Height="30*"/>
                            <RowDefinition Height="30*"/>
                            <RowDefinition Height="40*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="30*"/>
                            <ColumnDefinition Width="70*"/>
                        </Grid.ColumnDefinitions>
                        <Viewbox  Grid.Column="0" Grid.ColumnSpan="2">
                            <TextBlock Text="WCS 监 控" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" FontWeight="Bold"/>
                        </Viewbox>
                        <Grid Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0">
                            <!--<Grid.ColumnDefinitions>
                                <ColumnDefinition Width="20*" ></ColumnDefinition>
                                <ColumnDefinition Width="60*"></ColumnDefinition>
                                <ColumnDefinition Width="20*"></ColumnDefinition>
                            </Grid.ColumnDefinitions>-->

                            <ScrollViewer x:Name="StockerView1" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" Margin="0,0,440,0">
                                <StackPanel x:Name="MonitorPanel1" Orientation="Horizontal" MaxHeight="200"/>
                            </ScrollViewer>

                            <ScrollViewer x:Name="StockerView" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" Margin="201,0,0,0">
                                <StackPanel x:Name="MonitorPanel"   Height="135"  />
                            </ScrollViewer>
                        </Grid>
                        <GridSplitter BorderThickness="5"/>
                        <Grid Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3">
                            <Border BorderBrush="SteelBlue" BorderThickness="0,0,1,0">
                                <ScrollViewer ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto">
                                    <StackPanel x:Name="SPMain" HorizontalAlignment="Left" VerticalAlignment="Top"  Orientation="Horizontal" >
                                        <DataGrid x:Name="DGStation" IsReadOnly="True" Height="{Binding Height, ElementName=SPMain}">
                                            <!--<DataGrid.RowDetailsTemplate>
                                                
                                            </DataGrid.RowDetailsTemplate>-->
                                            <DataGrid.Columns>
                                                <DataGridTextColumn Header="站台名" Binding="{Binding Name}"/>
                                                <DataGridTextColumn Header="报文类型" Binding="{Binding Type}"/>
                                                <DataGridTextColumn Header="输送线编号" Binding="{Binding StationNo}"/>
                                                <DataGridTextColumn Header="请求-装载" Binding="{Binding LoadStatus}"/>
                                                <DataGridTextColumn Header="请求-货物ID" Binding="{Binding TaskNo}"/>
                                                <DataGridTextColumn Header="请求-条码" Binding="{Binding Barcode}"/>
                                                <DataGridTextColumn Header="请求-重量" Binding="{Binding Weight}"/>
                                                <DataGridTextColumn Header="请求-长度" Binding="{Binding Length}"/>
                                                <DataGridTextColumn Header="请求-宽度" Binding="{Binding Width}"/>
                                                <DataGridTextColumn Header="请求-高度" Binding="{Binding Height}"/>
                                                <DataGridTextColumn Header="请求-条码" Binding="{Binding Barcode}"/>

                                                <DataGridTextColumn Header="报文类型" Binding="{Binding WCSType}"/>
                                                <DataGridTextColumn Header="输送线编号" Binding="{Binding WCSStationNo}"/>
                                                <DataGridTextColumn Header="请求回复-装载" Binding="{Binding WCSLoadStatus}"/>
                                                <DataGridTextColumn Header="请求回复-条码" Binding="{Binding WCSBarcode}"/>
                                                <DataGridTextColumn Header="请求回复-货物ID" Binding="{Binding WCSTaskNo}"/>
                                                <DataGridTextColumn Header="请求回复-目的地" Binding="{Binding WCSToAddress}"/>


                                                <DataGridTextColumn Header="到达-报文" Binding="{Binding ArriveMessage}"/>
                                                <DataGridTextColumn Header="到达-结果" Binding="{Binding ArriveResult}"/>
                                                <DataGridTextColumn Header="到达-读码器" Binding="{Binding ArriveRealAddress}"/>
                                                <DataGridTextColumn Header="到达-分配地址" Binding="{Binding ArriveAllcationAddress}"/>
                                                <DataGridTextColumn Header="到达-条码" Binding="{Binding ArriveBarcode}"/>
                                                <DataGridTextColumn Header="ACK回复-报文" Binding="{Binding WCSACKMessage}"/>
                                                <DataGridTextColumn Header="ACK回复-装载" Binding="{Binding WCSACKLoadStatus}"/>
                                                <DataGridTextColumn Header="ACK回复-读码器" Binding="{Binding WCSACKNumber}"/>
                                            </DataGrid.Columns>
                                        </DataGrid>
                                    </StackPanel>
                                </ScrollViewer>
                            </Border>
                        </Grid>
                        <Viewbox HorizontalAlignment="Left" Grid.Row="3" Grid.ColumnSpan="2" VerticalAlignment="Top">
                            <StackPanel x:Name="EquipmentPanel" HorizontalAlignment="Left" VerticalAlignment="Top"  Orientation="Horizontal" />
                        </Viewbox>
                    </Grid>
                </TabItem>
            </TabControl>
        </Grid>
    </DockPanel>

</win:BaseWindow>