You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
11 KiB
138 lines
11 KiB
<Window x:Class="SunlightCentralizedControlManagement_SCCM_.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:lang="clr-namespace:SunlightCentralizedControlManagement_SCCM_.Properties"
|
|
xmlns:viewmodel="clr-namespace:SunlightCentralizedControlManagement_SCCM_.ViewModel"
|
|
xmlns:local="clr-namespace:SunlightCentralizedControlManagement_SCCM_"
|
|
xmlns:Fluent="urn:fluent-ribbon"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
|
|
mc:Ignorable="d"
|
|
Loaded="Window_Loaded"
|
|
Title="SUNLIGHT SCCM b0.0.1 (2024/08/10)"
|
|
Height="1080" Width="1920" Background="#FF003640"
|
|
WindowStyle="None" ResizeMode="NoResize">
|
|
<Window.Resources>
|
|
<Storyboard x:Key="MenuOpen">
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="GridMenu">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="60"/>
|
|
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="200"/>
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
<Storyboard x:Key="MenuClose">
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="GridMenu">
|
|
<EasingDoubleKeyFrame KeyTime="0" Value="200"/>
|
|
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="60"/>
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</Window.Resources>
|
|
|
|
<Window.Triggers>
|
|
<EventTrigger RoutedEvent="ButtonBase.Click" SourceName="ButtonOpenMenu">
|
|
<BeginStoryboard Storyboard="{StaticResource MenuOpen}"/>
|
|
</EventTrigger>
|
|
<EventTrigger RoutedEvent="ButtonBase.Click" SourceName="ButtonCloseMenu">
|
|
<BeginStoryboard Storyboard="{StaticResource MenuClose}"/>
|
|
</EventTrigger>
|
|
</Window.Triggers>
|
|
|
|
<Grid Background="LightGray">
|
|
<Grid x:Name="GridTitle" Height="50" VerticalAlignment="Top" Background="#FF006361" MouseDown="GridTitle_MouseDown" Margin="60,0,0,0">
|
|
<TextBlock Text="Sunlight Centralized Control Management (SCCM)" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22" Foreground="White"/>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<ComboBox x:Name="username" VerticalAlignment="Center" FontSize="14" DropDownClosed="username_DropDownClosed" HorizontalAlignment="Right" Margin="0,0,5,0" Width="100" Foreground="White">
|
|
<ComboBox.ItemContainerStyle>
|
|
<Style TargetType="{x:Type ComboBoxItem}">
|
|
<Setter Property="Foreground" Value="Black">
|
|
</Setter>
|
|
</Style>
|
|
</ComboBox.ItemContainerStyle>
|
|
</ComboBox>
|
|
<TextBlock Text="{Binding Sys_Time}" VerticalAlignment="Center" FontSize="14" Foreground="White"/>
|
|
<materialDesign:PopupBox Foreground="White" Margin="10" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False">
|
|
<StackPanel Width="150">
|
|
<Button Content="{x:Static lang:Resources.USER}" Click="ButtonUSER_Click" x:Name="User_" IsEnabled="{Binding USER_Capacity[1]}"/>
|
|
<Button Content="{x:Static lang:Resources.SysSet}" Click="ButtonSYS_Click" x:Name="SysSet_" IsEnabled="{Binding USER_Capacity[0]}"/>
|
|
<Separator/>
|
|
<Button Content="{x:Static lang:Resources.Permit}" Click="ButtonPermit_Click"/>
|
|
<Button Content="{x:Static lang:Resources.Help}" Click="Buttonhelp_Click"/>
|
|
<Separator/>
|
|
<Button x:Name="ButtonMinimize" Content="{x:Static lang:Resources.Minimize}" Click="ButtonMinimize_Click"/>
|
|
<Button x:Name="ButtonMaximize" Content="{x:Static lang:Resources.Maximize}" Click="ButtonMaximize_Click"/>
|
|
<Button x:Name="ButtonPopUpLogout" Content="{x:Static lang:Resources.PopUpLogout}" Click="ButtonPopUpLogout_Click"/>
|
|
</StackPanel>
|
|
</materialDesign:PopupBox>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<Grid x:Name="GridMenu" Width="60" HorizontalAlignment="Left" Background="#FF00204E" Margin="0" SizeChanged="GridMenu_SizeChanged">
|
|
<StackPanel>
|
|
<Grid Background="#FF006361">
|
|
<Button x:Name="ButtonCloseMenu" Width="60" Height="50" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Right" Visibility="Collapsed" Click="ButtonCloseMenu_Click">
|
|
<materialDesign:PackIcon Kind="ArrowLeft" Foreground="#FF00204E" Width="25" Height="25"/>
|
|
</Button>
|
|
<Button x:Name="ButtonOpenMenu" Width="60" Height="50" Background="{x:Null}" BorderBrush="{x:Null}" VerticalAlignment="Top" HorizontalAlignment="Right" Click="ButtonOpenMenu_Click">
|
|
<materialDesign:PackIcon Kind="Menu" Foreground="#FF00204E" Width="25" Height="25"/>
|
|
</Button>
|
|
</Grid>
|
|
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD" >
|
|
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_Whole">
|
|
<StackPanel Orientation="Horizontal" >
|
|
<materialDesign:PackIcon Kind="ListBox" Width="25" Height="25" Margin="10" VerticalAlignment="Center" />
|
|
<TextBlock Text="{x:Static lang:Resources.Whole}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
|
</StackPanel>
|
|
</ListViewItem>
|
|
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_Monitor">
|
|
<StackPanel Orientation="Horizontal">
|
|
<materialDesign:PackIcon Kind="ViewDashboard" Width="25" Height="25" Margin="10" VerticalAlignment="Center" />
|
|
<TextBlock Text="{x:Static lang:Resources.Monitor}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
|
</StackPanel>
|
|
</ListViewItem>
|
|
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_ProductionPlanning">
|
|
<StackPanel Orientation="Horizontal">
|
|
<materialDesign:PackIcon Kind="ClipboardTextClock" Width="25" Height="25" Margin="10" VerticalAlignment="Center" />
|
|
<TextBlock Text="{x:Static lang:Resources.ProductionPlanning}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
|
</StackPanel>
|
|
</ListViewItem>
|
|
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_Curve" IsEnabled="{Binding USER_Capacity[9]}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<materialDesign:PackIcon Kind="ChartBellCurve" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{x:Static lang:Resources.Curve}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
|
</StackPanel>
|
|
</ListViewItem>
|
|
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_Machine" IsEnabled="{Binding USER_Capacity[2]}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<materialDesign:PackIcon Kind="Settings" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{x:Static lang:Resources.Machine}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
|
</StackPanel>
|
|
</ListViewItem>
|
|
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_Programgroup" IsEnabled="{Binding USER_Capacity[9]}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<materialDesign:PackIcon Kind="Database" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{x:Static lang:Resources.Programgroup}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
|
</StackPanel>
|
|
</ListViewItem>
|
|
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_ConveyorCenters" IsEnabled="{Binding USER_Capacity[12]}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<materialDesign:PackIcon Kind="Pipe" Width="25" Height="25" Margin="10" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{x:Static lang:Resources.ConveyorCenters}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/>
|
|
</StackPanel>
|
|
</ListViewItem>
|
|
</ListView>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<Grid x:Name="gdMian" Background="White" Margin="60,50,0,0">
|
|
<ContentControl x:Name="Picture"/>
|
|
<Grid x:Name="Cdk_page" Visibility="Collapsed" Margin="0,0,0,0" Background="White" Opacity="0.8">
|
|
<TextBlock Height="150" Margin="0,0,0,300" TextWrapping="Wrap" Text="注册信息到期,为避免影响系统使用请及时提交注册信息!" Width="500" FontSize="34" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
<TextBlock x:Name="keytext" Height="50" Margin="0,0,0,100" TextWrapping="Wrap" Width="500" FontSize="34" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Red"/>
|
|
<TextBlock Height="50" Margin="0,0,0,0" TextWrapping="Wrap" Text="请联系 SUNLIGHT" Width="300" FontSize="34" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
<Button Content="{x:Static lang:Resources.Permit }" HorizontalAlignment="Center" Height="50" Margin="200,100,0,-100" VerticalAlignment="Center" Width="150" FontSize="24" BorderBrush="{x:Null}" Background="DarkGray" Click="ButtonPermit_Click"/>
|
|
<Button Content="{x:Static lang:Resources.Help }" HorizontalAlignment="Center" Height="50" Margin="0,100,200,-100" VerticalAlignment="Center" Width="150" FontSize="24" BorderBrush="{x:Null}" Background="DarkGray" Click="Buttonhelp_Click"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|
|
|