| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 | using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms;namespace AitexEfemRT_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 AitexEfemRTSetup());        }    }    public partial class AitexEfemRTSetup : ApplicationContext    {        public AitexEfemRTSetup()        {            var exeFilePath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;            exeFilePath = exeFilePath.Substring(0, exeFilePath.LastIndexOf("\\")) + "\\" + "AitexEfemRT.exe";            System.IO.FileInfo fi = new System.IO.FileInfo(exeFilePath);            if (fi.Exists)            {                //if (MessageBox.Show(string.Format("即将运行EfemRT安装程序,请确认以下信息是否正确:\n\n程序变更号:{0}\n\n请确认是否继续完成安装?", tmVariation), "EfemRT安装", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)                System.Diagnostics.Process.Start(exeFilePath);            }            else            {                MessageBox.Show(string.Format("当前安装包不包含AitexEfemRT配置的安装信息,安装失败!"), "AitexEfemRT安装", MessageBoxButtons.OK, MessageBoxIcon.Error);            }                      Environment.Exit(0);        }    }}
 |