using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; namespace XGL.FormItem { /// /// Main.xaml 的交互逻辑 /// public partial class Main : Window { public static Main main; Frame frame1 = new Frame() { Content = new Views.LanJu_Index()}; public enum WindowID { frame1 } public Main() { InitializeComponent(); main = this; WindowChange(WindowID.frame1); } public void WindowChange(WindowID windowID) { Index.Content = frame1; } private void Close(object sender, EventArgs e) { System.Environment.Exit(System.Environment.ExitCode); } private void btnExit_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show("是否确认关闭程序", "提示信息", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.No) { } else { System.Environment.Exit(System.Environment.ExitCode); } } } }