using System.IO;
using Yw.Update;
namespace HStation.Desktop
{
///
/// 数据结构版本辅助类
///
public class AutoUpdateHelper
{
///
/// 是否需要升级
///
public static bool NeedUpdate()
{
if (!VersionHelper.HasNewVersion(UpdateConfigHelper.ServerIP, UpdateConfigHelper.ServerPort))
{
return false;
}
var dlg = new AutoUpdateConfirmDlg();
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
return true;
}
return false;
}
///
/// 是否
///
public static bool NeedExist()
{
if (NeedUpdate())
{
string updateExePath = AppDomain.CurrentDomain.BaseDirectory + "AutoUpdater\\Yw.Update.Client.Core.exe";
System.Diagnostics.Process myProcess = System.Diagnostics.Process.Start(updateExePath);
return true;
}
return false;
}
}
}