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; } /// /// 应用程序的主入口点。 /// [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) { } } } }