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);
        }
Beispiel #2
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 void OnClick(Window mainWindow, Instance instance)
 {
     if (instance != null)
     {
         var id = MainWindowHelper.GetListItemID(instance.ID);
         WizardPipelineManager.Start("installmodules", mainWindow, null, null, ignore => MainWindowHelper.MakeInstanceSelected(id), () => new InstallModulesWizardArgs(instance));
     }
 }
 public void OnClick(Window mainWindow, Instance instance)
 {
     if (instance != null)
     {
         var id = MainWindowHelper.GetListItemID(instance.ID);
         WizardPipelineManager.Start("backup", mainWindow, new BackupArgs(instance), null, () => MainWindowHelper.MakeInstanceSelected(id), instance);
     }
 }
 public void OnClick(Window mainWindow, Instance instance)
 {
     if (instance != null)
     {
         var id = MainWindowHelper.GetListItemID(instance.ID);
         WizardPipelineManager.Start("backup", mainWindow, new BackupArgs(instance, ProfileManager.GetConnectionString()), null, ignore => MainWindowHelper.MakeInstanceSelected(id), () => new BackupSettingsWizardArgs(instance));
     }
 }
Beispiel #6
0
 public void OnClick(Window mainWindow, Instance instance)
 {
     if (instance != null)
     {
         var id = MainWindowHelper.GetListItemID(instance.ID);
         WizardPipelineManager.Start("export", mainWindow, new ExportArgs(instance, false, true, true, true, false, false, false, false, false), null, ignore => MainWindowHelper.MakeInstanceSelected(id), () => new ExportWizardArgs(instance, string.Empty));
     }
 }
 public void OnClick(Window mainWindow, Instance instance)
 {
     if (instance != null)
     {
         var args = new RestoreArgs(instance, new SqlConnectionStringBuilder(Profile.Read(new RealFileSystem()).ConnectionString));
         var id   = MainWindowHelper.GetListItemID(instance.ID);
         WizardPipelineManager.Start("restore", mainWindow, args, null, ignore => MainWindowHelper.MakeInstanceSelected(id), () => new RestoreWizardArgs(instance));
     }
 }
Beispiel #8
0
 public void OnClick(Window mainWindow, Instance instance)
 {
     if (instance != null)
     {
         var args = new RestoreArgs(instance);
         var id   = MainWindowHelper.GetListItemID(instance.ID);
         WizardPipelineManager.Start("restore", mainWindow, args, null, () => MainWindowHelper.MakeInstanceSelected(id), instance);
     }
 }
        public void OnClick(Window mainWindow, Instance instance)
        {
            Analytics.TrackEvent("InstallModules");

            if (instance != null)
            {
                var id = MainWindowHelper.GetListItemID(instance.ID);
                WizardPipelineManager.Start("installmodules", mainWindow, null, null, ignore => MainWindowHelper.MakeInstanceSelected(id), instance);
            }
        }
        public void OnClick(Window mainWindow, Instance instance)
        {
            Analytics.TrackEvent("Export");

            if (instance != null)
            {
                var id = MainWindowHelper.GetListItemID(instance.ID);
                WizardPipelineManager.Start("export", mainWindow, new ExportArgs(instance, false, true, true, true, false, false, false, false, false), null, () => MainWindowHelper.MakeInstanceSelected(id), instance, string.Empty);
            }
        }
Beispiel #11
0
        public void OnClick(Window mainWindow, Instance instance)
        {
            Analytics.TrackEvent("Backup");

            if (instance != null)
            {
                var id = MainWindowHelper.GetListItemID(instance.ID);
                WizardPipelineManager.Start("backup", mainWindow, new BackupArgs(instance), null, ignore => MainWindowHelper.MakeInstanceSelected(id), () => new BackupSettingsWizardArgs(instance));
            }
        }
Beispiel #12
0
 public void OnClick(Window mainWindow, Instance instance)
 {
     if (instance != null)
     {
         var connectionString = ProfileManager.GetConnectionString();
         var args             = new DeleteArgs(instance, connectionString);
         args.OnCompleted += () => mainWindow.Dispatcher.Invoke(() => OnPipelineCompleted(args.RootPath));
         var index = MainWindowHelper.GetListItemID(instance.ID);
         WizardPipelineManager.Start("delete", mainWindow, args, null, (ignore) => OnWizardCompleted(index), () => null);
     }
 }
        public void OnClick(Window mainWindow, Instance instance)
        {
            Analytics.TrackEvent("Restore");

            if (instance != null)
            {
                var args = new RestoreArgs(instance);
                var id   = MainWindowHelper.GetListItemID(instance.ID);
                WizardPipelineManager.Start("restore", mainWindow, args, null, ignore => MainWindowHelper.MakeInstanceSelected(id), () => new RestoreWizardArgs(instance));
            }
        }
        public void OnClick(Window mainWindow, Instance instance)
        {
            if (instance != null)
            {
                var connectionString = ProfileManager.GetConnectionString();
                var args             = new DeleteArgs(instance, connectionString);
                args.OnCompleted += () => mainWindow.Dispatcher.Invoke(() => OnPipelineCompleted(args));
                var index = MainWindowHelper.GetListItemID(instance.ID);
                int version;
                if (int.TryParse(instance.Product.ShortVersion, out version) && version < 90)
                {
                    WizardPipelineManager.Start("delete", mainWindow, args, null, (ignore) => OnWizardCompleted(index, args.HasInstallationBeenCompleted), () => null);
                }
                else
                {
                    string uninstallPath    = string.Empty;
                    SitecoreEnvironment env = SitecoreEnvironmentHelper.GetExistingSitecoreEnvironment(instance.Name);
                    if (!string.IsNullOrEmpty(env?.UnInstallDataPath))
                    {
                        uninstallPath = env.UnInstallDataPath;
                    }
                    else
                    {
                        foreach (string installName in Directory.GetDirectories(ApplicationManager.UnInstallParamsFolder).OrderByDescending(s => s.Length))
                        {
                            if (instance.Name.StartsWith(Path.GetFileName(installName)))
                            {
                                uninstallPath = installName;
                                break;
                            }
                        }
                    }
                    if (string.IsNullOrEmpty(uninstallPath))
                    {
                        WindowHelper.ShowMessage("UnInstall files not found.");
                        return;
                    }

                    Delete9WizardArgs delete9WizardArgsargs = new Delete9WizardArgs(instance, connectionString, uninstallPath);
                    WizardPipelineManager.Start("delete9", mainWindow, null, null, (ignore) => OnWizardCompleted(index, delete9WizardArgsargs.HasInstallationBeenCompleted), () => delete9WizardArgsargs);
                }
            }
        }