57 lines
1.6 KiB
C#
57 lines
1.6 KiB
C#
|
using VersionUpdate;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace OnlineRepair
|
|||
|
{
|
|||
|
static class Program
|
|||
|
{
|
|||
|
internal static string ExeName { get; private set; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 应用程序的主入口点。
|
|||
|
/// </summary>
|
|||
|
[STAThread]
|
|||
|
static void Main(string[] param)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
Client client = new Client();
|
|||
|
if (param.Length > 0)
|
|||
|
{
|
|||
|
ExeName = Client.MapFile(param[0]);
|
|||
|
}
|
|||
|
if (client.CheckInstall())
|
|||
|
{
|
|||
|
if (param.Length > 0)
|
|||
|
{
|
|||
|
Client.StartProcess(param[0]);
|
|||
|
return;
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
if (client.CheckVersion())
|
|||
|
{
|
|||
|
if (client.CheckInstall())
|
|||
|
{
|
|||
|
if (param.Length > 0)
|
|||
|
{
|
|||
|
Client.StartProcess(param[0]);
|
|||
|
return;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
else if (param.Length == 0) MessageBox.Show("没有发现新版本!", "友情提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{ }
|
|||
|
}
|
|||
|
}
|
|||
|
}
|