1
0
mirror of synced 2024-12-18 04:45:55 +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; simpleBoxLoading = true;
SimpleIdBox.Text = item.Id; SimpleIdBox.Text = item.Id;
SimpleTitleBox.Text = WordList.GetBySong(item.Id).JapaneseText; 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; 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; 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; SimpleGenreBox.SelectedItem = MusicOrders.GetByUniqueId(item.UniqueId)?.Genre ?? throw new ArgumentNullException($"Music order entry #{item.UniqueId} could not be found");
SimpleStarEasyBox.Value = item.StarEasy; SimpleStarEasyBox.Value = item.StarEasy;
SimpleStarNormalBox.Value = item.StarNormal; SimpleStarNormalBox.Value = item.StarNormal;
SimpleStarHardBox.Value = item.StarHard; SimpleStarHardBox.Value = item.StarHard;