// Logic for every time page appears.
        protected override void OnAppearing()
        {
            base.OnAppearing();

            BindingContext = null;


            InitializeComponent();

            // Clear the Selected Ones, start over.
            _viewModel.SelectedCharacters.Clear();

            // If the Available Character List is empty fill it and then show it
            if (_viewModel.AvailableCharacters.Count == 0)
            {
                _viewModel.LoadDataCommand.Execute(null);
            }
            else if (_viewModel.NeedsRefresh())
            {
                _viewModel.LoadDataCommand.Execute(null);
            }

            BindingContext = _viewModel;

            PartyCountLabel.Text = _viewModel.SelectedCharacters.Count().ToString();
        }
Example #2
0
        // Before the page appears, remove anything that was there prior, and load data to view model
        protected override void OnAppearing()
        {
            base.OnAppearing();

            BindingContext = null;

            if (ToolbarItems.Count > 0)
            {
                ToolbarItems.RemoveAt(0);
            }

            InitializeComponent();
            _viewModel.ClearCharacterLists();

            if (_viewModel.BattleEngine.CharacterList.Count == 0 || _viewModel.BattleEngine.MonsterList.Count == 0)
            {
                _viewModel.LoadDataCommand.Execute(null);
            }
            else if (_viewModel.NeedsRefresh())
            {
                _viewModel.LoadDataCommand.Execute(null);
            }

            BindingContext   = _viewModel;
            numRounds.Text   = Convert.ToString(_viewModel.BattleEngine.BattleScore.RoundCount);
            MessageText.Text = _viewModel.BattleEngine.BattleMessage.TimeWarpMessage;
        }
Example #3
0
        //____________________________________________________
        protected override void OnAppearing()
        {
            base.OnAppearing();

            BindingContext = null;

            if (ToolbarItems.Count > 0)
            {
                ToolbarItems.RemoveAt(0);
            }

            InitializeComponent();

            //LOAD datasets
            if (_viewModel.getRound() == "1")
            {
                if (_viewModel.DatasetMonster.Count == 0 || _viewModel.DatasetCharacter.Count == 0)
                {
                    _viewModel.LoadDataCommand.Execute(null);
                }
                else if (_viewModel.NeedsRefresh())
                {
                    _viewModel.LoadDataCommand.Execute(null);
                }
            }
            BindingContext = _viewModel;
            RoundNum.Text  = _viewModel.getRound(); //text for round
            GridSetup();
        }
        protected override void OnAppearing()
        {
            base.OnAppearing();

            BindingContext = null;

            if (ToolbarItems.Count > 0)
            {
                ToolbarItems.RemoveAt(0);
            }

            InitializeComponent();

            if (_instance.DatasetChars.Count == 0 || _instance.DatasetMons.Count == 0 ||
                _instance.DatasetItems.Count == 0)
            {
                _instance.LoadDataCommand.Execute(null);
            }
            else if (_instance.NeedsRefresh())
            {
                _instance.LoadDataCommand.Execute(null);
            }

            BindingContext = _instance;
        }
Example #5
0
        // Before the page appears, remove anything that was there prior, and load data to view model
        protected override void OnAppearing()
        {
            base.OnAppearing();

            BindingContext = null;

            if (ToolbarItems.Count > 0)
            {
                ToolbarItems.RemoveAt(0);
            }

            _viewModel.ClearCharacterLists();
            InitializeComponent();

            if (_viewModel.AvailableCharacters.Count == 0)
            {
                _viewModel.LoadDataCommand.Execute(null);
            }
            else if (_viewModel.NeedsRefresh())
            {
                _viewModel.LoadDataCommand.Execute(null);
            }

            BindingContext = _viewModel;
        }
Example #6
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            BindingContext = null;


            InitializeComponent();

            // Clear the Selected Ones, start over.
            _instanceC.SelectedCharacters.Clear();

            // If the Available Character List is empty fill it and then show it
            if (_instanceC.DatasetChars.Count == 0)
            {
                _instanceC.LoadDataCommand.Execute(null);
            }
            else if (_instanceC.NeedsRefresh())
            {
                _instanceC.LoadDataCommand.Execute(null);
            }

            BindingContext = _instanceC;

            PartyCountLabel.Text = _instanceC.SelectedCharacters.Count().ToString();

            /*
             * base.OnAppearing();
             *
             * BindingContext = null;
             *
             * InitializeComponent();
             *
             *
             * if (ToolbarItems.Count > 0)
             * {
             *  ToolbarItems.RemoveAt(0);
             * }
             *
             * InitializeComponent();
             *
             * if (_instanceC.DatasetChars.Count == 0)
             * {
             *  _instanceC.LoadDataCommand.Execute(null);
             * }
             * else if (_instanceC.NeedsRefresh())
             * {
             *  _instanceC.LoadDataCommand.Execute(null);
             * }
             *
             * BindingContext = _instanceC;
             */
        }