|
|
@ -7,12 +7,15 @@ using OracleInternal.Sharding;
|
|
|
|
using ServiceStack;
|
|
|
|
using ServiceStack;
|
|
|
|
using SlnMesnac.Business;
|
|
|
|
using SlnMesnac.Business;
|
|
|
|
using SlnMesnac.Business.@base;
|
|
|
|
using SlnMesnac.Business.@base;
|
|
|
|
|
|
|
|
using SlnMesnac.Common;
|
|
|
|
using SlnMesnac.Config;
|
|
|
|
using SlnMesnac.Config;
|
|
|
|
using SlnMesnac.Plc;
|
|
|
|
using SlnMesnac.Plc;
|
|
|
|
using SlnMesnac.TouchSocket;
|
|
|
|
using SlnMesnac.TouchSocket;
|
|
|
|
using SlnMesnac.WPF.Page;
|
|
|
|
using SlnMesnac.WPF.Page;
|
|
|
|
using SlnMesnac.WPF.Page.Generate;
|
|
|
|
using SlnMesnac.WPF.Page.Generate;
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
@ -152,8 +155,47 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
StartLiseningStatus();
|
|
|
|
StartLiseningStatus();
|
|
|
|
checkStatus();
|
|
|
|
checkStatus();
|
|
|
|
RefreshTime();
|
|
|
|
RefreshTime();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 检查版本--暂时不使用
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
private void CheckVersion()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
string version = HttpHelper.SendGetMessage("172.16.12.100", 5001, "wcs/RecieveRcs/version");
|
|
|
|
|
|
|
|
var vs = new Version(version);
|
|
|
|
|
|
|
|
// SystemData.VerSion
|
|
|
|
|
|
|
|
var lovs = new Version(debugConfig.Version);
|
|
|
|
|
|
|
|
if (vs > lovs)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var result = MessageBox.Show("有新版本是否更新?", "提示", MessageBoxButton.YesNo, MessageBoxImage.Information);
|
|
|
|
|
|
|
|
if (result == MessageBoxResult.Yes)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Process.Start("AutoUpdate.exe", new List<string>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
version,
|
|
|
|
|
|
|
|
debugConfig.ProcessName,
|
|
|
|
|
|
|
|
// SystemData.ProcessName,
|
|
|
|
|
|
|
|
$"http://172.16.12.100:5001/wcs/RecieveRcs?fileName={debugConfig.ProcessName}.zip"
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
debugConfig.Version = version;
|
|
|
|
|
|
|
|
Application.Current.Shutdown();
|
|
|
|
|
|
|
|
Process.GetCurrentProcess().Kill();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void RefreshTime()
|
|
|
|
private void RefreshTime()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DispatcherTimer _timer = new DispatcherTimer();
|
|
|
|
DispatcherTimer _timer = new DispatcherTimer();
|
|
|
|