|
|
|
|
|
<Window x:Class="Sln.Wcs.UI.MainWindow"
|
|
|
|
|
|
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:Sln.Wcs.UI"
|
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
|
Title="WCS调度平台"
|
|
|
|
|
|
Height="868" Width="1424"
|
|
|
|
|
|
ResizeMode="NoResize"
|
|
|
|
|
|
WindowStartupLocation="CenterScreen">
|
|
|
|
|
|
|
|
|
|
|
|
<Window.Resources>
|
|
|
|
|
|
<!-- 顶栏按钮:圆角、白字(配色参考组态设计平台) -->
|
|
|
|
|
|
<Style x:Key="TopBarBtnBase" TargetType="Button">
|
|
|
|
|
|
<Setter Property="Foreground" Value="White"/>
|
|
|
|
|
|
<Setter Property="FontSize" Value="14"/>
|
|
|
|
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
|
|
|
|
<Setter Property="Padding" Value="22,8"/>
|
|
|
|
|
|
<Setter Property="Margin" Value="8,0,0,0"/>
|
|
|
|
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
|
|
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
<Style x:Key="TopBarBtnBlue" TargetType="Button" BasedOn="{StaticResource TopBarBtnBase}">
|
|
|
|
|
|
<Setter Property="Background" Value="#2196F3"/>
|
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
|
|
|
<Border x:Name="border" Background="{TemplateBinding Background}" CornerRadius="6" Padding="{TemplateBinding Padding}">
|
|
|
|
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
|
<Setter TargetName="border" Property="Background" Value="#42A5F5"/>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
<Trigger Property="IsPressed" Value="True">
|
|
|
|
|
|
<Setter TargetName="border" Property="Background" Value="#1976D2"/>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
<Style x:Key="TopBarBtnRed" TargetType="Button" BasedOn="{StaticResource TopBarBtnBase}">
|
|
|
|
|
|
<Setter Property="Background" Value="#E53935"/>
|
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
|
|
|
<Border x:Name="border" Background="{TemplateBinding Background}" CornerRadius="6" Padding="{TemplateBinding Padding}">
|
|
|
|
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
|
<Setter TargetName="border" Property="Background" Value="#EF5350"/>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
<Trigger Property="IsPressed" Value="True">
|
|
|
|
|
|
<Setter TargetName="border" Property="Background" Value="#C62828"/>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 基础信息下拉按钮样式 -->
|
|
|
|
|
|
<Style x:Key="TopBarBtnPurple" TargetType="ToggleButton">
|
|
|
|
|
|
<Setter Property="Background" Value="#7E57C2"/>
|
|
|
|
|
|
<Setter Property="Foreground" Value="White"/>
|
|
|
|
|
|
<Setter Property="FontSize" Value="14"/>
|
|
|
|
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
|
|
|
|
<Setter Property="Padding" Value="22,8"/>
|
|
|
|
|
|
<Setter Property="Margin" Value="8,0,0,0"/>
|
|
|
|
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
|
|
|
|
<Border x:Name="border" Background="{TemplateBinding Background}" CornerRadius="6" Padding="{TemplateBinding Padding}">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<ContentPresenter VerticalAlignment="Center"/>
|
|
|
|
|
|
<TextBlock x:Name="arrow" Text="▼" FontSize="9" Margin="8,0,0,0" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
|
|
|
|
|
|
<TextBlock.RenderTransform>
|
|
|
|
|
|
<RotateTransform x:Name="arrowTransform" Angle="0"/>
|
|
|
|
|
|
</TextBlock.RenderTransform>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
|
<Setter TargetName="border" Property="Background" Value="#9575CD"/>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
<Trigger Property="IsChecked" Value="True">
|
|
|
|
|
|
<Setter TargetName="border" Property="Background" Value="#5E35B1"/>
|
|
|
|
|
|
<Setter TargetName="arrow" Property="RenderTransform">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<RotateTransform Angle="180"/>
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 下拉菜单项按钮样式 -->
|
|
|
|
|
|
<Style x:Key="DropMenuItemStyle" TargetType="Button">
|
|
|
|
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
|
|
|
|
<Setter Property="Foreground" Value="#E0E0E0"/>
|
|
|
|
|
|
<Setter Property="FontSize" Value="14"/>
|
|
|
|
|
|
<Setter Property="Padding" Value="18,12"/>
|
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
|
|
|
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
|
|
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
|
|
|
<Border x:Name="border" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
|
|
|
|
|
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
|
<Setter TargetName="border" Property="Background" Value="#3D3D5C"/>
|
|
|
|
|
|
<Setter Property="Foreground" Value="White"/>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Window.Resources>
|
|
|
|
|
|
|
|
|
|
|
|
<Grid Background="#0A0A12">
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
|
<!-- 顶部区域:Banner + 菜单 -->
|
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
|
<!-- 主内容区域 -->
|
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 顶部区域(深蓝黑顶栏 + 白字标题 + 底部高亮分隔线) -->
|
|
|
|
|
|
<Border Grid.Row="0" Background="#050510" Padding="18,14" BorderBrush="#3A3A4A" BorderThickness="0,0,0,2">
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
|
|
|
|
|
|
<Border Width="5" Height="28" Background="#2196F3" CornerRadius="3" Margin="0,0,12,0"/>
|
|
|
|
|
|
<TextBlock Text="WCS 智能调度平台" FontSize="22" FontWeight="Bold" Foreground="White" VerticalAlignment="Center"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
|
|
|
|
|
|
<Button Content="首页" Style="{StaticResource TopBarBtnBlue}" Click="BtnHome_Click"/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 基础信息下拉菜单 -->
|
|
|
|
|
|
<Grid x:Name="BasicInfoMenu" Margin="8,0,0,0">
|
|
|
|
|
|
<ToggleButton x:Name="BtnBasicInfo" Content="基础信息" Style="{StaticResource TopBarBtnPurple}"/>
|
|
|
|
|
|
<Popup x:Name="DropPanelPopup"
|
|
|
|
|
|
PlacementTarget="{Binding ElementName=BtnBasicInfo}"
|
|
|
|
|
|
Placement="Bottom"
|
|
|
|
|
|
HorizontalOffset="-10"
|
|
|
|
|
|
VerticalOffset="4"
|
|
|
|
|
|
StaysOpen="False"
|
|
|
|
|
|
AllowsTransparency="True"
|
|
|
|
|
|
PopupAnimation="None"
|
|
|
|
|
|
MouseLeave="DropPanel_MouseLeave">
|
|
|
|
|
|
<Border x:Name="DropPanel" Width="160" Background="#1A1A2E" BorderBrush="#3A3A4A" BorderThickness="1" CornerRadius="8" Margin="0,8,0,0">
|
|
|
|
|
|
<Border.Effect>
|
|
|
|
|
|
<DropShadowEffect Color="#000000" BlurRadius="20" ShadowDepth="0" Opacity="0.5"/>
|
|
|
|
|
|
</Border.Effect>
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<Button Content="设备信息" Style="{StaticResource DropMenuItemStyle}" Click="BtnDeviceInfo_Click"/>
|
|
|
|
|
|
<Button Content="物料信息" Style="{StaticResource DropMenuItemStyle}" Click="BtnMaterialInfo_Click"/>
|
|
|
|
|
|
<Button Content="仓库信息" Style="{StaticResource DropMenuItemStyle}" Click="BtnWarehouseInfo_Click"/>
|
|
|
|
|
|
<Button Content="库位信息" Style="{StaticResource DropMenuItemStyle}" Click="BtnLocationInfo_Click" BorderBrush="#3A3A4A" BorderThickness="0,0,0,1"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</Popup>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
|
|
<Button Content="关闭" Style="{StaticResource TopBarBtnRed}" Click="BtnExit_Click"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 主内容区域(独立画布面板 + 外发光阴影) -->
|
|
|
|
|
|
<Border Grid.Row="1" Margin="14" Background="#0D0D18" BorderBrush="#2A2A35" BorderThickness="1" CornerRadius="4">
|
|
|
|
|
|
<Border.Effect>
|
|
|
|
|
|
<DropShadowEffect Color="#000000" BlurRadius="20" ShadowDepth="0" Opacity="0.6"/>
|
|
|
|
|
|
</Border.Effect>
|
|
|
|
|
|
<ContentControl x:Name="MainContent"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Window>
|