From d450220730dc7b4b69b6748dc8988c5601172c04 Mon Sep 17 00:00:00 2001 From: NotImplementedLife Date: Sun, 30 Jul 2023 08:11:24 +0300 Subject: [PATCH] fixed important stuff disappearing from wordlist --- Controls/MusicOrderViewer.cs | 2 +- MainForm.RequestFiles.cs | 5 ++--- MainForm.SoundCreate.cs | 11 +++++++---- Properties/PublishProfiles/FolderProfile.pubxml.user | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Controls/MusicOrderViewer.cs b/Controls/MusicOrderViewer.cs index 46d5175..492b3e5 100644 --- a/Controls/MusicOrderViewer.cs +++ b/Controls/MusicOrderViewer.cs @@ -448,7 +448,7 @@ namespace TaikoSoundEditor.Controls } protected override bool ProcessCmdKey(ref Message msg, Keys keyData) - { + { if (keyData == (Keys.Control | Keys.X) || keyData == (Keys.Control | Keys.C)) { //MessageBox.Show("Here?"); diff --git a/MainForm.RequestFiles.cs b/MainForm.RequestFiles.cs index 2e843e9..fdddfba 100644 --- a/MainForm.RequestFiles.cs +++ b/MainForm.RequestFiles.cs @@ -109,7 +109,7 @@ namespace TaikoSoundEditor LoadedMusicBox.DataSource = LoadedMusicBinding; TabControl.SelectedIndex = 1; - WordList.Items.RemoveAll(w => + /*WordList.Items.RemoveAll(w => { var key = w.Key; @@ -122,8 +122,7 @@ namespace TaikoSoundEditor break; } return !MusicInfos.Items.Any(mi => mi.Id == key); - }); - + });*/ MusicOrderViewer.WordList = WordList; foreach (var musicOrder in MusicOrders.Items.Where(_ => MusicInfos.Items.Any(mi => mi.UniqueId == _.UniqueId))) diff --git a/MainForm.SoundCreate.cs b/MainForm.SoundCreate.cs index 494992d..324a9b2 100644 --- a/MainForm.SoundCreate.cs +++ b/MainForm.SoundCreate.cs @@ -188,11 +188,14 @@ namespace TaikoSoundEditor ma.New = true; ns.MusicAttribute = ma; - ns.Word = new Word { Key = $"song_{songName}", JapaneseText = tja.Headers.Title }; - ns.WordSub = new Word { Key = $"song_sub_{songName}", JapaneseText = tja.Headers.Subtitle }; - ns.WordDetail = new Word { Key = $"song_detail_{songName}", JapaneseText = tja.Headers.TitleJa }; + ns.Word = WordList.GetBySong(songName) ?? new Word { Key = $"song_{songName}" }; + ns.Word.JapaneseText = tja.Headers.Title; + ns.WordSub = WordList.GetBySongSub(songName) ?? new Word { Key = $"song_sub_{songName}" }; + ns.WordSub.JapaneseText = tja.Headers.Subtitle; + ns.WordDetail = WordList.GetBySongDetail(songName) ?? new Word { Key = $"song_detail_{songName}", JapaneseText = tja.Headers.TitleJa }; + ns.WordDetail.JapaneseText = tja.Headers.TitleJa; - mi.EasyOnpuNum = tja.Courses[0].NotesCount; + mi.EasyOnpuNum = tja.Courses[0].NotesCount; mi.NormalOnpuNum = tja.Courses[1].NotesCount; mi.HardOnpuNum = tja.Courses[2].NotesCount; mi.ManiaOnpuNum = tja.Courses[3].NotesCount; diff --git a/Properties/PublishProfiles/FolderProfile.pubxml.user b/Properties/PublishProfiles/FolderProfile.pubxml.user index bd8c0b4..c4dbf23 100644 --- a/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - True|2023-07-29T08:05:03.3876668Z;True|2023-07-29T10:54:04.8963992+03:00;True|2023-07-29T10:22:03.4096107+03:00;True|2023-07-29T10:05:26.6712083+03:00;True|2023-07-28T19:30:15.3174413+03:00;True|2023-07-22T19:07:39.3718711+03:00;True|2023-07-22T19:06:41.2393088+03:00;True|2023-07-22T12:07:26.2620601+03:00;True|2023-07-22T12:06:39.9230498+03:00;True|2023-07-22T11:29:18.0153916+03:00;True|2023-07-22T08:23:07.5000923+03:00;True|2023-07-21T20:03:15.6598520+03:00;True|2023-07-21T19:41:13.2800435+03:00;True|2023-07-19T13:08:33.4726289+03:00;True|2023-07-19T12:08:17.2430335+03:00;True|2023-07-18T09:38:50.7615921+03:00;True|2023-07-18T09:25:23.0403589+03:00;True|2023-07-17T17:57:08.1469738+03:00;True|2023-07-17T11:28:41.9554245+03:00;True|2023-07-17T11:15:26.2194507+03:00; + True|2023-07-29T08:28:56.2445862Z;True|2023-07-29T11:05:03.3876668+03:00;True|2023-07-29T10:54:04.8963992+03:00;True|2023-07-29T10:22:03.4096107+03:00;True|2023-07-29T10:05:26.6712083+03:00;True|2023-07-28T19:30:15.3174413+03:00;True|2023-07-22T19:07:39.3718711+03:00;True|2023-07-22T19:06:41.2393088+03:00;True|2023-07-22T12:07:26.2620601+03:00;True|2023-07-22T12:06:39.9230498+03:00;True|2023-07-22T11:29:18.0153916+03:00;True|2023-07-22T08:23:07.5000923+03:00;True|2023-07-21T20:03:15.6598520+03:00;True|2023-07-21T19:41:13.2800435+03:00;True|2023-07-19T13:08:33.4726289+03:00;True|2023-07-19T12:08:17.2430335+03:00;True|2023-07-18T09:38:50.7615921+03:00;True|2023-07-18T09:25:23.0403589+03:00;True|2023-07-17T17:57:08.1469738+03:00;True|2023-07-17T11:28:41.9554245+03:00;True|2023-07-17T11:15:26.2194507+03:00; \ No newline at end of file