Esempio n. 1
0
        private async Task PopUpArtists(string buttonNumber)
        {
            var popUp = new PopupArtists();

            popUp.CallbackEvent += (object sender, object e) =>
            {
                placeholderArtist = (Model.Artist)e;
                if ((placeholderArtist.ArtistId == Artist1.ArtistId && placeholderArtist.ArtistName != "Not Selected") ||
                    (placeholderArtist.ArtistId == Artist2.ArtistId && placeholderArtist.ArtistName != "Not Selected") ||
                    (placeholderArtist.ArtistId == Artist3.ArtistId && placeholderArtist.ArtistName != "Not Selected"))
                {
                    Application.Current.MainPage.DisplayAlert("Error", "You can't feature an artist more than once!", "OK");
                }
                else
                {
                    if (int.Parse(buttonNumber) == 1)
                    {
                        Artist1 = placeholderArtist;
                    }
                    else if (int.Parse(buttonNumber) == 2)
                    {
                        Artist2 = placeholderArtist;
                    }
                    else if (int.Parse(buttonNumber) == 3)
                    {
                        Artist3 = placeholderArtist;
                    }
                }
            };
            await PopupNavigation.Instance.PushAsync(popUp);
        }
Esempio n. 2
0
        private async Task SelectArtist()
        {
            var popUp = new PopupArtists();

            popUp.CallbackEvent += (object sender, object e) =>
            {
                PlaceholderArtist = (Model.Artist)e;
            };
            await PopupNavigation.Instance.PushAsync(popUp);
        }