From 1326c7385f1b322d21bf2d589452680894e65480 Mon Sep 17 00:00:00 2001 From: xiang Date: Sat, 26 Oct 2024 22:15:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=99=BB=E5=BD=95=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MainWindow.xaml | 14 +++++++------- MainWindow.xaml.cs | 13 +++++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/MainWindow.xaml b/MainWindow.xaml index 0f7a827..2342266 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -29,11 +29,10 @@ - - - - + + + + @@ -65,14 +65,14 @@ materialDesign:ButtonAssist.CornerRadius="10" Background="#D94448" BorderBrush="#D94448" BorderThickness="2" Content="登录" Foreground="White" ToolTip="登录" - Style="{StaticResource MaterialDesignRaisedButton}"/> + Style="{StaticResource MaterialDesignRaisedButton}" Click="BtnLogin_Click"/> diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 8f2758b..6687c52 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -25,5 +25,18 @@ namespace VideoConcat this.DragMove(); } } + + private void BtnLogin_Click(object sender, RoutedEventArgs e) + { + if (txtUserName.Text == "admin" && txtPassword.Password == "123456") + { + MessageBox.Show("登录成功"); + return; + } + MessageBox.Show("用户名或者密码错误!"); + txtUserName.Clear(); + //txtUserName.Text = ""; + txtPassword.Clear(); + } } }