Frm_Main.xaml 8.25 KB
<Window x:Class="HHWCSHost.View.Frm_Main"
        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:HHWCSHost.View"
        xmlns:controls="clr-namespace:HHWCSHost.Controls"
        mc:Ignorable="d"
        Title="华恒WCS管理系统" Height="774.94" Width="1732.415" Closed="Window_Closed" Background="#FF293955">
    <DockPanel>
        <Menu x:Name="menu" DockPanel.Dock="Top" Background="#FFD6DBE9"></Menu>
        <ToolBar DockPanel.Dock="Top" Background="#FFCFD6E5">
            <Button x:Name="btn_OpenPLCConnect" Click="btn_OpenPLCConnect_Click" >打开监控</Button>
            <Button x:Name="btn_ClosePLCConnect" Click="btn_ClosePLCConnect_Click">关闭监控</Button>
            <Button x:Name="btn_UpdateTask" Click="btn_UpdateTask_Click">测试时钟</Button>
        </ToolBar>
        <StatusBar x:Name="statusBar" DockPanel.Dock="Bottom" Height="20" Background="#FF007ACC" Foreground="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"/>
        <TabControl>
            <TabItem Header="主页">
                <Grid x:Name="grid">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="50"></RowDefinition>
                        <RowDefinition Height="130"></RowDefinition>
                        <RowDefinition Height="130"></RowDefinition>
                        <RowDefinition Height="*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="35*"></ColumnDefinition>
                        <ColumnDefinition Width="35*"></ColumnDefinition>
                        <ColumnDefinition Width="20*"></ColumnDefinition>
                        <ColumnDefinition Width="20*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Row="0" Grid.ColumnSpan="4" TextWrapping="Wrap" Text="主 监 控 画 面" FontWeight="Bold" FontSize="24" TextAlignment="Center" VerticalAlignment="Center"/>

                    <!--<DockPanel Grid.Row="1" Grid.Column="2" Grid.RowSpan="2" Grid.ColumnSpan="2" Margin="5,5">
                        <TextBlock Text="任务列表" DockPanel.Dock="Top" HorizontalAlignment="Center" FontSize="14" FontWeight="Bold"/>
                        <DataGrid x:Name="dgv_1" Grid.Column="1" AutoGenerateColumns="False" IsReadOnly="True" >
                            <DataGrid.Columns>
                                <DataGridTextColumn Header="任务号" Binding="{Binding Id}"/>
                                <DataGridTextColumn Header="仓库" Binding="{Binding WarehouseCode}"/>
                                <DataGridTextColumn Header="优先级" Binding="{Binding Priority}"/>
                                <DataGridTextColumn Header="任务类型" Binding="{Binding Type}"/>
                                <DataGridTextColumn Header="站台" Binding="{Binding Station}"/>
                                <DataGridTextColumn Header="托盘号" Binding="{Binding ContainerCode}"/>
                                <DataGridTextColumn Header="源地址" Binding="{Binding SourceLocation}"/>
                                <DataGridTextColumn Header="目标地址" Binding="{Binding DestinationLocation}"/>
                                <DataGridTextColumn Header="状态" Binding="{Binding Status}"/>
                                <DataGridTextColumn Header="创建人" Binding="{Binding CreatedBy}"/>
                                <DataGridTextColumn Header="创建时间" Binding="{Binding Created}"/>
                                <DataGridTextColumn Header="最后更新时间" Binding="{Binding LastUpdatedBy}"/>
                            </DataGrid.Columns>
                        </DataGrid>
                    </DockPanel>-->
                    <ScrollViewer x:Name="scrolls" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4">
                        <StackPanel x:Name="panel_Bottom"  FlowDirection="LeftToRight" Orientation="Horizontal">

                        </StackPanel>
                    </ScrollViewer>
                    <Grid Grid.RowSpan="2" Grid.Column="2" Grid.Row="1"  Grid.ColumnSpan="2">
                        <Viewbox Stretch="Fill">
                            <Canvas Width="600" Height="280">
                                <controls:StationH x:Name="stationForStockerIn1" Height="64" Width="136" Canvas.Left="92" Canvas.Top="14"/>
                                <controls:StationH x:Name="stationForStockerOut1" Height="64" Width="136" Canvas.Left="92" Canvas.Top="183"/>
                                <controls:StationH Height="64" Width="136" Canvas.Left="233" Canvas.Top="14"/>
                                <controls:StationH Height="64" Width="136" Canvas.Left="233" Canvas.Top="183"/>
                                <controls:StationH x:Name="station1" Height="64" Width="136" Canvas.Left="374" Canvas.Top="14"/>
                                <controls:StationV Height="96" Width="64" Canvas.Left="243" Canvas.Top="81"/>
                                <Image Height="58" Canvas.Left="40" Canvas.Top="14" Width="52" Source="/HHWCSHost;component/Content/image/箭头.png"/>
                                <Image Height="58" Canvas.Left="38" Canvas.Top="183" Width="52" Source="/HHWCSHost;component/Content/image/箭头.png" RenderTransformOrigin="0.5,0.5">
                                    <Image.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform Angle="179.882"/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </Image.RenderTransform>
                                </Image>
                                <Image Height="58" Canvas.Left="328" Canvas.Top="96" Width="52" Source="/HHWCSHost;component/Content/image/箭头.png" RenderTransformOrigin="0.5,0.5">
                                    <Image.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform Angle="90.167"/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </Image.RenderTransform>
                                </Image>
                                <Image Height="58" Canvas.Left="515" Width="52" Source="/HHWCSHost;component/Content/image/箭头.png"/>
                                <Image Height="58" Canvas.Left="518" Canvas.Top="27" Width="52" Source="/HHWCSHost;component/Content/image/箭头.png" RenderTransformOrigin="0.5,0.5">
                                    <Image.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform Angle="179.882"/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </Image.RenderTransform>
                                </Image>
                            </Canvas>
                        </Viewbox>
                    </Grid>
                    <ScrollViewer x:Name="scrolls2" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Grid.RowSpan="2">
                        <StackPanel x:Name="panel_Stocker"  FlowDirection="LeftToRight" Orientation="Vertical">

                        </StackPanel>
                    </ScrollViewer>
                </Grid>
            </TabItem>
            <controls:StationV/>
        </TabControl>
    </DockPanel>
</Window>