Ejemplo n.º 1
0
        private static void Uninstall()
        {
            UninstallerWorker uninstall = new UninstallerWorker();

            uninstall.OnComplete += uninstall_OnComplete;
            uninstall.OnError    += uninstall_OnError;
            uninstall.Uninstall();
        }
        private void UninstallWorker()
        {
            TaskDialog td = new TaskDialog(Window.GetWindow(this), "Uninstall confirmation",
                                           "Are you sure you want to completely remove " + InstallerData.DisplayName + "?",
                                           MessageType.Question, true);

            if (td.ShowDialog() == true)
            {
                UninstallerWorker uninstall = new UninstallerWorker();
                uninstall.OnProgress += uninstall_OnProgress;
                uninstall.OnComplete += uninstall_OnComplete;
                uninstall.OnError    += uninstall_OnError;
                uninstall.Uninstall();
            }
            else
            {
                InstallerData.UninstallMode = false;
                CancelSetup(null);
            }
        }