123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- <Window x:Class="LampInspectionMachine.Views.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:LampInspectionMachine"
- xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:prism="http://prismlibrary.com/"
- prism:ViewModelLocator.AutoWireViewModel="True"
- mc:Ignorable="d"
- WindowStyle="None"
- Title="包装"
- Height="450"
- FontWeight="Bold"
- FontFamily="微软雅黑"
- MouseDoubleClick="Grid_MouseDown"
- SizeChanged="Window_SizeChanged"
- Width="800">
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="Loaded">
- <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
- </b:EventTrigger>
- <b:EventTrigger EventName="Closed">
- <b:InvokeCommandAction Command="{Binding ClosedCommand}" />
- </b:EventTrigger>
- </b:Interaction.Triggers>
- <WindowChrome.WindowChrome>
- <WindowChrome GlassFrameThickness="50"
- CaptionHeight="30"
- NonClientFrameEdges="Left,Bottom,Right"
- CornerRadius="20" />
- </WindowChrome.WindowChrome>
- <Window.Resources>
- <Style x:Key="buttonborder"
- TargetType="Border">
- <Setter Property="BorderThickness"
- Value="2" />
- <Setter Property="Background"
- Value="Transparent" />
- <Setter Property="VerticalAlignment"
- Value="Center" />
- <Setter Property="BorderBrush"
- Value="White" />
- <Setter Property="CornerRadius"
- Value="5" />
- <Setter Property="Effect">
- <Setter.Value>
- <DropShadowEffect BlurRadius="10"
- Direction="0"
- ShadowDepth="0"
- Color="#D4D8DD" />
- </Setter.Value>
- </Setter>
- </Style>
- </Window.Resources>
- <Border BorderBrush="AliceBlue"
- BorderThickness="2"
- Margin="10"
- CornerRadius="10">
- <Border.Background>
- <LinearGradientBrush>
- <GradientStop Color="#95DDFD"
- Offset="0" />
- <GradientStop Color="#97B8FF"
- Offset="0.4" />
- <GradientStop Color="#2961AC"
- Offset="0.9" />
- </LinearGradientBrush>
- </Border.Background>
- <Grid Background="White"
- Opacity="0.8">
- <Grid.RowDefinitions>
- <RowDefinition Height="70" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid Grid.Row="0"
- VerticalAlignment="Center">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="灯检"
- FontSize="26"
- Margin="30,20,0,0"
- FontWeight="Bold" />
- </StackPanel>
- <StackPanel Orientation="Horizontal"
- VerticalAlignment="Top"
- Height="65"
- HorizontalAlignment="Right">
- <TextBlock Text="当前时间:"
- FontSize="16"
- Margin="5,5,5,10"
- VerticalAlignment="Bottom" />
- <TextBlock Text="2025-10-30"
- FontSize="16"
- Margin="0,0,25,10"
- VerticalAlignment="Bottom" />
- <Border Style="{StaticResource buttonborder}">
- <Button Content="权限登录"
- VerticalAlignment="Top"
- Command="{Binding OpenRoleLoginViewCommand}"
- Padding="5"
- BorderBrush="Transparent"
- FontSize="15"
- WindowChrome.IsHitTestVisibleInChrome="True"
- Background="Transparent" />
- </Border>
- <Border Style="{StaticResource buttonborder}">
- <Button Content="菜单界面"
- VerticalAlignment="Top"
- Padding="5"
- BorderBrush="Transparent"
- FontSize="15"
- Command="{Binding OpenMenuViewCommand}"
- WindowChrome.IsHitTestVisibleInChrome="True"
- Background="Transparent" />
- </Border>
- <Border Style="{StaticResource buttonborder}">
- <Button Content="运行界面"
- VerticalAlignment="Top"
- Padding="5"
- BorderBrush="Transparent"
- FontSize="15"
- Command="{Binding OpenWorkRunViewCommand}"
- WindowChrome.IsHitTestVisibleInChrome="True"
- Background="Transparent" />
- </Border>
- <Button Content="➖"
- Margin="0,10,0,0"
- VerticalAlignment="Top"
- Name="btnNormal"
- Click="btnNormal_Click"
- Width="45"
- FontWeight="Bold"
- FontSize="15"
- BorderThickness="0"
- WindowChrome.IsHitTestVisibleInChrome="True"
- Background="Transparent" />
- <Button Content="⭕"
- Margin="0,7,0,0"
- VerticalAlignment="Top"
- Click="btnMaximize_Click"
- Name="btnMaximize"
- Width="45"
- FontWeight="Bold"
- FontSize="20"
- BorderThickness="0"
- WindowChrome.IsHitTestVisibleInChrome="True"
- Background="Transparent" />
- <Button Content="❌"
- Margin="0,10,0,0"
- VerticalAlignment="Top"
- Width="45"
- Command="{Binding CloseViewCommand}"
- CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"
- FontWeight="Bold"
- FontSize="15"
- BorderThickness="0"
- WindowChrome.IsHitTestVisibleInChrome="True"
- Background="Transparent" />
- </StackPanel>
- </Grid>
- <Grid Grid.Row="1">
- <ContentControl prism:RegionManager.RegionName="RegionContent" />
- </Grid>
- </Grid>
- </Border>
- </Window>
|