Beispiel #1
0
        private static void ClientOnDownloadFileCompleted(string fileName)
        {
            try
            {
                Logger.Info("Download Complete.");
                BotManager.DetachFromProcess();
                App.ShutDown();
                DeleteOldSetupFiles();
                ZipFile.ExtractToDirectory(fileName, Constants.ApplicationPath.Value);
                MessageBox.Show("The update was complete. CoolFish will restart now.");
                Process.Start("CoolFish.exe");
            }
            catch (Exception ex)
            {
                Logger.Error("Failed to extract and run the latest version. Please download and run the latest version manually.", ex);
                MessageBox.Show("Failed to extract and run the latest version. Please download and run the latest version manually.");
            }

            Process.GetCurrentProcess().Kill();
        }