12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #if !DEBUG
- using System;
- using System.IO;
- #endif
- using System;
- using System.IO;
- using System.Linq;
- using System.Windows.Forms;
- using Update.Config;
- using Update.Util;
- namespace Update
- {
- class Program
- {
-
- static void Main(string[] args)
- {
- #if DEBUG
-
- HostConfig.Init(FilePathUtil.GetAbsolutePath("Test\\" + HostConfig.DEFAULT_NAME));
- #else
- if (args == null || args.Length < 1) return;
-
- HostConfig.Init(String.Join(" ", args.Select(t => t.ToString())));
- #endif
- try
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- if (UpdateUtil.CheckUpdate())
- {
-
- Application.Run(new FrmUpdate());
- }
- else
- {
-
- ProcessUtil.Start(HostConfig.ExecutablePath, "Updater Start");
- }
- }
- catch (Exception e)
- {
- MessageBox.Show(e.StackTrace);
- }
- }
- }
- }
|