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.
Aucma.Scada/Aucma.Scada.UI/MainWindow.xaml.cs

32 lines
894 B
C#

1 year ago
using Aucma.Scada.UI.viewModel;
6 months ago
using System;
1 year ago
namespace Aucma.Scada.UI
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
6 months ago
public partial class MainWindow
1 year ago
{
6 months ago
private static readonly Lazy<MainWindow> _instance = new Lazy<MainWindow>(() => new MainWindow());
public static MainWindow Instance => _instance.Value;
private MainWindow()
1 year ago
{
InitializeComponent();
MainViewModel mainViewModel = new MainViewModel();
this.DataContext = mainViewModel;
6 months ago
Closing += PageView_Closing; // 订阅窗口关闭事件
}
private void PageView_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
this.Hide();
//跳转到登录页
LoginPageView login = LoginPageView.Instance;
login.Show();
1 year ago
}
}
}