|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- 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;
- using Common.system;
-
- namespace XHPZ.Desktop
- {
- /// <summary>
- /// MainWindow.xaml 的交互逻辑
- /// </summary>
- public partial class MainWindow : Window
- {
- /// <summary>
- /// 屏幕宽
- /// </summary>
- internal double pwidth = SystemParameters.PrimaryScreenWidth;
- /// <summary>
- /// 屏幕高
- /// </summary>
- internal double pHeight = SystemParameters.PrimaryScreenHeight;
- public MainWindow()
- {
- InitializeComponent();
- LogHelper.WriteInfoLog("启动");
-
-
-
- if(APP.W_PracticeWindow==null)
- {
- APP.W_PracticeWindow = new PracticeWindow
- {
- Width = pwidth,
- Height = pHeight,
- Left = 0,
- Top = 0
- };
- }
- APP.W_PracticeWindow.Topmost = true;
- APP.W_PracticeWindow.Initialize();
- APP.W_PracticeWindow.Show();
- }
-
- private void Window_MouseMove(object sender, MouseEventArgs e)
- {
- if (e.LeftButton == MouseButtonState.Pressed)
- {
- //this.DragMove();
- DragMove();
- }
- }
-
- private void BtnClose_Click(object sender, RoutedEventArgs e)
- {
- MessageBoxResult br = MessageWindow.Show("确定退出系统?", "退出", MessageBoxButton.OKCancel);
- if (br == MessageBoxResult.OK)
- {
- System.Environment.Exit(0);
- }
- }
-
- private void BtnMin_Click(object sender, RoutedEventArgs e)
- {
- if (WindowState == WindowState.Minimized)
- {
- WindowState = WindowState.Normal;
- }
- else
- {
- WindowState = WindowState.Minimized;
- }
- }
- }
-
-
-
-
- }
|