private static void OnWizardCompleted(int index, bool hasInstallationBeenCompleted)
        {
            if (hasInstallationBeenCompleted)
            {
                MainWindowHelper.SoftlyRefreshInstances();
            }

            MainWindowHelper.MakeInstanceSelected(index);
        }
        public void OnClick(Window mainWindow, Instance instance)
        {
            Assert.ArgumentNotNull(mainWindow, nameof(mainWindow));

            Analytics.TrackEvent("Import");

            var fileDialog = new OpenFileDialog
            {
                Title       = "Select zip file of exported solution",
                Multiselect = false,
                DefaultExt  = ".zip"
            };

            fileDialog.ShowDialog();
            var filePath = fileDialog.FileName;

            if (string.IsNullOrEmpty(filePath))
            {
                return;
            }

            Log.Info($"Importing solution from {filePath}");
            var fileSystem = new RealFileSystem();
            var file       = fileSystem.ParseFile(filePath);

            using (var zipFile = new RealZipFile(fileSystem.ParseFile(file.FullName)))
            {
                const string AppPoolFileName = "AppPoolSettings.xml";
                var          appPool         = zipFile.Entries.Contains(AppPoolFileName);
                if (!appPool)
                {
                    WindowHelper.ShowMessage("Wrong package for import. The package does not contain the {0} file.".FormatWith(AppPoolFileName));
                    return;
                }

                const string WebsiteSettingsFileName = "WebsiteSettings.xml";
                var          websiteSettings         = zipFile.Entries.Contains(WebsiteSettingsFileName);
                if (!websiteSettings)
                {
                    WindowHelper.ShowMessage("Wrong package for import. The package does not contain the {0} file.".FormatWith(WebsiteSettingsFileName));

                    return;
                }

                const string WebConfigFileName = @"Website/Web.config";
                if (!zipFile.Entries.Contains(WebConfigFileName))
                {
                    WindowHelper.ShowMessage("Wrong package for import. The package does not contain the {0} file.".FormatWith(WebConfigFileName));

                    return;
                }
            }

            WizardPipelineManager.Start("import", mainWindow, null, null, ignore => MainWindowHelper.SoftlyRefreshInstances(), () => new ImportWizardArgs(file.FullName));
        }
        public void OnClick([NotNull] Window mainWindow, [CanBeNull] Instance instance)
        {
            WizardPipelineManager.Start("install9", mainWindow, null, null, (args) =>
            {
                if (args == null)
                {
                    return;
                }

                var install = (InstallWizardArgs)args;
                var product = install.Product;

                if (install.HasInstallationBeenCompleted)
                {
                    MainWindowHelper.SoftlyRefreshInstances();
                }
            }, () => new Install9WizardArgs());
        }
Esempio n. 4
0
        public void OnClick(Window mainWindow, Instance instance)
        {
            Analytics.TrackEvent("Install");

            Assert.IsTrue(ProfileManager.IsValid, "Some of configuration settings are invalid - please fix them in Settings dialog and try again");
            Assert.IsTrue(ProductManager.StandaloneProducts.Any(),
                          $@"You don't have any standalone product package in your repository. Options to solve:

1. (recommended) Use Ribbon -> Home -> Bundled Tools -> Download Sitecores button to download them.

2. If you already have them then you can either: 

* change the local repository folder (Ribbon -> Home -> Settings button) to the one that contains the files 

* put the files into the current local repository folder: 
{ProfileManager.Profile.LocalRepository}");

            if (EnvironmentHelper.CheckSqlServer())
            {
                WizardPipelineManager.Start("install", mainWindow, null, null, (args) =>
                {
                    MainWindowHelper.SoftlyRefreshInstances();

                    if (args == null)
                    {
                        return;
                    }

                    var install = (InstallWizardArgs)args;
                    var product = install.Product;
                    if (product == null)
                    {
                        return;
                    }

                    Analytics.TrackEvent($"install-{product.Version}");
                }, () => new InstallWizardArgs());
            }
        }
Esempio n. 5
0
 private static void OnWizardCompleted()
 {
     MainWindowHelper.SoftlyRefreshInstances();
 }
Esempio n. 6
0
 private static void OnWizardCompleted(int index)
 {
     MainWindowHelper.SoftlyRefreshInstances();
     MainWindowHelper.MakeInstanceSelected(index);
 }