From 8cecfa499f2b136db75fc2c9ab28dad3e6b44c53 Mon Sep 17 00:00:00 2001 From: sabihoshi Date: Sat, 22 Oct 2022 02:15:18 +0800 Subject: [PATCH 1/5] Add ChineseFix "Merge nearby notes" incorrectly removing notes --- .../Entities/Transpose.cs | 6 +-- .../GenshinLyreMidiPlayer.Data.csproj | 8 ++-- GenshinLyreMidiPlayer.WPF/Core/Keyboard.cs | 8 ++-- .../GenshinLyreMidiPlayer.WPF.csproj | 10 ++--- .../Transitions/TransitionCollection.cs | 12 +++--- .../ModernWPF/Theme/AppTheme.cs | 6 +-- .../ViewModels/LyrePlayerViewModel.cs | 16 ++++---- .../ViewModels/MainWindowViewModel.cs | 2 +- .../ViewModels/SettingsPageViewModel.cs | 28 ++++++------- .../Views/LyrePlayerView.xaml | 9 +++-- .../Views/MainWindowView.xaml | 23 ++++++----- .../Views/PianoSheetView.xaml | 22 +++++------ .../Views/PlaylistView.xaml | 11 +++--- .../Views/SettingsPageView.xaml | 39 ++++++++++--------- 14 files changed, 103 insertions(+), 97 deletions(-) diff --git a/GenshinLyreMidiPlayer.Data/Entities/Transpose.cs b/GenshinLyreMidiPlayer.Data/Entities/Transpose.cs index 4aab082..8037d40 100644 --- a/GenshinLyreMidiPlayer.Data/Entities/Transpose.cs +++ b/GenshinLyreMidiPlayer.Data/Entities/Transpose.cs @@ -4,7 +4,7 @@ namespace GenshinLyreMidiPlayer.Data.Entities; public enum Transpose { - [Description("Ignore missing notes")] Ignore, - [Description("Transpose up")] Up, - [Description("Transpose down")] Down + [Description("忽略遗漏的记录")] Ignore, + [Description("向上移调")] Up, + [Description("向下移调")] Down } \ No newline at end of file diff --git a/GenshinLyreMidiPlayer.Data/GenshinLyreMidiPlayer.Data.csproj b/GenshinLyreMidiPlayer.Data/GenshinLyreMidiPlayer.Data.csproj index b09c0ca..5e21015 100644 --- a/GenshinLyreMidiPlayer.Data/GenshinLyreMidiPlayer.Data.csproj +++ b/GenshinLyreMidiPlayer.Data/GenshinLyreMidiPlayer.Data.csproj @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/GenshinLyreMidiPlayer.WPF/Core/Keyboard.cs b/GenshinLyreMidiPlayer.WPF/Core/Keyboard.cs index 3ba7358..f53d226 100644 --- a/GenshinLyreMidiPlayer.WPF/Core/Keyboard.cs +++ b/GenshinLyreMidiPlayer.WPF/Core/Keyboard.cs @@ -30,14 +30,14 @@ public enum Layout public static readonly Dictionary InstrumentNames = new() { - [Instrument.WindsongLyre] = "Windsong Lyre", - [Instrument.FloralZither] = "Floral Zither", - [Instrument.VintageLyre] = "Vintage Lyre" + [Instrument.WindsongLyre] = "风物之诗琴", + [Instrument.FloralZither] = "镜花之琴", + [Instrument.VintageLyre] = "老旧的诗琴" }; public static readonly Dictionary LayoutNames = new() { - [Layout.QWERTY] = "QWERTY", + [Layout.QWERTY] = "QWERTY标准键盘", [Layout.QWERTZ] = "QWERTZ", [Layout.AZERTY] = "AZERTY", [Layout.DVORAK] = "DVORAK", diff --git a/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj b/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj index d091a3c..01240c4 100644 --- a/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj +++ b/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj @@ -6,7 +6,7 @@ true GenshinLyreMidiPlayer.WPF.App app.manifest - 4.0.4 + 4.0.5 item_windsong_lyre.ico enable https://github.com/sabihoshi/GenshinLyreMidiPlayer @@ -25,12 +25,12 @@ - - + + - + - + diff --git a/GenshinLyreMidiPlayer.WPF/ModernWPF/Animation/Transitions/TransitionCollection.cs b/GenshinLyreMidiPlayer.WPF/ModernWPF/Animation/Transitions/TransitionCollection.cs index 8cc1d8f..e86bc03 100644 --- a/GenshinLyreMidiPlayer.WPF/ModernWPF/Animation/Transitions/TransitionCollection.cs +++ b/GenshinLyreMidiPlayer.WPF/ModernWPF/Animation/Transitions/TransitionCollection.cs @@ -6,11 +6,11 @@ public static class TransitionCollection { public static List> Transitions = new() { - new(new EntranceTransition(), "Entrance"), - new(new DrillInTransition(), "Drill in"), - new(new SlideTransition(Direction.FromLeft), "Slide from Left"), - new(new SlideTransition(Direction.FromRight), "Slide from Right"), - new(new SlideTransition(Direction.FromBottom), "Slide from Bottom"), - new(new SuppressTransition(), "Suppress") + new(new EntranceTransition(), "输入"), + new(new DrillInTransition(), "键入"), + new(new SlideTransition(Direction.FromLeft), "从左侧滑动"), + new(new SlideTransition(Direction.FromRight), "从右侧滑动"), + new(new SlideTransition(Direction.FromBottom), "从底部滑动"), + new(new SuppressTransition(), "平") }; } \ No newline at end of file diff --git a/GenshinLyreMidiPlayer.WPF/ModernWPF/Theme/AppTheme.cs b/GenshinLyreMidiPlayer.WPF/ModernWPF/Theme/AppTheme.cs index 1153950..c1020c1 100644 --- a/GenshinLyreMidiPlayer.WPF/ModernWPF/Theme/AppTheme.cs +++ b/GenshinLyreMidiPlayer.WPF/ModernWPF/Theme/AppTheme.cs @@ -12,11 +12,11 @@ private AppTheme(string name, ApplicationTheme? value) public ApplicationTheme? Value { get; } - public static AppTheme Dark { get; } = new("Dark", ApplicationTheme.Dark); + public static AppTheme Dark { get; } = new("黑暗", ApplicationTheme.Dark); - public static AppTheme Default { get; } = new("Use system setting", null); + public static AppTheme Default { get; } = new("跟随系统设置", null); - public static AppTheme Light { get; } = new("Light", ApplicationTheme.Light); + public static AppTheme Light { get; } = new("明亮", ApplicationTheme.Light); public string Name { get; } diff --git a/GenshinLyreMidiPlayer.WPF/ViewModels/LyrePlayerViewModel.cs b/GenshinLyreMidiPlayer.WPF/ViewModels/LyrePlayerViewModel.cs index e88e3d2..132b83b 100644 --- a/GenshinLyreMidiPlayer.WPF/ViewModels/LyrePlayerViewModel.cs +++ b/GenshinLyreMidiPlayer.WPF/ViewModels/LyrePlayerViewModel.cs @@ -70,7 +70,7 @@ public LyrePlayerViewModel(IContainer ioc, MainWindowViewModel main) } catch (ArgumentException e) { - new ErrorContentDialog(e, closeText: "Ignore").ShowAsync(); + new ErrorContentDialog(e, closeText: "").ShowAsync(); SettingsPage.CanUseSpeakers = false; Settings.UseSpeakers = false; @@ -79,7 +79,7 @@ public LyrePlayerViewModel(IContainer ioc, MainWindowViewModel main) public BindableCollection MidiInputs { get; } = new() { - new("None") + new("") }; public BindableCollection MidiTracks { get; } = new(); @@ -251,7 +251,7 @@ public void OnSelectedMidiInputChanged() _inputDevice?.Dispose(); if (SelectedMidiInput?.DeviceName is not null - && SelectedMidiInput.DeviceName != "None") + && SelectedMidiInput.DeviceName != "") { _inputDevice = InputDevice.GetByName(SelectedMidiInput.DeviceName); @@ -307,7 +307,7 @@ public void Previous() public void RefreshDevices() { MidiInputs.Clear(); - MidiInputs.Add(new("None")); + MidiInputs.Add(new("")); foreach (var device in InputDevice.GetAll()) { @@ -399,10 +399,10 @@ await Application.Current.Dispatcher.Invoke(async () => var options = new Enum[] { Transpose.Up, Transpose.Down }; var exceptionDialog = new ErrorContentDialog( new MissingNotesException( - "Some notes cannot be played by this instrument, and may play incorrectly. " + - "This can be solved by snapping to the nearest semitone. " + - "You can choose to shift the notes up or down, or ignore the missing notes."), - options, "Ignore"); + "޷ijЩҿ޷ȷࡣ " + + "ͨ׽İ " + + "ѡϻƶԶʧ"), + options, ""); var result = await exceptionDialog.ShowAsync(); diff --git a/GenshinLyreMidiPlayer.WPF/ViewModels/MainWindowViewModel.cs b/GenshinLyreMidiPlayer.WPF/ViewModels/MainWindowViewModel.cs index 708bf8c..539a69c 100644 --- a/GenshinLyreMidiPlayer.WPF/ViewModels/MainWindowViewModel.cs +++ b/GenshinLyreMidiPlayer.WPF/ViewModels/MainWindowViewModel.cs @@ -24,7 +24,7 @@ public class MainWindowViewModel : Conductor public MainWindowViewModel(IContainer ioc, IThemeService theme) { - Title = $"Genshin Lyre MIDI Player {SettingsPageViewModel.ProgramVersion}"; + Title = $"Genshin Lyre MIDI Player 룺Roly";//{SettingsPageViewModel.ProgramVersion}汾 _ioc = ioc; _theme = theme; diff --git a/GenshinLyreMidiPlayer.WPF/ViewModels/SettingsPageViewModel.cs b/GenshinLyreMidiPlayer.WPF/ViewModels/SettingsPageViewModel.cs index 5e3d913..23aa021 100644 --- a/GenshinLyreMidiPlayer.WPF/ViewModels/SettingsPageViewModel.cs +++ b/GenshinLyreMidiPlayer.WPF/ViewModels/SettingsPageViewModel.cs @@ -34,9 +34,9 @@ public class SettingsPageViewModel : Screen { public static readonly Dictionary TransposeNames = new() { - [Ignore] = "Ignore notes", - [Up] = "Shift one semitone up", - [Down] = "Shift one semitone down" + [Ignore] = "忽略注释", + [Up] = "上移一个半音", + [Down] = "下移一个半音" }; private static readonly Settings Settings = Settings.Default; @@ -183,7 +183,7 @@ public static string GenshinLocation public string Key => $"Key: {KeyOffsets[KeyOffset]}"; - public string TimerText => CanChangeTime ? "Start" : "Stop"; + public string TimerText => CanChangeTime ? "开始" : "停止"; [UsedImplicitly] public string UpdateString { get; set; } = string.Empty; @@ -227,19 +227,19 @@ public async Task CheckForUpdate() if (IsCheckingUpdate) return; - UpdateString = "Checking for updates..."; + UpdateString = "检查更新中..."; IsCheckingUpdate = true; try { LatestVersion = await GetLatestVersion() ?? new GitVersion(); UpdateString = LatestVersion.Version > ProgramVersion - ? "(Update available!)" + ? "(更新可用!)" : string.Empty; } catch (Exception) { - UpdateString = "Failed to check updates"; + UpdateString = "检查更新失败"; } finally { @@ -252,12 +252,12 @@ public async Task LocationMissing() { var dialog = new ContentDialog { - Title = "Error", - Content = "Could not find Game's Location, please find GenshinImpact.exe or YuanShen.exe", + Title = "错误", + Content = "找不到游戏位置,请查找 GenshinImpact.exe 或 YuanShen.exe", - PrimaryButtonText = "Find Manually...", - SecondaryButtonText = "Ignore (Notes might not play)", - CloseButtonText = "Exit" + PrimaryButtonText = "手动查找...", + SecondaryButtonText = "忽略(音符可能无法播放)", + CloseButtonText = "退出" }; var result = await dialog.ShowAsync(); @@ -345,8 +345,8 @@ private async Task TrySetLocationAsync(string? location) { var dialog = new ContentDialog { - Title = "Incorrect Location", - Content = "launcher.exe is not the game, please find GenshinImpact.exe", + Title = "位置不正确", + Content = "launcher.exe 不是游戏,请找GenshinImpact.exe 或 yuanshen.exe", CloseButtonText = "Ok" }; diff --git a/GenshinLyreMidiPlayer.WPF/Views/LyrePlayerView.xaml b/GenshinLyreMidiPlayer.WPF/Views/LyrePlayerView.xaml index a8445a3..725066d 100644 --- a/GenshinLyreMidiPlayer.WPF/Views/LyrePlayerView.xaml +++ b/GenshinLyreMidiPlayer.WPF/Views/LyrePlayerView.xaml @@ -1,4 +1,5 @@ - + - + - + @@ -114,7 +115,7 @@ - + + @@ -44,8 +45,10 @@ + - + + @@ -63,20 +66,20 @@ SelectedPageIndex="0" Navigated="{s:Action Navigate}" Frame="{Binding ElementName=RootFrame, Mode=OneWay}"> - - - - - + @@ -94,8 +97,8 @@ - + FontSize="24" Navigation="{Binding ElementName=RootNavigation, Mode=OneWay}" Current="" /> + diff --git a/GenshinLyreMidiPlayer.WPF/Views/PianoSheetView.xaml b/GenshinLyreMidiPlayer.WPF/Views/PianoSheetView.xaml index 8084859..03fea17 100644 --- a/GenshinLyreMidiPlayer.WPF/Views/PianoSheetView.xaml +++ b/GenshinLyreMidiPlayer.WPF/Views/PianoSheetView.xaml @@ -1,4 +1,5 @@ - + - Current song: - + ǰ + - + - + - + - - + @@ -62,8 +62,8 @@ -