Ejemplo n.º 1
0
        private async void Button_Clicked_1(object sender, EventArgs e)
        {
            string       input    = PlaylistName.Text;
            PlaylistInfo playlist = new PlaylistInfo(input);
            bool         removed  = Playlist.PlaylistSet.Remove(playlist);

            if (removed == true)
            {
                await DisplayAlert("Confirmation", input + " has been removed.", "Cancel");
            }
            else
            {
                await DisplayAlert("Could Not Remove", input + " could not be found.", "Cancel");
            }
        }
Ejemplo n.º 2
0
        private async void Button_Clicked(object sender, EventArgs e)
        {
            string       input         = PlaylistName.Text;
            PlaylistInfo playlist      = new PlaylistInfo(input);
            bool         newlistExists = Playlist.PlaylistSet.Contains(playlist);

            if (newlistExists == true)
            {
                await DisplayAlert("Create Failed:", input + " already exists.", "Ok");
            }
            else
            {
                Playlist.PlaylistSet.Add(playlist);
                await DisplayAlert("Confirmation", input + " has been added.", "Ok");
            }
        }