//ObservableCollection<ViewModelBase> _viewModels;
        //ObservableCollection<ViewModelBase> _cViewModels;
        //ObservableCollection<ViewModelBase> _fViewModels;

        public MainWindowViewModel()
        {
 
            //add available pages
            //UserControl indexView = new IndexView();
            //UserControl raceView = new RaceListView();
            //UserControl abilityView = new AbilityView();
            UserControl creationView = new CharacterCreationView();
            UserControl newView = new CharacterSheetView();
            //UserControl raceView = new RaceViewGrid();
            UserControl raceCreationView = new AddRaceView();
            UserControl testView = new TestView();
            
            //UserControl characterView = new CharacterView();
            PageViewModels.Add(new CharacterViewModel());
            PageViewModels.Add(cc);
            PageViewModels.Add(new RaceCreationViewModel());
            PageViewModels.Add(new TestViewModel());
            //PageViewModels.Add(new RaceListViewModel(new RaceRepository()));
            //PageViewModels.Add(new AbilityViewModel());
            //PageViewModels.Add(new IndexViewModel());

            PageViews.Add(newView);
            PageViews.Add(creationView);
            PageViews.Add(raceCreationView);
            PageViews.Add(testView);
            //PageViews.Add(raceView);
            //PageViews.Add(abilityView);
            //PageViews.Add(indexView);

            //PageViewModels.Add(new CharacterViewModel());



            CurrentPageView = PageViews[1];

        }
示例#2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.AddRaceView1 = ((dndReboot.View.AddRaceView)(target));
     return;
     case 2:
     this.SubraceCheckBox = ((System.Windows.Controls.CheckBox)(target));
     return;
     case 3:
     this.AbilityStack = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 4:
     this.AbilityItemsControl = ((System.Windows.Controls.ItemsControl)(target));
     return;
     }
     this._contentLoaded = true;
 }