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.

45 lines
1.1 KiB
C#

using Aucma.Core.PrintTo.ViewModels;
using Aucma.Core.ProductOffLine.Config;
using System.Windows;
namespace Aucma.Core.PrintTo.Views
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private AppConfig appConfig = AppConfig.Instance;
public MainWindow()
{
InitializeComponent();
LoginInit();
this.DataContext = new MainWindowViewModel();
}
#region 登录验证
public bool LoginInit()
{
//账号名称不存在,跳转
if (string.IsNullOrWhiteSpace(appConfig.Account))
{
// this.Hide();
LoginPageView indexPage = new LoginPageView();
indexPage.ShowDialog();
this.Close();
return false;
}
else
{
// this.Account.Text = appConfig.Account;
//this.Team.Text = appConfig.TeamName;
return true;
}
}
#endregion
}
}