Create wizard pages differently sync
authorThomas
Tue, 08 Oct 2019 10:14:16 +0200
branchsync
changeset 27994d788aaad74e
parent 2798 484bde7d2e9b
child 2800 78690a6c3cec
Create wizard pages differently
UI/ViewModels/SyncWizardViewModel.cs
UI/ViewModels/WizardViewModelBase.cs
     1.1 --- a/UI/ViewModels/SyncWizardViewModel.cs	Tue Oct 08 10:13:58 2019 +0200
     1.2 +++ b/UI/ViewModels/SyncWizardViewModel.cs	Tue Oct 08 10:14:16 2019 +0200
     1.3 @@ -20,10 +20,10 @@
     1.4          /// <summary>
     1.5          /// Creates the pages of the Sync wizard.
     1.6          /// </summary>
     1.7 -        public override void CreatePages()
     1.8 +        public override ReadOnlyCollection<ViewModelBase> CreatePages()
     1.9          {
    1.10              // Create Sync Wizard Pages
    1.11 -            this._Pages = new ReadOnlyCollection<ViewModelBase>(new List<ViewModelBase>
    1.12 +            return new ReadOnlyCollection<ViewModelBase>(new List<ViewModelBase>
    1.13              {
    1.14                  // Welcome page
    1.15                  new WizardGenericPageViewModel
     2.1 --- a/UI/ViewModels/WizardViewModelBase.cs	Tue Oct 08 10:13:58 2019 +0200
     2.2 +++ b/UI/ViewModels/WizardViewModelBase.cs	Tue Oct 08 10:14:16 2019 +0200
     2.3 @@ -143,7 +143,7 @@
     2.4              {
     2.5                  if (this._Pages == null)
     2.6                  {
     2.7 -                    this.CreatePages();
     2.8 +                    this._Pages = this.CreatePages();
     2.9                  }
    2.10  
    2.11                  return _Pages;
    2.12 @@ -179,7 +179,6 @@
    2.13          {
    2.14              this.Dialog = dialog;
    2.15              this.CloseWindowAction = closeWindow;
    2.16 -            this.CreatePages();
    2.17              this.CurrentPage = this.Pages[0];
    2.18          }
    2.19  
    2.20 @@ -237,7 +236,7 @@
    2.21          /// <summary>
    2.22          /// Creates all pages that are displayed in the wizard.
    2.23          /// </summary>
    2.24 -        public abstract void CreatePages();
    2.25 +        public abstract ReadOnlyCollection<ViewModelBase> CreatePages();
    2.26  
    2.27          /// <summary>
    2.28          /// Moves to the last wizard page.