You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.1 KiB
C#
74 lines
2.1 KiB
C#
using Admin.Core.Model.Model_New;
|
|
using Aucma.Core.CodeBinding.Common;
|
|
using Aucma.Core.CodeBinding.ViewModels;
|
|
|
|
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;
|
|
|
|
namespace Aucma.Core.CodeBinding.Views
|
|
{
|
|
/// <summary>
|
|
/// LoginPageView.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class LoginPageView : Window
|
|
{
|
|
LoginPageViewModel loginViewModel = new LoginPageViewModel();
|
|
public LoginPageView()
|
|
{
|
|
InitializeComponent();
|
|
this.DataContext = loginViewModel;
|
|
}
|
|
|
|
private void loginBtn_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
string userName = txtUserName.Text;
|
|
string passWord = txtPassword.Password;
|
|
BaseTeamMembers teamMembers = (BaseTeamMembers)this.selectTeamComboBox.SelectedItem;
|
|
if (teamMembers==null)
|
|
{
|
|
MessageBox.Show("请选择班组!","系统提醒");
|
|
return;
|
|
}
|
|
// 非空校验,账号密码正则校验
|
|
if (string.IsNullOrWhiteSpace(userName))
|
|
{
|
|
MessageBox.Show("用户名不可为空!", "系统提醒");
|
|
return;
|
|
}
|
|
if (string.IsNullOrWhiteSpace(passWord))
|
|
{
|
|
MessageBox.Show("密码不可为空!", "系统提醒");
|
|
return;
|
|
}
|
|
// 登录校验
|
|
|
|
loginViewModel.Login(teamMembers,userName, passWord,this);
|
|
}
|
|
|
|
|
|
private void TextBox_GotFocus(object sender, RoutedEventArgs e)
|
|
{
|
|
// 弹出系统键盘
|
|
OSKHelper.OpenOsk();
|
|
}
|
|
|
|
private void TextBox_LostFocus(object sender, RoutedEventArgs e)
|
|
{
|
|
// 隐藏系统键盘
|
|
OSKHelper.CloseOsk();
|
|
}
|
|
|
|
}
|
|
}
|