private void BassTierNumeric_ValueChanged(object sender, EventArgs e) { BassTierPicture.Image = Program.Form.Tiers[ImportMap.GetBaseTier(Instrument.Bass, (int)BassTierNumeric.Value)]; if (Song != null) { Song.Difficulty[Instrument.Bass] = (int)BassTierNumeric.Value; } }
private void PopulateSongInfo(SongData song) { if (song != null) { if (song.AlbumArt != null) { AlbumArtPicture.Visible = true; AlbumArtPicture.Image = song.AlbumArt; } else { // AlbumArtPicture.Visible = false; AlbumArtPicture.Visible = true; AlbumArtPicture.Image = AlbumImage; } if (song.Name.HasValue()) { NameLabel.Visible = true; NameLabel.Text = song.Name; } else { NameLabel.Text = ""; NameLabel.Visible = false; } if (song.Artist.HasValue()) { ArtistLabel.Visible = true; ArtistLabel.Text = song.Artist; } else { ArtistLabel.Text = ""; ArtistLabel.Visible = false; } if (song.Album.HasValue()) { AlbumLabel.Visible = true; AlbumLabel.Text = song.Album; } else { AlbumLabel.Text = ""; AlbumLabel.Visible = false; } if (song.Genre.HasValue()) { GenreLabel.Visible = true; GenreLabel.Text = song.TidyGenre; } else { GenreLabel.Text = ""; GenreLabel.Visible = false; } if (song.Year > 0) { YearLabel.Visible = true; YearLabel.Text = song.Year.ToString(); } else { YearLabel.Text = ""; YearLabel.Visible = false; } DifficultyLayout.Visible = true; foreach (var diff in song.Difficulty) { Label label = null; switch (diff.Key) { case Instrument.Ambient: label = DifficultyBandValueLabel; break; case Instrument.Guitar: label = DifficultyGuitarValueLabel; break; case Instrument.Bass: label = DifficultyBassValueLabel; break; case Instrument.Drums: label = DifficultyDrumsValueLabel; break; case Instrument.Vocals: label = DifficultyVocalsValueLabel; break; } if (diff.Value == 0 && diff.Key != Instrument.Ambient) { label.Image = null; label.Text = "NO PART"; } else { label.Text = string.Empty; label.Image = Tiers[ImportMap.GetBaseTier(diff.Key, diff.Value)]; } } } else { AlbumArtPicture.Visible = true; AlbumArtPicture.Image = AlbumImage; NameLabel.Visible = false; ArtistLabel.Visible = false; AlbumLabel.Visible = false; GenreLabel.Visible = false; YearLabel.Visible = false; DifficultyLayout.Visible = false; // TODO: Show some sort of info... } }