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.
37 lines
995 B
C#
37 lines
995 B
C#
using Aucma.Core.PrintTo.Config;
|
|
using Aucma.Core.PrintTo.ViewModels;
|
|
using System;
|
|
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;
|
|
private static readonly Lazy<MainWindow> _instance = new Lazy<MainWindow>(() => new MainWindow());
|
|
|
|
public static MainWindow Instance => _instance.Value;
|
|
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
this.DataContext = new MainWindowViewModel();
|
|
Closing += PageView_Closing; // 订阅窗口关闭事件
|
|
}
|
|
|
|
|
|
private void PageView_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
|
{
|
|
this.Hide();
|
|
//跳转到登录页
|
|
LoginPageView login = LoginPageView.Instance;
|
|
login.Show();
|
|
}
|
|
|
|
|
|
}
|
|
}
|