Example #1
0
        public MonsterDetailPage()
        {
            InitializeComponent();

            var data = new Monster
            {
                Id = Guid.NewGuid().ToString(),

                name        = "Ooze",
                description = "Gooey and Gross",
            };

            data.attributes.defense           = 1;
            data.attributes.alive             = true;
            data.attributes.attack            = 1;
            data.attributes.attackModifier    = 1;
            data.attributes.currentExperience = 0;
            data.attributes.currentHealth     = 10;
            data.attributes.currentExperience = 0;
            data.attributes.defenseModifier   = 1;
            data.attributes.health            = 10;
            data.attributes.level             = 1;
            data.attributes.speed             = 1;
            data.attributes.speedModifier     = 1;

            _viewModel     = new MonsterDetailViewModel(data);
            BindingContext = _viewModel;
        }
Example #2
0
        public EditMonsterPage(MonsterDetailViewModel viewModel)
        {
            // Save off the item
            Data            = viewModel.Data;
            viewModel.Title = "Edit " + viewModel.Title;

            InitializeComponent();

            // Set the data binding for the page
            BindingContext = _viewModel = viewModel;
        }
Example #3
0
        public MonsterDetailPage(MonsterDetailViewModel viewModel)
        {
            InitializeComponent();

            BindingContext = _viewModel = viewModel;
        }