Example #1
0
        public void OnClick(Window mainWindow, Instance instance)
        {
            Assert.ArgumentNotNull(mainWindow, nameof(mainWindow));
            Assert.IsNotNull(instance, nameof(instance));

            InstanceHelperEx.OpenInBrowserAsAdmin(instance, mainWindow, VirtualPath, Browser, _Params);
        }
        public void OnClick(Window mainWindow, Instance instance)
        {
            Assert.ArgumentNotNull(mainWindow, "mainWindow");

            Assert.IsNotNull(instance, "instance");

            InstanceHelperEx.OpenInBrowserAsAdmin(instance, mainWindow, this.VirtualPath, this.Browser, this.Params);
        }
Example #3
0
        public void OnClick(Window mainWindow, Instance instance)
        {
            Assert.ArgumentNotNull(mainWindow, nameof(mainWindow));
            Assert.IsNotNull(instance, nameof(instance));

            Analytics.TrackEvent("LogInAdmin");

            InstanceHelperEx.OpenInBrowserAsAdmin(instance, mainWindow, this.VirtualPath, this.Browser, this.Params);
        }
Example #4
0
        public static void FinishAction([NotNull] InstallModulesWizardArgs args)
        {
            Assert.ArgumentNotNull(args, nameof(args));

            var instance = args.Instance;

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

            InstanceHelperEx.OpenInBrowserAsAdmin(instance, MainWindow.Instance);
        }
Example #5
0
        public static void LoginAdmin([NotNull] ReinstallWizardArgs args)
        {
            Assert.ArgumentNotNull(args, nameof(args));

            var instance = args.Instance;

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

            InstanceHelperEx.OpenInBrowserAsAdmin(instance, MainWindow.Instance);
        }
        public void OnClick(Window mainWindow, Instance instance)
        {
            if (!EnvironmentHelper.CheckSqlServer())
            {
                return;
            }

            if (instance == null)
            {
                return;
            }

            var path = Path.Combine(instance.WebRootPath, @"sitecore\admin\toolbox");

            if (!FileSystem.FileSystem.Local.Directory.Exists(path))
            {
                var product = Product.GetFilePackageProduct(Path.Combine(ApplicationManager.DefaultPackages, PackageName)) ?? Product.GetFilePackageProduct(Path.Combine(ApplicationManager.FilePackagesFolder, PackageName));
                if (product == null)
                {
                    WindowHelper.HandleError("The " + PackageName + " package cannot be found in either the .\\File Packages folder or %appdata%\\Sitecore\\Sitecore Instance Manager\\Custom Packages one", false, null, this);
                    return;
                }

                var products = new[] { product };
                var args     = new InstallModulesArgs(instance, products);
                PipelineManager.StartPipeline("installmodules", args, isAsync: false);
            }

            if (!FileSystem.FileSystem.Local.Directory.Exists(path))
            {
                return;
            }

            if (this.bypassSecurity)
            {
                InstanceHelperEx.OpenInBrowserAsAdmin(instance, mainWindow, @"/sitecore/admin");
            }
            else
            {
                InstanceHelperEx.BrowseInstance(instance, mainWindow, @"/sitecore/admin", false);
            }
        }