KillBattlelogium() public static méthode

public static KillBattlelogium ( ) : void
Résultat void
Exemple #1
0
        private async void Application_Startup(object sender, StartupEventArgs e)
        {
            AppDomain.CurrentDomain.UnhandledException += (s, unhandledevent) =>
            {
                this.Shutdown(1);
            };
            string[] args = Environment.GetCommandLineArgs();
            if (args.Length == 1)
            {
                new UIInstaller().Show();
                return;
            }
            if (args[1] == "update")
            {
                if (args.Length == 2)
                {
                    MessageBox.Show("No update path provided");
                    this.Shutdown();
                }

                InstallerCommon.KillBattlelogium();
                string path = args[2];
                string url  = await InstallerCommon.GetDownload("battlelogium");

                var updater = new BattlelogiumInstaller(url, path);
                updater.BeginUpdate();
                return;
            }
            if (args[1] == "uninstall")
            {
                if (File.Exists("filelist"))
                {
                    InstallerCommon.KillBattlelogium();
                    new UIUninstaller().Show();
                    return;
                }
                MessageBox.Show("filelist not found, Uninstall is unable to continue");
                this.Shutdown();
                return;
            }
            return;
        }