Пример #1
0
        static void Main(string[] args)
        {
            //打开软件更新的互斥体
            bool  createdNew;
            Mutex mutex = new Mutex(true, "SimplusD_Update", out createdNew);

            if (!createdNew)
            {
                MessageBox.Show("已经有更新程序在运行!", MainSoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            try
            {
                LogService.Initialize();
                UpdateClass update = new UpdateClass();
                update.Run(args);
            }
            finally
            {
                LogService.Close();
                mutex.ReleaseMutex();
                mutex.Close();
            }
        }
Пример #2
0
 private void SetupFinish_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (chkRunSimplusD.Checked)
     {
         string simplusdFile = Path.Combine(Application.StartupPath, MainClass.SimplusDExe);
         UpdateClass.End(true);
     }
 }
Пример #3
0
 public SetupFinish(UpdateClass update)
 {
     InitializeComponent();
 }