Example #1
0
        public static void PublishSite(InstallWizardArgs args)
        {
            MainWindowHelper.RefreshInstances();
            var instance = InstanceManager.Default.GetInstance(args.InstanceName);

            new PublishButton().OnClick(MainWindow.Instance, instance);
        }
        void IWizardStep.InitializeStep(WizardArgs wizardArgs)
        {
            Init();
            this.owner = wizardArgs.WizardWindow;
            ProductName.DataContext = _StandaloneProducts.GroupBy(p => p.Name);

            var args = (InstallWizardArgs)wizardArgs;

            _InstallParameters = args;

            Product product = args.Product;

            if (product != null)
            {
                Select(ProductName, product.Name);
                Select(ProductVersion, product.ShortVersion);
                Select(ProductRevision, product.Revision);
            }
            else
            {
                SelectFirst(ProductName);
            }

            var name = args.InstanceName;

            if (!string.IsNullOrEmpty(name))
            {
                InstanceName.Text = name;
            }

            //this.LocationText.Text =Path.Combine(ProfileManager.Profile.InstancesFolder,args.InstanceName);
        }
        public static void BackupInstance(InstallWizardArgs args)
        {
            int id = MainWindowHelper.GetListItemID(args.Instance.ID);

            Assert.IsTrue(id >= 0, "id ({0}) should be >= 0".FormatWith(id));
            WizardPipelineManager.Start("backup", args.WizardWindow, new BackupArgs(args.Instance, null, true, true), null, () => MainWindowHelper.MakeInstanceSelected(id), args.Instance);
        }
Example #4
0
        public static void BackupInstance(InstallWizardArgs args)
        {
            var id = MainWindowHelper.GetListItemID(args.Instance.ID);

            Assert.IsTrue(id >= 0, "id ({0}) should be >= 0".FormatWith(id));
            WizardPipelineManager.Start("backup", args.WizardWindow, new BackupArgs(args.Instance, ProfileManager.GetConnectionString(), null, true, true), null, ignore => MainWindowHelper.MakeInstanceSelected(id), () => new BackupSettingsWizardArgs(args.Instance));
        }
        public static void OpenToolbox(InstallWizardArgs args)
        {
            if (!InstanceHelperEx.PreheatInstance(args.Instance, args.WizardWindow))
            {
                return;
            }

            InstanceHelperEx.BrowseInstance(args.Instance, args.WizardWindow, "/sitecore/admin", true);
        }
Example #6
0
        public static void FinishAction([NotNull] InstallWizardArgs args)
        {
            Assert.ArgumentNotNull(args, nameof(args));

            var instance = args.Instance;

            Assert.IsNotNull(instance, nameof(instance));

            InstanceHelperEx.OpenInBrowserAsAdmin(instance, MainWindow.Instance);
        }
        public static void OpenSolution(InstallWizardArgs args)
        {
            if (OpenSolution(args.InstanceRootPath))
            {
                return;
            }

            if (OpenSolution(args.InstanceWebRootPath))
            {
                return;
            }

            throw new Exception("Cannot locate any Visual Studio project files");
        }
        public bool SaveChanges([NotNull] WizardArgs wizardArgs)
        {
            Assert.ArgumentNotNull(wizardArgs, nameof(wizardArgs));

            var args = (InstallWizardArgs)wizardArgs;

            if (InstallRoles.IsChecked != true)
            {
                args.InstallRoles8 = "";
                InstallWizardArgs.SaveLastTimeOption(nameof(args.InstallRoles8), args.InstallRoles8);

                return(true);
            }

            var role = RoleName.Children.OfType <RadioButton>().FirstOrDefault(x => x.IsChecked == true).IsNotNull("role").Name;

            args.InstallRoles8 = role;
            InstallWizardArgs.SaveLastTimeOption(nameof(args.InstallRoles8), args.InstallRoles8);

            return(true);
        }
        public bool SaveChanges([NotNull] WizardArgs wizardArgs)
        {
            Assert.ArgumentNotNull(wizardArgs, nameof(wizardArgs));

            var args = (InstallWizardArgs)wizardArgs;

            args.PreHeat = PreHeat.IsChecked ?? Throw("PreHeat");
            InstallWizardArgs.SaveLastTimeOption(nameof(args.PreHeat), args.PreHeat);

            args.SkipDictionaries = Dictionaries.IsChecked ?? Throw("Dictionaries");
            InstallWizardArgs.SaveLastTimeOption(nameof(args.SkipDictionaries), args.SkipDictionaries);

            args.SkipRadControls = RadControls.IsChecked ?? Throw("RadControls");
            InstallWizardArgs.SaveLastTimeOption(nameof(args.SkipRadControls), args.SkipRadControls);

            args.ServerSideRedirect = ServerSideRedirect.IsChecked ?? Throw("ServerSideRedirect");
            InstallWizardArgs.SaveLastTimeOption(nameof(args.ServerSideRedirect), args.ServerSideRedirect);

            args.IncreaseExecutionTimeout = IncreaseExecutionTimeout.IsChecked ?? Throw("IncreaseExecutionTimeout");
            InstallWizardArgs.SaveLastTimeOption(nameof(args.IncreaseExecutionTimeout), args.IncreaseExecutionTimeout);

            return(true);
        }
 public static void OpenWebsiteFolder(InstallWizardArgs args)
 {
     WindowHelper.OpenFolder(args.InstanceWebRootPath);
 }
 public static void OpenVisualStudio(InstallWizardArgs args)
 {
     new OpenVisualStudioButton().OnClick(args.WizardWindow.Owner, args.Instance);
 }
 public static void OpenSitecoreClient(InstallWizardArgs args)
 {
     InstanceHelperEx.BrowseInstance(args.Instance, args.WizardWindow, "/sitecore", false);
 }
 public static void OpenBrowser(InstallWizardArgs args)
 {
     InstanceHelperEx.BrowseInstance(args.Instance, args.WizardWindow, string.Empty, true);
 }
 public static void OpenWebsiteFolder(InstallWizardArgs args)
 {
     CoreApp.OpenFolder(args.InstanceWebRootPath);
 }
        void IWizardStep.InitializeStep(WizardArgs wizardArgs)
        {
            Init();

            locationFolder.Text     = ProfileManager.Profile.InstancesFolder;
            ProductName.DataContext = _StandaloneProducts.GroupBy(p => p.Name);

            var args = (InstallWizardArgs)wizardArgs;

            _InstallParameters = args;

            Product product = args.Product;

            if (product != null)
            {
                Select(ProductName, product.Name);
                Select(ProductVersion, product.ShortVersion);
                Select(ProductRevision, product.Revision);
            }
            else
            {
                SelectFirst(ProductName);
            }

            AppPoolInfo info = args.InstanceAppPoolInfo;

            if (info != null)
            {
                var frameworkValue = $"{info.FrameworkVersion} {(info.Enable32BitAppOnWin64 ? "32bit" : string.Empty)}";
                SelectByValue(NetFramework, frameworkValue);
                SelectByValue(Mode, info.ManagedPipelineMode ? "Integrated" : "Classic");
            }

            var name = args.InstanceName;

            if (!string.IsNullOrEmpty(name))
            {
                InstanceName.Text = name;
            }

            var rootName = args.InstanceRootName;

            if (!string.IsNullOrEmpty(rootName))
            {
                RootName.Text = rootName;
            }

            var hostNames = args.InstanceHostNames;

            if (hostNames != null && hostNames.Any())
            {
                HostNames.Text = string.Join("\r\n", hostNames);
            }

            if (rootName == null)
            {
                return;
            }
            var location = args.InstanceRootPath.TrimEnd(rootName).Trim('/', '\\');

            if (!string.IsNullOrEmpty(location))
            {
                locationFolder.Text = location;
            }
        }
Example #16
0
        void IWizardStep.InitializeStep(WizardArgs wizardArgs)
        {
            this.Init();

            this.locationFolder.Text     = ProfileManager.Profile.InstancesFolder;
            this.ProductName.DataContext = this.standaloneProducts.GroupBy(p => p.Name);

            var args = (InstallWizardArgs)wizardArgs;

            this.installParameters = args;

            Product product = args.Product;

            if (product != null)
            {
                this.Select(this.ProductName, product.Name);
                this.Select(this.ProductVersion, product.ShortVersion);
                this.Select(this.ProductRevision, product.Revision);
            }
            else
            {
                this.SelectFirst(this.ProductName);
            }

            AppPoolInfo info = args.InstanceAppPoolInfo;

            if (info != null)
            {
                var frameworkValue = info.FrameworkVersion + " " + (info.Enable32BitAppOnWin64 ? "32bit" : string.Empty);
                this.SelectByValue(this.NetFramework, frameworkValue);
                this.SelectByValue(this.Mode, info.ManagedPipelineMode ? "Integrated" : "Classic");
            }

            string name = args.InstanceName;

            if (!string.IsNullOrEmpty(name))
            {
                this.InstanceName.Text = name;
            }

            string rootName = args.InstanceRootName;

            if (!string.IsNullOrEmpty(rootName))
            {
                this.RootName.Text = rootName;
            }

            string host = args.InstanceHost;

            if (!string.IsNullOrEmpty(host))
            {
                this.HostName.Text = host;
            }

            if (rootName != null)
            {
                string location = args.InstanceRootPath.TrimEnd(rootName).Trim(new[]
                {
                    '/', '\\'
                });
                if (!string.IsNullOrEmpty(location))
                {
                    this.locationFolder.Text = location;
                }
            }
        }