Пример #1
0
        private async void Get_Hint_Button_Clicked(object sender, EventArgs e)
        {
            mapBtn.IsEnabled = false;
            ContentPage temp         = this;
            bool        dialogAnswer = false;

            if (hintsIndex >= 1)
            {
                alertFrame.IsVisible = true;
                alert.IsVisible      = true;
            }
            if (nextAttraction.IsThisLastHint(hintsIndex))
            {
                dialogAnswer = await DisplayAlert(
                    AppResources.Last_Hint_Alert_Title,
                    AppResources.Last_Hint_Alert_Message,
                    AppResources.Yes,
                    AppResources.No);

                if (!dialogAnswer)
                {
                    mapBtn.IsEnabled = true;
                    return;
                }
                alertFrame.IsVisible = false;
                alert.IsVisible      = false;
                hintBtn.IsVisible    = false;
            }
            //else
            AttachHint(hintsIndex);
            rightArrow.IsEnabled = false;
            leftArrow.IsEnabled  = true;
            currIndex            = hintsIndex;
            hintsIndex++;
            if (hintsIndex >= 3)
            {
                scoreLabel.Text = AppResources.score + ": " + gc.EditScore(ScoreRule.Kinds.Hints_More_Than_Three);
            }
            mapBtn.IsEnabled = true;
        }