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.
39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
using Prism.Ioc;
|
|
using Prism.Regions;
|
|
using StartServerWPF.Modules.Main.ViewModels;
|
|
using StartServerWPF.ViewModels;
|
|
using System.Windows;
|
|
|
|
namespace StartServerWPF.Views
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for MainWindow.xaml
|
|
/// </summary>
|
|
public partial class MainWindow : Window
|
|
{
|
|
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
mainModel =DataContext as MainWindowViewModel;
|
|
}
|
|
MainWindowViewModel mainModel;
|
|
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
|
{
|
|
if (MessageBox.Show("是否退出程序?", "warning", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
|
|
{
|
|
mainModel.Exit();
|
|
}
|
|
else
|
|
{
|
|
e.Cancel = true;
|
|
}
|
|
}
|
|
|
|
private void Window_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
|
{
|
|
this.DragMove();
|
|
}
|
|
}
|
|
}
|