コード例 #1
0
 // Show CharacterSelect
 private async void ShowModalPageCharacterSelect()
 {
     // When you want to show the modal page, just call this method
     // add the event handler for to listen for the modal popping event:
     Crawl.App.Current.ModalPopping += HandleModalPopping;
     _myModalCharacterSelectPage     = new OpeningPage();
     await Navigation.PushModalAsync(_myModalCharacterSelectPage);
 }
コード例 #2
0
        // Helper to handle Modal navigation.
        private void HandleModalPopping(object sender, ModalPoppingEventArgs e)
        {
            if (e.Modal == _myModalBattleMonsterListPage)
            {
                _myModalBattleMonsterListPage = null;
                App.Current.ModalPopping     -= HandleModalPopping;
            }

            if (e.Modal == _myModalCharacterSelectPage)
            {
                _myModalCharacterSelectPage = null;
                App.Current.ModalPopping   -= HandleModalPopping;
            }

            if (e.Modal == _myModalBattlePartyPage)
            {
                _myModalBattlePartyPage   = null;
                App.Current.ModalPopping -= HandleModalPopping;
            }
        }