public static void OpenToolbox(InstallModulesWizardArgs args)
        {
            if (!InstanceHelperEx.PreheatInstance(args.Instance, args.WizardWindow))
            {
                return;
            }

            InstanceHelperEx.BrowseInstance(args.Instance, args.WizardWindow, "/sitecore/admin", true);
        }
示例#2
0
        public void OnClick(Window mainWindow, Instance instance)
        {
            if (instance != null)
            {
                if (!InstanceHelperEx.PreheatInstance(instance, mainWindow))
                {
                    return;
                }

                InstanceHelperEx.BrowseInstance(instance, mainWindow, this.VirtualPath, true, this.Browser, this.Params);
            }
        }
示例#3
0
        protected virtual void OnContextMenuInstanceEntryClick(object sender, InstanceEntryClickArgs e)
        {
            MouseClickInformation clickInfo = e.ClickInformation;

            if (clickInfo.OnlyLeftMouseButtonPressed)
            {
                bool     useBackendBrowser = TrayPluginSettingsManager.OpenPagesInBackendBrowser;
                string   suffix            = TrayPluginSettingsManager.PageToRunOnClick;
                Instance instance          = e.Instance;
                InstanceHelperEx.BrowseInstance(instance, MainWindow.Instance, suffix, !useBackendBrowser);
            }
        }
        public void OnClick(Window mainWindow, Instance instance)
        {
            Analytics.TrackEvent("Browse");

            if (instance != null)
            {
                if (!InstanceHelperEx.PreheatInstance(instance, mainWindow))
                {
                    return;
                }

                InstanceHelperEx.BrowseInstance(instance, mainWindow, VirtualPath, true, Browser, _Params);
            }
        }
        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);
            }
        }
 public static void OpenSitecoreClient(InstallModulesWizardArgs args)
 {
     InstanceHelperEx.BrowseInstance(args.Instance, args.WizardWindow, "/sitecore", false);
 }
 public static void OpenBrowser(InstallModulesWizardArgs args)
 {
     InstanceHelperEx.BrowseInstance(args.Instance, args.WizardWindow, string.Empty, true);
 }