public SetupWizardWindowViewModel(MainModel mainModel) : base(mainModel) { Localization = mainModel.Localization.CurrentLanguage.SetupWizardWindow; currentPage = null; isBackButtonVisible = false; isNextButtonVisible = false; isFinishButtonVisible = false; isCancelButtonVisible = true; isWindowCloseButtonVisible = true; pages = new Dictionary <SetupWizardStep, SetupStepViewModel>(); sharedSetupContext = new SharedSetupContext(); LanguagePageViewModel = RegisterPage <LanguagePageViewModel>(); SetupModePageViewModel = RegisterPage <SetupModePageViewModel>(); DatabaseOperationPageViewModel = RegisterPage <DatabaseOperationPageViewModel>(); StepListPageViewModel = RegisterPage <StepListPageViewModel>(); DownloadModePageViewModel = RegisterPage <DownloadModePageViewModel>(); DownloadDumpInfoPageViewModel = RegisterPage <DownloadDumpInfoPageViewModel>(); CollectionsPageViewModel = RegisterPage <CollectionsPageViewModel>(); DownloadDumpsPageViewModel = RegisterPage <DownloadDumpsPageViewModel>(); DownloadDumpLinksPageViewModel = RegisterPage <DownloadDumpLinksPageViewModel>(); CreateDatabasePageViewModel = RegisterPage <CreateDatabasePageViewModel>(); ImportDumpsPageViewModel = RegisterPage <ImportDumpsPageViewModel>(); ConfirmationPageViewModel = RegisterPage <ConfirmationPageViewModel>(); BackCommand = new Command(BackButtonClick); NextCommand = new Command(NextButtonClick); FinishCommand = new Command(FinishButtonClick); WindowClosingCommand = new FuncCommand <bool?, bool>(WindowClosing); MainModel.Localization.LanguageChanged += LocalizationLanguageChanged; MoveToPage(LanguagePageViewModel.Step); }
private void MoveToPage(SetupWizardStep pageStep) { currentPage = pages[pageStep]; IsBackButtonVisible = currentPage.IsBackButtonVisible; IsNextButtonVisible = currentPage.IsNextButtonVisible; IsFinishButtonVisible = currentPage.IsFinishButtonVisible; currentPage.OnPageEnter(); }