Feiyu/FeiYu/PwdInput.xaml.cs
2025-12-10 17:55:48 +08:00

54 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using ViewModel;
namespace FeiYu
{
/// <summary>
/// PwdInput.xaml 的交互逻辑
/// </summary>
public partial class PwdInput : Window
{
public PwdInput()
{
InitializeComponent();
}
private void btnClose_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
private void btnOK_Click(object sender, RoutedEventArgs e)
{
MainWindowVM mw = this.DataContext as MainWindowVM;
string pwd = SoftwareValidation.MD5(pbPwd.Password.Trim());
if (pwd == mw.SystemPar.SystemPwd)
{
mw.AllVis = Visibility.Visible;
this.Close();
}else if(pwd==mw.SystemPar.SuperCode)
{
mw.SuperPrivilege = Visibility.Visible;
this.Close();
}
else
{
MessageBox.Show("密码错误");
}
}
}
}