Beispiel #1
0
        static void Main(string[] args)
        {
            //CreateDatabase.CreateDB();
            UserRepository     user         = new UserRepository(conString);
            DisplayUser        dispUser     = new DisplayUser();
            SongRepository     song         = new SongRepository(conString);
            DisplaySong        dispSong     = new DisplaySong();
            PlaylistRepository playlist     = new PlaylistRepository(conString);
            DisplayPlaylist    dispPlaylist = new DisplayPlaylist();
            DisplayMainMenu    menu         = new DisplayMainMenu();

            dispUser.UserLogin();
            menu.DisplayMenu();
        }
Beispiel #2
0
        public void DisplayMenu()
        {
            DisplayUser     dispUser     = new DisplayUser();
            DisplaySong     dispSong     = new DisplaySong();
            DisplayPlaylist dispPlaylist = new DisplayPlaylist();
            int             operationInt = 0;

            while (operationInt != 4)
            {
                Console.WriteLine("...................................");
                Console.WriteLine("Press 1 for user options");
                Console.WriteLine("Press 2 for song options");
                Console.WriteLine("Press 3 for playist options");
                Console.WriteLine("Press any other key to exit" + Environment.NewLine);

                operationInt = Convert.ToInt32(Console.ReadLine());
                MenuOperation operation = (MenuOperation)operationInt;

                switch (operation)
                {
                case MenuOperation.User:
                    dispUser.PrintUserMenu();
                    break;

                case MenuOperation.Song:
                    dispSong.PrintSongMenu();
                    break;

                case MenuOperation.Playlist:
                    dispPlaylist.PrintPlaylistMenu();
                    break;

                default:
                    break;
                }
            }
        }