1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace Triton160RT_Setup
- {
- static class Program
- {
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main()
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new Triton160RTSetup());
- }
- }
- public partial class Triton160RTSetup : ApplicationContext
- {
- public Triton160RTSetup()
- {
- var exeFilePath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
- exeFilePath = exeFilePath.Substring(0, exeFilePath.LastIndexOf("\\")) + "\\" + "Triton160RT.exe";
- System.IO.FileInfo fi = new System.IO.FileInfo(exeFilePath);
- if (fi.Exists)
- {
- //if (MessageBox.Show(string.Format("即将运行Triton160RT安装程序,请确认以下信息是否正确:\n\n程序变更号:{0}\n\n请确认是否继续完成安装?", tmVariation), "Triton160RT安装", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
- System.Diagnostics.Process.Start(exeFilePath);
- }
- else
- {
- MessageBox.Show(string.Format("当前安装包不包含Triton160RT配置的安装信息,安装失败!"), "Triton160RT安装", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
-
- Environment.Exit(0);
- }
- }
- }
|