using System; using System.Collections.Generic; using System.Diagnostics; 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.Navigation; using System.Windows.Shapes; namespace StandardDesign.Views { /// /// LoginView.xaml 的交互逻辑 /// public partial class LoginView : Window { public LoginView() { InitializeComponent(); } /// /// 主窗口关闭按钮事件 /// /// /// private void Button_CloseClick(object sender, RoutedEventArgs e) { if (MessageBox.Show("是否确认关闭该软件", "退出软件", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { this.Close(); } } /// /// 主窗口最小化事件 /// /// /// private void Button_MinClick(object sender, RoutedEventArgs e) { this.WindowState = WindowState.Minimized; } /// /// 主窗口最大化事件 /// /// /// private void Button_MaxClick(object sender, RoutedEventArgs e) { //判断是否以及最大化,最大化就还原窗口,否则最大化 if (this.WindowState == WindowState.Maximized) this.WindowState = WindowState.Normal; else this.WindowState = WindowState.Maximized; } } }