예제 #1
0
 // This initiates a Rename operation
 public void SetupNormal()
 {
     operation             = PlaylistOperation.None;
     inputlabel.Visible    = false;
     inputbar.Visible      = false;
     playlistlabel.Visible = false;
     namelabel.Visible     = false;
 }
예제 #2
0
 // This initiates a Save As operation
 public void SetupSaveAs(List <string> playlist)
 {
     operation             = PlaylistOperation.SaveAs;
     saveplaylist          = new List <string>(playlist);
     inputlabel.Text       = "Save current playlist as:";
     inputlabel.Visible    = true;
     inputname.Text        = "";
     inputbar.Visible      = true;
     playlistlabel.Visible = false;
     namelabel.Visible     = false;
     selecteditem          = -1;
 }
예제 #3
0
 // This initiates a Rename operation
 private void SetupRename()
 {
     operation             = PlaylistOperation.Rename;
     inputlabel.Text       = "Rename playlist as:";
     inputlabel.Visible    = true;
     inputname.Text        = "";
     inputbar.Visible      = true;
     playlistlabel.Visible = true;
     renamefile            = files[selecteditem];
     namelabel.Text        = Path.GetFileNameWithoutExtension(renamefile);
     namelabel.Visible     = true;
     selecteditem          = -1;
 }
예제 #4
0
 // This initiates a Rename operation
 private void SetupRename()
 {
     operation = PlaylistOperation.Rename;
     inputlabel.Text = "Rename playlist as:";
     inputlabel.Visible = true;
     inputname.Text = "";
     inputbar.Visible = true;
     playlistlabel.Visible = true;
     renamefile = files[selecteditem];
     namelabel.Text = Path.GetFileNameWithoutExtension(renamefile);
     namelabel.Visible = true;
     selecteditem = -1;
 }
예제 #5
0
 // This initiates a Save As operation
 public void SetupSaveAs(List<string> playlist)
 {
     operation = PlaylistOperation.SaveAs;
     saveplaylist = new List<string>(playlist);
     inputlabel.Text = "Save current playlist as:";
     inputlabel.Visible = true;
     inputname.Text = "";
     inputbar.Visible = true;
     playlistlabel.Visible = false;
     namelabel.Visible = false;
     selecteditem = -1;
 }
예제 #6
0
 // This initiates a Rename operation
 public void SetupNormal()
 {
     operation = PlaylistOperation.None;
     inputlabel.Visible = false;
     inputbar.Visible = false;
     playlistlabel.Visible = false;
     namelabel.Visible = false;
 }
예제 #7
0
        public void PrintPlaylistMenu()
        {
            Console.WriteLine(".............PLAYLIST.............");
            Console.WriteLine("1 - Add new playlist");
            Console.WriteLine("2 - Update playlist");
            Console.WriteLine("3 - Get all songs in a playlist");
            Console.WriteLine("4 - Delete playlsit");
            Console.WriteLine("5 - Get playlist");
            Console.WriteLine("6 - Add songs to playlist");
            Console.WriteLine("7 - Delete songs from playlist");
            Console.WriteLine("8 - Get all playlists");
            Console.WriteLine("9 - Share a playlist");
            Console.WriteLine("10 - Get all my playlists");
            Console.WriteLine("11 - Get all my shared playlists");
            Console.WriteLine("Press any other key to exit");
            Console.WriteLine("..................................");

            int operationInt            = Convert.ToInt32(Console.ReadLine());
            PlaylistOperation operation = (PlaylistOperation)operationInt;

            switch (operation)
            {
            case PlaylistOperation.Create:
                AddPlaylist();
                break;

            case PlaylistOperation.Update:
                UpdatePlaylist();
                break;

            case PlaylistOperation.ReadAll:
                GetAllPlaylists();
                break;

            case PlaylistOperation.ReadByID:
                DisplayPlaylistByID();
                break;

            case PlaylistOperation.Delete:
                DeletePlaylist();
                break;

            case PlaylistOperation.AddSongToPlaylist:
                AddSongToPlaylist();
                break;

            case PlaylistOperation.GetSongsFromPlaylist:
                GetSongsFromPlaylist();
                break;

            case PlaylistOperation.DeleteSongFromPlaylist:
                DeleteSongFromPlaylist();
                break;

            case PlaylistOperation.Share:
                SharePlaylist();
                break;

            case PlaylistOperation.GetMyPlaylists:
                GetPlaylistsByUser();
                break;

            case PlaylistOperation.SharedPlaylisys:
                GetAllSharedPlaylistsWithMe();
                break;

            default:
                break;
            }
        }