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(); + } } }