sc 4 years ago
parent
commit
c3f27389fd
  1. 15
      MainWindow.xaml
  2. 5
      MainWindow.xaml.cs

15
MainWindow.xaml

@ -9,7 +9,7 @@
x:Class="Audit.MainWindow" x:Class="Audit.MainWindow"
mc:Ignorable="d" mc:Ignorable="d"
Background="#FFF5F5F5" Background="#FFF5F5F5"
Title="SUNLIGHT" Height="800" Width="1280" WindowStartupLocation="CenterScreen"> Title="SUNLIGHT" Height="900" Width="1280" WindowStartupLocation="CenterScreen">
<mah:MetroWindow.Resources> <mah:MetroWindow.Resources>
<Style x:Key="RadioButtonStyle" TargetType="{x:Type RadioButton}"> <Style x:Key="RadioButtonStyle" TargetType="{x:Type RadioButton}">
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.ThemeBackground}"/> <Setter Property="Background" Value="{DynamicResource MahApps.Brushes.ThemeBackground}"/>
@ -61,21 +61,20 @@
</mah:MetroWindow.Resources> </mah:MetroWindow.Resources>
<Grid> <Grid>
<Rectangle HorizontalAlignment="Left" Height="915" Margin="0,190,0,0" <Rectangle HorizontalAlignment="Left" Height="1105"
Fill="#FFCCCCCC" VerticalAlignment="Top" Width="150"/> Fill="#FFCCCCCC" VerticalAlignment="Top" Width="180"/>
<RadioButton Content="查询" Tag="&#xF15C;" HorizontalAlignment="Left" <RadioButton Content="查询" Tag="&#xF15C;" HorizontalAlignment="Left"
Height="55" Margin="0,190,0,0" VerticalAlignment="Top" Width="150" Height="55" Margin="0,190,0,0" VerticalAlignment="Top" Width="180"
Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}"/> Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}"/>
<RadioButton Content="统计" Tag="&#xF00B;" HorizontalAlignment="Left" <RadioButton Content="统计" Tag="&#xF00B;" HorizontalAlignment="Left"
Height="55" Margin="0,245,0,0" VerticalAlignment="Top" Width="150" Height="55" Margin="0,245,0,0" VerticalAlignment="Top" Width="180"
Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}"/> Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}"/>
<RadioButton Content="退出" Tag="&#xF08B;" HorizontalAlignment="Left" <RadioButton Content="退出" Tag="&#xF08B;" HorizontalAlignment="Left"
Height="55" Margin="0,720,0,0" VerticalAlignment="Top" Width="150" Height="55" Margin="0,745,0,0" VerticalAlignment="Top" Width="180"
Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}"/> Background="#FFCCCCCC" Style="{DynamicResource RadioButtonStyle}" Checked="RadioButton_Checked"/>
</Grid> </Grid>
</mah:MetroWindow> </mah:MetroWindow>

5
MainWindow.xaml.cs

@ -33,5 +33,10 @@ namespace Audit
{ {
} }
private void RadioButton_Checked(object sender, RoutedEventArgs e)
{
Application.Current.Shutdown();//关闭窗口
}
} }
} }

Loading…
Cancel
Save