1.增加盟讯公司业务逻辑相关适配 前后端增加配置参数“ISMX”进行控制
2.前端websocket取消心跳机制(原有心跳和断线重连当服务端网线断开后需要等tcp保活期到期后才能发现重连),自己实现心跳和重连 3.前端关闭后任占用后台线程问题修复
This commit is contained in:
57
货架标准上位机/Views/MXWindows/MXMainWindow.xaml.cs
Normal file
57
货架标准上位机/Views/MXWindows/MXMainWindow.xaml.cs
Normal file
@ -0,0 +1,57 @@
|
||||
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.Controls.Primitives;
|
||||
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 System.Windows.Threading;
|
||||
using 货架标准上位机.ViewModel;
|
||||
using HandyControl.Controls;
|
||||
|
||||
namespace 货架标准上位机
|
||||
{
|
||||
/// <summary>
|
||||
/// MainWindow1.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MXMainWindow : HandyControl.Controls.Window
|
||||
{
|
||||
public static MainViewModel viewModel = MainWindow.viewModel;
|
||||
public MXMainWindow()
|
||||
{
|
||||
if (!viewModel.InitAgo())
|
||||
{
|
||||
this.Close();
|
||||
System.Environment.Exit(0);
|
||||
}
|
||||
InitializeComponent();
|
||||
this.DataContext = viewModel;
|
||||
}
|
||||
|
||||
private void load(object sender, RoutedEventArgs e)
|
||||
{
|
||||
viewModel.Init(this);
|
||||
}
|
||||
|
||||
private void tabControl_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
//取消tabControl快捷键切换
|
||||
if (e.Key == Key.LeftCtrl || e.Key == Key.LeftCtrl || e.Key == Key.Tab)
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void Window_Closed(object sender, EventArgs e)
|
||||
{
|
||||
System.Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user