|
|
|
|
<mah:MetroWindow
|
|
|
|
|
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:Audit"
|
|
|
|
|
xmlns:ConvertMoels="clr-namespace:Audit.ConvertMoels"
|
|
|
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
|
|
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
|
|
|
|
x:Class="Audit.MainWindow"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
Background="#FFF5F5F5"
|
|
|
|
|
Title="SUNLIGHT" Height="900" Width="1280" WindowStartupLocation="CenterScreen">
|
|
|
|
|
|
|
|
|
|
<mah:MetroWindow.Resources>
|
|
|
|
|
|
|
|
|
|
<Style x:Key="RadioButtonStyle" TargetType="{x:Type RadioButton}">
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.ThemeBackground}"/>
|
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MahApps.Brushes.CheckBox}"/>
|
|
|
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}"/>
|
|
|
|
|
<Setter Property="FontFamily" Value="{DynamicResource MahApps.Fonts.Family.Control}"/>
|
|
|
|
|
<Setter Property="FontSize" Value="{DynamicResource MahApps.Font.Size.Content}"/>
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.Text}"/>
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
|
|
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
|
|
|
<Setter Property="Padding" Value="6 0 0 0"/>
|
|
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
|
|
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type RadioButton}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Border x:Name="border" Background="{TemplateBinding Background}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition>
|
|
|
|
|
</ColumnDefinition>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
|
Text="{TemplateBinding Tag}"
|
|
|
|
|
FontFamily="Fonts/#FontAwesome"
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
Width="40" FontSize="30" Margin="10,10,0,0"/>
|
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="1"
|
|
|
|
|
Text="{TemplateBinding Content}"
|
|
|
|
|
FontFamily="Fonts/#FontAwesome"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
Width="60" FontSize="30" Margin="10,10,0,0"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="#FFA0A0A0" TargetName="border"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsChecked" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="#FFF5F5F5" TargetName="border"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
<Style x:Key="RadioButtonStyle2" TargetType="{x:Type RadioButton}">
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.ThemeBackground}"/>
|
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MahApps.Brushes.CheckBox}"/>
|
|
|
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}"/>
|
|
|
|
|
<Setter Property="FontFamily" Value="{DynamicResource MahApps.Fonts.Family.Control}"/>
|
|
|
|
|
<Setter Property="FontSize" Value="{DynamicResource MahApps.Font.Size.Content}"/>
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.Text}"/>
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
|
|
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
|
|
|
<Setter Property="Padding" Value="6 0 0 0"/>
|
|
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
|
|
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type RadioButton}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Border x:Name="border" Background="{TemplateBinding Background}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition>
|
|
|
|
|
</ColumnDefinition>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
|
Text="{TemplateBinding Tag}"
|
|
|
|
|
FontFamily="Fonts/#FontAwesome"
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
Width="40" FontSize="30" Margin="10,10,0,0"/>
|
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="1"
|
|
|
|
|
Text="{TemplateBinding Content}"
|
|
|
|
|
FontFamily="Fonts/#FontAwesome"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
Width="130" FontSize="30" Margin="10,10,0,0"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="#FFA0A0A0" TargetName="border"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsChecked" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="#FFF5F5F5" TargetName="border"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
<Style x:Key="Style" TargetType="{x:Type RadioButton}">
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.ThemeBackground}"/>
|
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MahApps.Brushes.CheckBox}"/>
|
|
|
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}"/>
|
|
|
|
|
<Setter Property="FontFamily" Value="{DynamicResource MahApps.Fonts.Family.Control}"/>
|
|
|
|
|
<Setter Property="FontSize" Value="{DynamicResource MahApps.Font.Size.Content}"/>
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.Text}"/>
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
|
|
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
|
|
|
<Setter Property="Padding" Value="6 0 0 0"/>
|
|
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
|
|
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type RadioButton}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Border x:Name="border" Background="{TemplateBinding Background}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition>
|
|
|
|
|
</ColumnDefinition>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
|
|
|
Text="{TemplateBinding Tag}"
|
|
|
|
|
FontFamily="Fonts/#FontAwesome"
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
Width="40" FontSize="30" Margin="10,10,0,0"/>
|
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="1"
|
|
|
|
|
Text="{TemplateBinding Content}"
|
|
|
|
|
FontFamily="Fonts/#FontAwesome"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
Width="60" FontSize="30" Margin="10,10,0,0"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="#FFA0A0A0" TargetName="border"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
</mah:MetroWindow.Resources>
|
|
|
|
|
<Grid>
|
|
|
|
|
<Rectangle HorizontalAlignment="Left" Width="140" Margin="0,0,0,0" Fill="#FFCCCCCC"/>
|
|
|
|
|
<RadioButton Content="查询" Tag="" HorizontalAlignment="Left" Height="55" Margin="0,190,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/>
|
|
|
|
|
<RadioButton Content="统计" Tag="" HorizontalAlignment="Left" Height="55" Margin="0,245,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/>
|
|
|
|
|
<RadioButton Content="管理" Tag="" HorizontalAlignment="Left" Height="55" Margin="0,300,0,0" VerticalAlignment="Top" Width="140" Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked" x:Name="RadioButtonk1"/>
|
|
|
|
|
<RadioButton Content="设定" Tag="" HorizontalAlignment="Left" Height="55" Margin="0,0,0,190" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="Set_up" x:Name="RadioButtonk12"/>
|
|
|
|
|
<RadioButton Content="用户" Tag="" HorizontalAlignment="Left" Height="55" Margin="0,0,0,135" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="User" />
|
|
|
|
|
<RadioButton Content="退出" Tag="" HorizontalAlignment="Left" Height="55" Margin="0,0,0,25" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="Exit" />
|
|
|
|
|
<RadioButton Content="信息" Tag="" HorizontalAlignment="Left" Height="55" Margin="0,0,0,80" VerticalAlignment="Bottom" Width="140" Background="#FFCCCCCC" Style="{DynamicResource Style}" Checked="Help" />
|
|
|
|
|
<TextBlock x:Name="user_time" HorizontalAlignment="Left" Height="25" Margin="10,0,0,0" VerticalAlignment="Bottom" Width="100" />
|
|
|
|
|
<Rectangle HorizontalAlignment="Left" Height="120" Margin="10,10,0,0" VerticalAlignment="Top" Width="120">
|
|
|
|
|
<Rectangle.Fill>
|
|
|
|
|
<ImageBrush ImageSource="/Logo/sunlight_sc.png"/>
|
|
|
|
|
</Rectangle.Fill>
|
|
|
|
|
</Rectangle>
|
|
|
|
|
<!--righe-->
|
|
|
|
|
<Grid Grid.Column="1">
|
|
|
|
|
<ContentControl x:Name="container" Margin="140,0,0,0"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
<RadioButton x:Name="RadioButtonk2" Content="-" Tag="" HorizontalAlignment="Left" Height="55" Margin="140,140,0,0" VerticalAlignment="Top" Width="140" Background="#FFEBEBEB" Style="{DynamicResource RadioButtonStyle2}" Checked="RadioButton_Checked2" Opacity="0.85" Visibility="Collapsed"/>
|
|
|
|
|
<RadioButton x:Name="RadioButtonk21" Content="原料管理" HorizontalAlignment="Left" Height="55" Margin="140,190,0,0" VerticalAlignment="Top" Width="140" Background="#FFEBEBEB" Style="{DynamicResource RadioButtonStyle2}" Checked="RadioButton_Checked2" Opacity="0.95" Visibility="Collapsed"/>
|
|
|
|
|
<RadioButton x:Name="RadioButtonk22" Content="染机管理" HorizontalAlignment="Left" Height="55" Margin="140,245,0,0" VerticalAlignment="Top" Width="140" Background="#FFEBEBEB" Style="{DynamicResource RadioButtonStyle2}" Checked="RadioButton_Checked2" Opacity="0.95" Visibility="Collapsed"/>
|
|
|
|
|
<RadioButton x:Name="RadioButtonk23" Content="设备管理" HorizontalAlignment="Left" Height="55" Margin="140,300,0,0" VerticalAlignment="Top" Width="140" Background="#FFEBEBEB" Style="{DynamicResource RadioButtonStyle2}" Checked="RadioButton_Checked2" Opacity="0.95" Visibility="Collapsed"/>
|
|
|
|
|
<RadioButton x:Name="RadioButtonk24" Content="输送原料" HorizontalAlignment="Left" Height="55" Margin="140,355,0,0" VerticalAlignment="Top" Width="140" Background="#FFEBEBEB" Style="{DynamicResource RadioButtonStyle2}" Checked="RadioButton_Checked2" Opacity="0.95" Visibility="Collapsed"/>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</mah:MetroWindow>
|