old_flsystem/类库/Update/Program.cs

58 lines
1.6 KiB
C#
Raw Permalink Normal View History

2022-09-20 03:10:29 +00:00
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
namespace OnlineUpdate
{
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)
{ }
}
}
}