Esempio n. 1
0
        private async Task OnCountResetUpdateUi()
        {
            CountControl.UpdateLayout();

            await GridPlayedCards.UpdateCardLayout();

            await GridComputer.UpdateCardLayout();

            await GridPlayer.UpdateCardLayout();

            if (Settings.HitContinueOnGo == true)
            {
                await HintWindow_ShowAndWait("Go!\n\nHit Continue.");
            }
            else
            {
                await Task.Delay(1000);
            }
            foreach (CardView c in GridPlayedCards.Items)
            {
                c.SetOrientationAsync(CardOrientation.FaceDown, MainPage.AnimationSpeeds.Medium);
            }
            UpdateCount(0);
            CountControl.UpdateLayout();
        }
Esempio n. 2
0
        public async void UpdateAllCardGrids(double duration = Double.MaxValue, bool rotate = false)
        {
            foreach (CardView card in Deck.Cards)
            {
                GridDeck.SetCardSize(card);
            }

            List <Task <object> > taskList = new List <Task <object> >();

            GridDeck.UpdateCardLayout(taskList, duration, rotate);
            GridPlayer.UpdateCardLayout(taskList, duration, rotate);
            GridComputer.UpdateCardLayout(taskList, duration, rotate);
            GridPlayedCards.UpdateCardLayout(taskList, duration, rotate);
            GridCrib.UpdateCardLayout(taskList, duration, rotate);
            await Task.WhenAll(taskList);
        }