From 5971069e020a4fbc344b7e0e24f6b19b1bb7c36d Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Sat, 25 Sep 2021 15:18:28 +0800 Subject: [PATCH] Do some release work * Add Crtl + V for paste after * Finish english readme * Add icon designed plaer_2 * Update I18N --- BallanceTASEditor/BallanceTASEditor.csproj | 7 +- BallanceTASEditor/Language/CHS.xaml | 19 +++ .../Language/DefaultLanguage.xaml | 25 +++- BallanceTASEditor/MainWindow.xaml | 7 +- BallanceTASEditor/MainWindow.xaml.cs | 14 ++- BallanceTASEditor/UI/AddItem.xaml | 12 +- BallanceTASEditor/UI/DialogUtil.cs | 13 +- BallanceTASEditor/icon.ico | Bin 0 -> 270398 bytes README.md | 115 +++++++++++++++++- README_ZH.md | 1 + 10 files changed, 191 insertions(+), 22 deletions(-) create mode 100644 BallanceTASEditor/icon.ico diff --git a/BallanceTASEditor/BallanceTASEditor.csproj b/BallanceTASEditor/BallanceTASEditor.csproj index eda5c69..ae75845 100644 --- a/BallanceTASEditor/BallanceTASEditor.csproj +++ b/BallanceTASEditor/BallanceTASEditor.csproj @@ -36,6 +36,9 @@ 4 false + + icon.ico + @@ -135,6 +138,8 @@ Settings.Designer.cs - + + + \ No newline at end of file diff --git a/BallanceTASEditor/Language/CHS.xaml b/BallanceTASEditor/Language/CHS.xaml index 101e041..bc5a152 100644 --- a/BallanceTASEditor/Language/CHS.xaml +++ b/BallanceTASEditor/Language/CHS.xaml @@ -50,8 +50,27 @@ 在后方添加新项 在前方添加新项 + 添加项 + 个数 + 帧率 + 间隔时间 + + 取消 + + Ballance TAS 编辑器 + 基于 MIT 开源许可证发布 +版本:1.0 stable +程序:yyc12345. +图标设计:plAer_2 + 您想要关闭这个TAS文件吗? + 无法打开文件,文件可能不是合法的TAS文件。 + 输入新的数量(<=5 && >=30) + 警告 + TAS 文件(*.tas)|*.tas|所有文件(*.*)|*.* + 输入数字 + 无效的数字,请再试一次。 \ No newline at end of file diff --git a/BallanceTASEditor/Language/DefaultLanguage.xaml b/BallanceTASEditor/Language/DefaultLanguage.xaml index 5447638..d22de0a 100644 --- a/BallanceTASEditor/Language/DefaultLanguage.xaml +++ b/BallanceTASEditor/Language/DefaultLanguage.xaml @@ -45,13 +45,32 @@ Paste after this Paste before this Delete - Delete next frame + Delete this frame Delete last frame Add blank item after this Add blank item before this - + + Add Item + Count + FPS + Delta Time + OK + Cancel + + + Ballance TAS Editor - + Under MIT License +Version: 1.0 stable +Program: yyc12345. +Icon design: plAer_2 + Do you want to close this TAS file? + Fail to open file. This file might not a legal TAS file. + Input new count (<=5 && >=30) + Warning + TAS file(*.tas)|*.tas|All file(*.*)|*.* + Input number + Invalid number. Please input again. \ No newline at end of file diff --git a/BallanceTASEditor/MainWindow.xaml b/BallanceTASEditor/MainWindow.xaml index 04d8181..64109c2 100644 --- a/BallanceTASEditor/MainWindow.xaml +++ b/BallanceTASEditor/MainWindow.xaml @@ -8,7 +8,7 @@ xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore" mc:Ignorable="d" Title="{DynamicResource ui_MainWindow_Title}" Height="500" Width="800" KeyUp="funcWindow_KeyUp" - input:InputMethod.IsInputMethodEnabled="False" MouseWheel="funcWindow_MouseWheel"> + input:InputMethod.IsInputMethodEnabled="False" MouseWheel="funcWindow_MouseWheel" Icon="icon.ico"> @@ -18,6 +18,7 @@ + @@ -29,6 +30,7 @@ + @@ -40,6 +42,7 @@ + @@ -141,7 +144,7 @@ - + diff --git a/BallanceTASEditor/MainWindow.xaml.cs b/BallanceTASEditor/MainWindow.xaml.cs index 3ddb732..3d9a6db 100644 --- a/BallanceTASEditor/MainWindow.xaml.cs +++ b/BallanceTASEditor/MainWindow.xaml.cs @@ -69,6 +69,7 @@ namespace BallanceTASEditor { private void funcCommand_Menu_Display_Redo(object sender, ExecutedRoutedEventArgs e) => funcMenu_Display_Redo(sender, e); private void funcCommand_DataMenu_Cut(object sender, ExecutedRoutedEventArgs e) => funcDataMenu_Cut(sender, e); private void funcCommand_DataMenu_Copy(object sender, ExecutedRoutedEventArgs e) => funcDataMenu_Copy(sender, e); + private void funcCommand_DataMenu_PasteAfter(object sender, ExecutedRoutedEventArgs e) => funcDataMenu_PasteAfter(sender, e); private void funcCommand_DataMenu_DeleteAfter(object sender, ExecutedRoutedEventArgs e) => funcDataMenu_DeleteAfter(sender, e); private void funcCommand_DataMenu_DeleteBefore(object sender, ExecutedRoutedEventArgs e) => funcDataMenu_DeleteBefore(sender, e); private void funcCanExeCmd_Menu_File_Open(object sender, CanExecuteRoutedEventArgs e) => e.CanExecute = uiMenu_File_Open.IsEnabled; @@ -77,6 +78,7 @@ namespace BallanceTASEditor { private void funcCanExeCmd_Menu_Display_Redo(object sender, CanExecuteRoutedEventArgs e) => e.CanExecute = uiMenu_Display_Redo.IsEnabled; private void funcCanExeCmd_DataMenu_Cut(object sender, CanExecuteRoutedEventArgs e) => e.CanExecute = mViewer != null && uiDataMenu_Cut.IsEnabled; private void funcCanExeCmd_DataMenu_Copy(object sender, CanExecuteRoutedEventArgs e) => e.CanExecute = mViewer != null && uiDataMenu_Copy.IsEnabled; + private void funcCanExeCmd_DataMenu_PasteAfter(object sender, CanExecuteRoutedEventArgs e) => e.CanExecute = mViewer != null && uiDataMenu_PasteAfter.IsEnabled; private void funcCanExeCmd_DataMenu_DeleteAfter(object sender, CanExecuteRoutedEventArgs e) => e.CanExecute = mViewer != null && uiDataMenu_DeleteAfter.IsEnabled; private void funcCanExeCmd_DataMenu_DeleteBefore(object sender, CanExecuteRoutedEventArgs e) => e.CanExecute = mViewer != null && uiDataMenu_DeleteBefore.IsEnabled; @@ -88,7 +90,9 @@ namespace BallanceTASEditor { } private void funcMenu_Help_About(object sender, RoutedEventArgs e) { - MessageBox.Show("Under MIT License\nVersion: 1.0 beta\nyyc12345.", "Ballance TAS Editor", MessageBoxButton.OK, MessageBoxImage.Information); + MessageBox.Show(I18NProcessor.GetI18N("code_MainWindow_Menu_Help_About"), + I18NProcessor.GetI18N("code_Shared_ProgramName"), + MessageBoxButton.OK, MessageBoxImage.Information); } private void funcMenu_File_Open(object sender, RoutedEventArgs e) { @@ -108,7 +112,7 @@ namespace BallanceTASEditor { } private void funcMenu_File_Close(object sender, RoutedEventArgs e) { - if (!DialogUtil.ConfirmDialog("Do you want to close this TAS file?")) return; + if (!DialogUtil.ConfirmDialog(I18NProcessor.GetI18N("code_MainWindow_Menu_File_Close"))) return; mViewer.UpdateDataUI -= RefreshDataUI; mViewer.UpdateSelection -= RefreshSelection; @@ -122,7 +126,7 @@ namespace BallanceTASEditor { private void funcMenu_Display_ItemCount(object sender, RoutedEventArgs e) { int newvalue = 0; - if (DialogUtil.InputNumber("Input new count (>=5 && <=30)", 5, 30, ref newvalue)) { + if (DialogUtil.InputNumber(I18NProcessor.GetI18N("code_MainWindow_Menu_Display_ItemCount"), 5, 30, ref newvalue)) { ChangeItemCount(newvalue); } } @@ -322,7 +326,9 @@ namespace BallanceTASEditor { try { mFile = new TASFile(file); } catch { - MessageBox.Show("Fail to open file. This file might not a legal TAS file.", "Ballance TAS Editor", MessageBoxButton.OK, MessageBoxImage.Error); + MessageBox.Show(I18NProcessor.GetI18N("code_MainWindow_Menu_File_Open_Fail"), + I18NProcessor.GetI18N("code_Shared_ProgramName"), + MessageBoxButton.OK, MessageBoxImage.Error); mFile = null; return; } diff --git a/BallanceTASEditor/UI/AddItem.xaml b/BallanceTASEditor/UI/AddItem.xaml index a3f12a8..b5b5d02 100644 --- a/BallanceTASEditor/UI/AddItem.xaml +++ b/BallanceTASEditor/UI/AddItem.xaml @@ -6,7 +6,7 @@ xmlns:local="clr-namespace:BallanceTASEditor.UI" xmlns:converter="clr-namespace:BallanceTASEditor.UI" mc:Ignorable="d" - Title="Add Item" Height="200" Width="400" WindowStyle="ToolWindow" WindowStartupLocation="CenterOwner"> + Title="{DynamicResource ui_AddItem_Title}" Height="200" Width="400" WindowStyle="ToolWindow" WindowStartupLocation="CenterOwner" Icon="/BallanceTASEditor;component/icon.ico"> @@ -25,9 +25,9 @@ - - - + + + @@ -35,7 +35,7 @@ Text="{Binding Converter={StaticResource conv_fps2DeltaTime}, Mode=OneWay, ElementName=uiTextbox_FPS, Path=Text}"/> - -