public static void Main(string[] args) { PrintPlatformInfo(); if (RunningWindows()) { var view = new WpfDeployWizardView(); var model = new WizardModel(); var steps = GetSteps(model); var finishStep = GetFinishStep(model); new DeployWizardController(model, view, ProfileManager.Instance, steps, finishStep); new Application().Run(view); } }
public DeployWizardController(WizardModel model, IDeployWizardView view, IProfileManager profileManager, IEnumerable<IWizardStep<IStepView>> steps, IWizardStep<IStepView> finishStep) { _model = model; _model.ProfileChanged += ChangeTitle; _profileManager = profileManager; _view = view; _steps = steps; _finishStep = finishStep; _view.PreviousClicked += Previous; _view.NextClicked += Next; _view.FastForwardClicked += FastForward; _view.SaveClicked += SaveProfile; _view.FinishClicked += Finish; _view.CloseClicked += Close; ShowCurrentStep(); }
private static IEnumerable<IWizardStep<IStepView>> GetSteps(WizardModel model) { var fileSystemManager = new FileSystemManager(); var folderAutoCompleteProvider = new FileSystemAutoCompleteProvider(fileSystemManager, CompletionType.FoldersOnly); var databaseTypes = new[] {"sqlserver", "mysql", "sqlite", "oracle"}; var steps = new List<IWizardStep<IStepView>> { new SelectProfileStep(model, new WpfSelectProfileStepView(), ProfileManager.Instance), new SelectPackageStep(model, new WpfSelectPackageStepView(), fileSystemManager), new SetUpBackupStep(model, new WpfSetUpBackupStepView(folderAutoCompleteProvider),fileSystemManager), new SetUpDeployStatusStep(model, new WpfSetUpDeployStatusStepView(), fileSystemManager), new SetUpGenerateWebConfigStep(model, new WpfSetUpGenerateWebConfigStepView(),fileSystemManager), new SetUpDestinationStep(model, new WpfSetUpDestinationStepView(), fileSystemManager), new SetUpMigrationStep(new DatabaseConnectionTester(), model,new WpfSetUpMigrationStepView(databaseTypes)), new SummaryStep(model, new WpfSummaryStepView()) }; return steps; }
private static IWizardStep<IStepView> GetFinishStep(WizardModel model) { return new FinishStep(model, new WpfFinishStepView()); }