1
0
mirror of synced 2024-11-13 16:40:46 +01:00

guarded some simple box values

This commit is contained in:
NotImplementedLife 2023-07-30 08:18:54 +03:00
parent d450220730
commit b8749b4f95

View File

@ -52,10 +52,10 @@ namespace TaikoSoundEditor
simpleBoxLoading = true;
SimpleIdBox.Text = item.Id;
SimpleTitleBox.Text = WordList.GetBySong(item.Id).JapaneseText;
SimpleSubtitleBox.Text = WordList.GetBySongSub(item.Id).JapaneseText;
SimpleDetailBox.Text = WordList.GetBySongDetail(item.Id).JapaneseText;
SimpleGenreBox.SelectedItem = MusicOrders.GetByUniqueId(item.UniqueId).Genre;
SimpleTitleBox.Text = WordList.GetBySong(item.Id)?.JapaneseText ?? throw new ArgumentNullException($"Title for '{item.Id}' not found in wordlist");
SimpleSubtitleBox.Text = WordList.GetBySongSub(item.Id)?.JapaneseText ?? throw new ArgumentNullException($"Subtitle for '{item.Id}' not found in wordlist");
SimpleDetailBox.Text = WordList.GetBySongDetail(item.Id)?.JapaneseText ?? throw new ArgumentNullException($"Detail for '{item.Id}' not found in wordlist");
SimpleGenreBox.SelectedItem = MusicOrders.GetByUniqueId(item.UniqueId)?.Genre ?? throw new ArgumentNullException($"Music order entry #{item.UniqueId} could not be found");
SimpleStarEasyBox.Value = item.StarEasy;
SimpleStarNormalBox.Value = item.StarNormal;
SimpleStarHardBox.Value = item.StarHard;