public PlayerViewModel(BuilderContext context) : base(context)
 {
     
     PlayerChanged += PlayerViewModel_PlayerChanged;
     Context.HistoryButtonChange += Player_HistoryButtonChange;
     Undo = new Command(() =>
     {
         Context.Undo();
         FirePlayerChanged();
         Save();
     }, () =>
     {
         return Context.CanUndo();
     });
     Redo = new Command(() =>
     {
         Context.Redo();
         FirePlayerChanged();
         Save();
     }, () =>
     {
         return Context.CanRedo();
     });
     playerInfo = new PlayerInfoViewModel(this);
     playerSkills = new PlayerSkillViewModel(this);
     playerResources = new PlayerResourcesViewModel(this);
     playerFeatures = new PlayerFeaturesViewModel(this);
     playerProficiencies = new PlayerProficiencyViewModel(this);
     playerActions = new PlayerActionsViewModel(this);
     playerConditions = new PlayerConditionViewModel(this);
     playerInventory = new PlayerInventoryViewModel(this);
     playerShops = new PlayerShopViewModel(this);
     playerInventoryChoices = new PlayerInventoryChoicesViewModel(this);
     playerJournal = new PlayerJournalViewModel(this);
     playerForms = new PlayerFormsCompanionsViewModel(this);
     playerNotes = new PlayerNotesViewModel(this);
     playerPDF = new PlayerPDFViewModel(this);
     build = new SwitchToBuildModel(this);
     UpdateSpellcasting();
     UpdateForms();
 }
Beispiel #2
0
        public PlayerBuildModel(PlayerModel parent) : base(parent.Context)
        {
            Parent                 = parent;
            ChildModel             = true;
            PlayerChanged         += PlayerBuildModel_PlayerChanged;
            Undo                   = Parent.Undo;
            Redo                   = Parent.Redo;
            race                   = new RaceViewModel(this);
            classes                = new ClassesViewModel(this);
            background             = new BackgroundViewModel(this);
            playerInventory        = new PlayerInventoryViewModel(this);
            playerShops            = new PlayerShopViewModel(this);
            playerInventoryChoices = new PlayerInventoryChoicesViewModel(this);
            playerScores           = new PlayerScoresViewModel(this);
            playerPersonal         = new PlayerPersonalViewModel(this);
            playerJournal          = new PlayerJournalViewModel(this);
            playerFeatures         = new PlayerFeaturesViewModel(this);
            playerSources          = new SourcesViewModel(this);
            playerInfo             = new PlayerInfoViewModel(this);

            UpdateSpellcasting();
        }
Beispiel #3
0
        public PlayerViewModel(PlayerModel parent) : base(parent.Context)
        {
            Parent                 = parent;
            ChildModel             = true;
            PlayerChanged         += PlayerViewModel_PlayerChanged;
            Undo                   = parent.Undo;
            Redo                   = parent.Redo;
            playerInfo             = new PlayerInfoViewModel(this);
            playerSkills           = new PlayerSkillViewModel(this);
            playerResources        = new PlayerResourcesViewModel(this);
            playerFeatures         = new PlayerFeaturesViewModel(this);
            playerProficiencies    = new PlayerProficiencyViewModel(this);
            playerConditions       = new PlayerConditionViewModel(this);
            playerInventory        = new PlayerInventoryViewModel(this);
            playerShops            = new PlayerShopViewModel(this);
            playerInventoryChoices = new PlayerInventoryChoicesViewModel(this);
            playerJournal          = new PlayerJournalViewModel(this);
            playerNotes            = new PlayerNotesViewModel(this);
            playerPDF              = new PlayerPDFViewModel(this);

            UpdateSpellcasting();
        }
 public PlayerBuildModel(BuilderContext context) : base(context)
 {
     PlayerChanged += PlayerBuildModel_PlayerChanged;
     Context.HistoryButtonChange += Player_HistoryButtonChange;
     Context.SourcesChangedEvent += Context_SourcesChangedEvent;
     Undo = new Command(() =>
     {
         Context.Undo();
         FirePlayerChanged();
         Save();
     }, () =>
     {
         return(Context.CanUndo());
     });
     Redo = new Command(() =>
     {
         Context.Redo();
         FirePlayerChanged();
         Save();
     }, () =>
     {
         return(Context.CanRedo());
     });
     race                   = new RaceViewModel(this);
     classes                = new ClassesViewModel(this);
     background             = new BackgroundViewModel(this);
     playerInventory        = new PlayerInventoryViewModel(this);
     playerShops            = new PlayerShopViewModel(this);
     playerInventoryChoices = new PlayerInventoryChoicesViewModel(this);
     playerScores           = new PlayerScoresViewModel(this);
     playerPersonal         = new PlayerPersonalViewModel(this);
     playerJournal          = new PlayerJournalViewModel(this);
     playerFeatures         = new PlayerFeaturesViewModel(this);
     playerSources          = new SourcesViewModel(this);
     playerInfo             = new PlayerInfoViewModel(this);
     play                   = new SwitchToPlayModel(this);
     UpdateFormModels();
     UpdateSpellcasting();
 }
 public JournalPage(PlayerJournalViewModel model)
 {
     BindingContext = Model = model;
     InitializeComponent();
 }