Esempio n. 1
0
        //function called when dark theme button is pressed
        private void DarkThemeButton_Click(object sender, RoutedEventArgs e)
        {
            //creates dark theme user interface
            UserInterface darkTheme = new CreateDarkUserInterface();

            UIBackground darkBackground = darkTheme.MakeBackground(mainScreen);
            Toolbar      darkToolbar    = darkTheme.MakeToolbar(ButtonBar);
            SongLabel    darkSongLabel  = darkTheme.MakeSongLabel(CurrentSongLabel);
        }
Esempio n. 2
0
        //function called when light theme button is pressed
        private void LightThemeButton_Click(object sender, RoutedEventArgs e)
        {
            //creates light theme user interface
            UserInterface lightTheme = new CreateLightUserInterface();

            //returned values aren't used, just needed them to properly access the functions to make the changes
            UIBackground lightBackground = lightTheme.MakeBackground(mainScreen);
            Toolbar      lightToolbar    = lightTheme.MakeToolbar(ButtonBar);
            SongLabel    lightSongLabel  = lightTheme.MakeSongLabel(CurrentSongLabel);
        }
Esempio n. 3
0
 private void WriteTextSafe(string text)
 {
     if (SongLabel.InvokeRequired)
     {
         var d = new SafeCallDelegate(WriteTextSafe);
         SongLabel.Invoke(d, new object[] { text });
     }
     else
     {
         SongLabel.Text = text;
     }
 }
        // Load Songlist
        public void loadPlaylistSongs(Playlist pl)
        {
            // Remove all Children
            songsStackPanel.Children.RemoveRange(0, songsStackPanel.Children.Count);

            // Datacontext auf aktuelle Playlist setzen
            songsStackPanel.DataContext = pl;
            List <Song> songs = pl.Songs;

            // Alle Songs in der Playlist als SongLabel anzeigen
            for (int i = 0; i < songs.Count(); i++)
            {
                SongLabel sL = new SongLabel(songs[i]);
                songsStackPanel.Children.Add(sL);
            }

            // Add-SongLabel am Ende hinzufügen
            appendAddSongLabel(songsStackPanel);
        }