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.

33 lines
903 B
C#

using Aucma.Core.PalletizCX1.ViewModels;
using System;
using System.Windows;
namespace Aucma.Core.PalletizCX1.Views
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
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();
}
}
}