72 lines
2.2 KiB
C#
72 lines
2.2 KiB
C#
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.Navigation;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace StandardDesign.Views
|
|
{
|
|
/// <summary>
|
|
/// LoginView.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class LoginView : Window
|
|
{
|
|
public LoginView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 主窗口关闭按钮事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void Button_CloseClick(object sender, RoutedEventArgs e)
|
|
{
|
|
//if (systemOperationView.buttonConnect.Content.ToString() == "断开连接")
|
|
//{
|
|
// systemOperationView.AddLog("蓝牙连接未断开!请先断开后,再关闭主窗口!");
|
|
// MessageBox.Show("蓝牙连接未断开!请先断开后,再关闭主窗口!", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
|
|
//}
|
|
//else
|
|
//{
|
|
// this.Close();
|
|
//}
|
|
this.Close();
|
|
}
|
|
/// <summary>
|
|
/// 主窗口最小化事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void Button_MinClick(object sender, RoutedEventArgs e)
|
|
{
|
|
this.WindowState = WindowState.Minimized;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 主窗口最大化事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void Button_MaxClick(object sender, RoutedEventArgs e)
|
|
{
|
|
//判断是否以及最大化,最大化就还原窗口,否则最大化
|
|
if (this.WindowState == WindowState.Maximized)
|
|
this.WindowState = WindowState.Normal;
|
|
else
|
|
this.WindowState = WindowState.Maximized;
|
|
}
|
|
}
|
|
}
|