Esempio n. 1
0
        public static DialogResult Uninstall(object obj)
        {
            Hashtable args         = Utils.GetSetupParameters(obj);
            string    shellVersion = Utils.GetStringSetupParameter(args, Global.Parameters.ShellVersion);
            //
            var setupVariables = new SetupVariables
            {
                ComponentId = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentId),
                IISVersion  = Global.IISVersion,
                SetupAction = SetupActions.Uninstall
            };

            //
            AppConfig.LoadConfiguration();

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            wizard.SetupVariables = setupVariables;
            //
            AppConfig.LoadComponentSettings(wizard.SetupVariables);
            //
            IntroductionPage     page1 = new IntroductionPage();
            ConfirmUninstallPage page2 = new ConfirmUninstallPage();
            UninstallPage        page3 = new UninstallPage();
            //create uninstall currentScenario
            InstallAction action = new InstallAction(ActionTypes.DeleteShortcuts);

            action.Description = "Deleting shortcuts...";
            action.Log         = "- Delete shortcuts";
            action.Name        = "Login to SolidCP.url";
            page3.Actions.Add(action);
            page2.UninstallPage = page3;

            FinishPage page4 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
            wizard.LinkPages();
            wizard.SelectedPage = page1;

            //show wizard
            IWin32Window owner = args[Global.Parameters.ParentForm] as IWin32Window;

            return(form.ShowModal(owner));
        }
Esempio n. 2
0
        public static object Uninstall(object obj)
        {
            Hashtable args = Utils.GetSetupParameters(obj);
            //
            string shellVersion = Utils.GetStringSetupParameter(args, Global.Parameters.ShellVersion);
            //
            var setupVariables = new SetupVariables
            {
                ComponentId = Utils.GetStringSetupParameter(args, Global.Parameters.ComponentId),
                SetupAction = SetupActions.Uninstall,
                IISVersion  = Global.IISVersion
            };

            //
            AppConfig.LoadConfiguration();

            InstallerForm form   = new InstallerForm();
            Wizard        wizard = form.Wizard;

            wizard.SetupVariables = setupVariables;

            AppConfig.LoadComponentSettings(wizard.SetupVariables);

            IntroductionPage     page1 = new IntroductionPage();
            ConfirmUninstallPage page2 = new ConfirmUninstallPage();
            UninstallPage        page3 = new UninstallPage();

            page2.UninstallPage = page3;
            FinishPage page4 = new FinishPage();

            wizard.Controls.AddRange(new Control[] { page1, page2, page3, page4 });
            wizard.LinkPages();
            wizard.SelectedPage = page1;

            //show wizard
            IWin32Window owner = args[Global.Parameters.ParentForm] as IWin32Window;

            return(form.ShowModal(owner));
        }