Do some release work
* Add Crtl + V for paste after * Finish english readme * Add icon designed plaer_2 * Update I18N
This commit is contained in:
@ -36,6 +36,9 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.VisualBasic" />
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
@ -135,6 +138,8 @@
|
|||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup>
|
||||||
|
<Resource Include="icon.ico" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@ -50,8 +50,27 @@
|
|||||||
<sys:String x:Key="ui_TASFlow_Menu_AddAfter">在后方添加新项</sys:String>
|
<sys:String x:Key="ui_TASFlow_Menu_AddAfter">在后方添加新项</sys:String>
|
||||||
<sys:String x:Key="ui_TASFlow_Menu_AddBefore">在前方添加新项</sys:String>
|
<sys:String x:Key="ui_TASFlow_Menu_AddBefore">在前方添加新项</sys:String>
|
||||||
|
|
||||||
|
<sys:String x:Key="ui_AddItem_Title">添加项</sys:String>
|
||||||
|
<sys:String x:Key="ui_AddItem_Count">个数</sys:String>
|
||||||
|
<sys:String x:Key="ui_AddItem_FPS">帧率</sys:String>
|
||||||
|
<sys:String x:Key="ui_AddItem_DeltaTime">间隔时间</sys:String>
|
||||||
|
<sys:String x:Key="ui_AddItem_OK">好</sys:String>
|
||||||
|
<sys:String x:Key="ui_AddItem_Cancel">取消</sys:String>
|
||||||
|
|
||||||
<!-- code data-->
|
<!-- code data-->
|
||||||
|
|
||||||
|
<sys:String x:Key="code_Shared_ProgramName">Ballance TAS 编辑器</sys:String>
|
||||||
|
|
||||||
|
<sys:String x:Key="code_MainWindow_Menu_Help_About" xml:space="preserve">基于 MIT 开源许可证发布
|
||||||
|
版本:1.0 stable
|
||||||
|
程序:yyc12345.
|
||||||
|
图标设计:plAer_2</sys:String>
|
||||||
|
<sys:String x:Key="code_MainWindow_Menu_File_Close">您想要关闭这个TAS文件吗?</sys:String>
|
||||||
|
<sys:String x:Key="code_MainWindow_Menu_File_Open_Fail">无法打开文件,文件可能不是合法的TAS文件。</sys:String>
|
||||||
|
<sys:String x:Key="code_MainWindow_Menu_Display_ItemCount">输入新的数量(<=5 && >=30)</sys:String>
|
||||||
|
<sys:String x:Key="code_DialogUtil_Warning">警告</sys:String>
|
||||||
|
<sys:String x:Key="code_DialogUtil_FileFilter">TAS 文件(*.tas)|*.tas|所有文件(*.*)|*.*</sys:String>
|
||||||
|
<sys:String x:Key="code_DialogUtil_InputNumber_Title">输入数字</sys:String>
|
||||||
|
<sys:String x:Key="code_DialogUtil_InputNumber_Wrong">无效的数字,请再试一次。</sys:String>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@ -45,13 +45,32 @@
|
|||||||
<sys:String x:Key="ui_TASFlow_Menu_PasteAfter">Paste after this</sys:String>
|
<sys:String x:Key="ui_TASFlow_Menu_PasteAfter">Paste after this</sys:String>
|
||||||
<sys:String x:Key="ui_TASFlow_Menu_PasterBefore">Paste before this</sys:String>
|
<sys:String x:Key="ui_TASFlow_Menu_PasterBefore">Paste before this</sys:String>
|
||||||
<sys:String x:Key="ui_TASFlow_Menu_Delete">Delete</sys:String>
|
<sys:String x:Key="ui_TASFlow_Menu_Delete">Delete</sys:String>
|
||||||
<sys:String x:Key="ui_TASFlow_Menu_DeleteAfter">Delete next frame</sys:String>
|
<sys:String x:Key="ui_TASFlow_Menu_DeleteAfter">Delete this frame</sys:String>
|
||||||
<sys:String x:Key="ui_TASFlow_Menu_DeleteBefore">Delete last frame</sys:String>
|
<sys:String x:Key="ui_TASFlow_Menu_DeleteBefore">Delete last frame</sys:String>
|
||||||
<sys:String x:Key="ui_TASFlow_Menu_AddAfter">Add blank item after this</sys:String>
|
<sys:String x:Key="ui_TASFlow_Menu_AddAfter">Add blank item after this</sys:String>
|
||||||
<sys:String x:Key="ui_TASFlow_Menu_AddBefore">Add blank item before this</sys:String>
|
<sys:String x:Key="ui_TASFlow_Menu_AddBefore">Add blank item before this</sys:String>
|
||||||
|
|
||||||
|
<sys:String x:Key="ui_AddItem_Title">Add Item</sys:String>
|
||||||
|
<sys:String x:Key="ui_AddItem_Count">Count</sys:String>
|
||||||
|
<sys:String x:Key="ui_AddItem_FPS">FPS</sys:String>
|
||||||
|
<sys:String x:Key="ui_AddItem_DeltaTime">Delta Time</sys:String>
|
||||||
|
<sys:String x:Key="ui_AddItem_OK">OK</sys:String>
|
||||||
|
<sys:String x:Key="ui_AddItem_Cancel">Cancel</sys:String>
|
||||||
|
|
||||||
<!-- code data-->
|
<!-- code data-->
|
||||||
|
|
||||||
|
<sys:String x:Key="code_Shared_ProgramName">Ballance TAS Editor</sys:String>
|
||||||
|
|
||||||
|
<sys:String x:Key="code_MainWindow_Menu_Help_About" xml:space="preserve">Under MIT License
|
||||||
|
Version: 1.0 stable
|
||||||
|
Program: yyc12345.
|
||||||
|
Icon design: plAer_2</sys:String>
|
||||||
|
<sys:String x:Key="code_MainWindow_Menu_File_Close">Do you want to close this TAS file?</sys:String>
|
||||||
|
<sys:String x:Key="code_MainWindow_Menu_File_Open_Fail">Fail to open file. This file might not a legal TAS file.</sys:String>
|
||||||
|
<sys:String x:Key="code_MainWindow_Menu_Display_ItemCount">Input new count (<=5 && >=30)</sys:String>
|
||||||
|
<sys:String x:Key="code_DialogUtil_Warning">Warning</sys:String>
|
||||||
|
<sys:String x:Key="code_DialogUtil_FileFilter">TAS file(*.tas)|*.tas|All file(*.*)|*.*</sys:String>
|
||||||
|
<sys:String x:Key="code_DialogUtil_InputNumber_Title">Input number</sys:String>
|
||||||
|
<sys:String x:Key="code_DialogUtil_InputNumber_Wrong">Invalid number. Please input again.</sys:String>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@ -8,7 +8,7 @@
|
|||||||
xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore"
|
xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="{DynamicResource ui_MainWindow_Title}" Height="500" Width="800" KeyUp="funcWindow_KeyUp"
|
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">
|
||||||
|
|
||||||
<!-- shortcut defination-->
|
<!-- shortcut defination-->
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
@ -18,6 +18,7 @@
|
|||||||
<RoutedUICommand x:Key="commandMenu_Display_Redo"/>
|
<RoutedUICommand x:Key="commandMenu_Display_Redo"/>
|
||||||
<RoutedUICommand x:Key="commandDataMenu_Cut"/>
|
<RoutedUICommand x:Key="commandDataMenu_Cut"/>
|
||||||
<RoutedUICommand x:Key="commandDataMenu_Copy"/>
|
<RoutedUICommand x:Key="commandDataMenu_Copy"/>
|
||||||
|
<RoutedUICommand x:Key="commandDataMenu_PasteAfter"/>
|
||||||
<RoutedUICommand x:Key="commandDataMenu_DeleteAfter"/>
|
<RoutedUICommand x:Key="commandDataMenu_DeleteAfter"/>
|
||||||
<RoutedUICommand x:Key="commandDataMenu_DeleteBefore"/>
|
<RoutedUICommand x:Key="commandDataMenu_DeleteBefore"/>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
@ -29,6 +30,7 @@
|
|||||||
<KeyBinding Gesture="Ctrl+Y" Command="{StaticResource commandMenu_Display_Redo}"/>
|
<KeyBinding Gesture="Ctrl+Y" Command="{StaticResource commandMenu_Display_Redo}"/>
|
||||||
<KeyBinding Gesture="Ctrl+X" Command="{StaticResource commandDataMenu_Cut}"/>
|
<KeyBinding Gesture="Ctrl+X" Command="{StaticResource commandDataMenu_Cut}"/>
|
||||||
<KeyBinding Gesture="Ctrl+C" Command="{StaticResource commandDataMenu_Copy}"/>
|
<KeyBinding Gesture="Ctrl+C" Command="{StaticResource commandDataMenu_Copy}"/>
|
||||||
|
<KeyBinding Gesture="Ctrl+V" Command="{StaticResource commandDataMenu_PasteAfter}"/>
|
||||||
<KeyBinding Gesture="Delete" Command="{StaticResource commandDataMenu_DeleteAfter}"/>
|
<KeyBinding Gesture="Delete" Command="{StaticResource commandDataMenu_DeleteAfter}"/>
|
||||||
<KeyBinding Gesture="Back" Command="{StaticResource commandDataMenu_DeleteBefore}"/>
|
<KeyBinding Gesture="Back" Command="{StaticResource commandDataMenu_DeleteBefore}"/>
|
||||||
</Window.InputBindings>
|
</Window.InputBindings>
|
||||||
@ -40,6 +42,7 @@
|
|||||||
<CommandBinding Command="{StaticResource commandMenu_Display_Redo}" Executed="funcCommand_Menu_Display_Redo" CanExecute="funcCanExeCmd_Menu_Display_Redo"/>
|
<CommandBinding Command="{StaticResource commandMenu_Display_Redo}" Executed="funcCommand_Menu_Display_Redo" CanExecute="funcCanExeCmd_Menu_Display_Redo"/>
|
||||||
<CommandBinding Command="{StaticResource commandDataMenu_Cut}" Executed="funcCommand_DataMenu_Cut" CanExecute="funcCanExeCmd_DataMenu_Cut"/>
|
<CommandBinding Command="{StaticResource commandDataMenu_Cut}" Executed="funcCommand_DataMenu_Cut" CanExecute="funcCanExeCmd_DataMenu_Cut"/>
|
||||||
<CommandBinding Command="{StaticResource commandDataMenu_Copy}" Executed="funcCommand_DataMenu_Copy" CanExecute="funcCanExeCmd_DataMenu_Copy"/>
|
<CommandBinding Command="{StaticResource commandDataMenu_Copy}" Executed="funcCommand_DataMenu_Copy" CanExecute="funcCanExeCmd_DataMenu_Copy"/>
|
||||||
|
<CommandBinding Command="{StaticResource commandDataMenu_PasteAfter}" Executed="funcCommand_DataMenu_PasteAfter" CanExecute="funcCanExeCmd_DataMenu_PasteAfter"/>
|
||||||
<CommandBinding Command="{StaticResource commandDataMenu_DeleteAfter}" Executed="funcCommand_DataMenu_DeleteAfter" CanExecute="funcCanExeCmd_DataMenu_DeleteAfter"/>
|
<CommandBinding Command="{StaticResource commandDataMenu_DeleteAfter}" Executed="funcCommand_DataMenu_DeleteAfter" CanExecute="funcCanExeCmd_DataMenu_DeleteAfter"/>
|
||||||
<CommandBinding Command="{StaticResource commandDataMenu_DeleteBefore}" Executed="funcCommand_DataMenu_DeleteBefore" CanExecute="funcCanExeCmd_DataMenu_DeleteBefore"/>
|
<CommandBinding Command="{StaticResource commandDataMenu_DeleteBefore}" Executed="funcCommand_DataMenu_DeleteBefore" CanExecute="funcCanExeCmd_DataMenu_DeleteBefore"/>
|
||||||
</Window.CommandBindings>
|
</Window.CommandBindings>
|
||||||
@ -141,7 +144,7 @@
|
|||||||
<Separator/>
|
<Separator/>
|
||||||
<MenuItem x:Name="uiDataMenu_Cut" Header="{DynamicResource ui_TASFlow_Menu_Cut}" Click="funcDataMenu_Cut" InputGestureText="Ctrl + X"/>
|
<MenuItem x:Name="uiDataMenu_Cut" Header="{DynamicResource ui_TASFlow_Menu_Cut}" Click="funcDataMenu_Cut" InputGestureText="Ctrl + X"/>
|
||||||
<MenuItem x:Name="uiDataMenu_Copy" Header="{DynamicResource ui_TASFlow_Menu_Copy}" Click="funcDataMenu_Copy" InputGestureText="Ctrl + C"/>
|
<MenuItem x:Name="uiDataMenu_Copy" Header="{DynamicResource ui_TASFlow_Menu_Copy}" Click="funcDataMenu_Copy" InputGestureText="Ctrl + C"/>
|
||||||
<MenuItem x:Name="uiDataMenu_PasteAfter" Header="{DynamicResource ui_TASFlow_Menu_PasteAfter}" Click="funcDataMenu_PasteAfter"/>
|
<MenuItem x:Name="uiDataMenu_PasteAfter" Header="{DynamicResource ui_TASFlow_Menu_PasteAfter}" Click="funcDataMenu_PasteAfter" InputGestureText="Ctrl + V"/>
|
||||||
<MenuItem x:Name="uiDataMenu_PasteBefore" Header="{DynamicResource ui_TASFlow_Menu_PasterBefore}" Click="funcDataMenu_PasteBefore"/>
|
<MenuItem x:Name="uiDataMenu_PasteBefore" Header="{DynamicResource ui_TASFlow_Menu_PasterBefore}" Click="funcDataMenu_PasteBefore"/>
|
||||||
<Separator/>
|
<Separator/>
|
||||||
<MenuItem x:Name="uiDataMenu_Delete" Header="{DynamicResource ui_TASFlow_Menu_Delete}" Click="funcDataMenu_Delete"/>
|
<MenuItem x:Name="uiDataMenu_Delete" Header="{DynamicResource ui_TASFlow_Menu_Delete}" Click="funcDataMenu_Delete"/>
|
||||||
|
|||||||
@ -69,6 +69,7 @@ namespace BallanceTASEditor {
|
|||||||
private void funcCommand_Menu_Display_Redo(object sender, ExecutedRoutedEventArgs e) => funcMenu_Display_Redo(sender, e);
|
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_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_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_DeleteAfter(object sender, ExecutedRoutedEventArgs e) => funcDataMenu_DeleteAfter(sender, e);
|
||||||
private void funcCommand_DataMenu_DeleteBefore(object sender, ExecutedRoutedEventArgs e) => funcDataMenu_DeleteBefore(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;
|
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_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_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_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_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;
|
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) {
|
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) {
|
private void funcMenu_File_Open(object sender, RoutedEventArgs e) {
|
||||||
@ -108,7 +112,7 @@ namespace BallanceTASEditor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void funcMenu_File_Close(object sender, RoutedEventArgs e) {
|
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.UpdateDataUI -= RefreshDataUI;
|
||||||
mViewer.UpdateSelection -= RefreshSelection;
|
mViewer.UpdateSelection -= RefreshSelection;
|
||||||
@ -122,7 +126,7 @@ namespace BallanceTASEditor {
|
|||||||
|
|
||||||
private void funcMenu_Display_ItemCount(object sender, RoutedEventArgs e) {
|
private void funcMenu_Display_ItemCount(object sender, RoutedEventArgs e) {
|
||||||
int newvalue = 0;
|
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);
|
ChangeItemCount(newvalue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -322,7 +326,9 @@ namespace BallanceTASEditor {
|
|||||||
try {
|
try {
|
||||||
mFile = new TASFile(file);
|
mFile = new TASFile(file);
|
||||||
} catch {
|
} 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;
|
mFile = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
xmlns:local="clr-namespace:BallanceTASEditor.UI"
|
xmlns:local="clr-namespace:BallanceTASEditor.UI"
|
||||||
xmlns:converter="clr-namespace:BallanceTASEditor.UI"
|
xmlns:converter="clr-namespace:BallanceTASEditor.UI"
|
||||||
mc:Ignorable="d"
|
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">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<converter:AddItemConverter x:Key="conv_addItem"/>
|
<converter:AddItemConverter x:Key="conv_addItem"/>
|
||||||
<converter:FPS2DeltaTimeConverter x:Key="conv_fps2DeltaTime"/>
|
<converter:FPS2DeltaTimeConverter x:Key="conv_fps2DeltaTime"/>
|
||||||
@ -25,9 +25,9 @@
|
|||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Margin="5" Grid.Column="0" Grid.Row="0" Text="Count" VerticalAlignment="Center"/>
|
<TextBlock Margin="5" Grid.Column="0" Grid.Row="0" Text="{DynamicResource ui_AddItem_Count}" VerticalAlignment="Center"/>
|
||||||
<TextBlock Margin="5" Grid.Column="0" Grid.Row="1" Text="FPS" VerticalAlignment="Center"/>
|
<TextBlock Margin="5" Grid.Column="0" Grid.Row="1" Text="{DynamicResource ui_AddItem_FPS}" VerticalAlignment="Center"/>
|
||||||
<TextBlock Margin="5" Grid.Column="0" Grid.Row="2" Text="Delta Time" VerticalAlignment="Center"/>
|
<TextBlock Margin="5" Grid.Column="0" Grid.Row="2" Text="{DynamicResource ui_AddItem_DeltaTime}" VerticalAlignment="Center"/>
|
||||||
|
|
||||||
<TextBox x:Name="uiTextbox_Count" Margin="5" Padding="5" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
|
<TextBox x:Name="uiTextbox_Count" Margin="5" Padding="5" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
<TextBox x:Name="uiTextbox_FPS" Margin="5" Padding="5" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center"/>
|
<TextBox x:Name="uiTextbox_FPS" Margin="5" Padding="5" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center"/>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
Text="{Binding Converter={StaticResource conv_fps2DeltaTime}, Mode=OneWay, ElementName=uiTextbox_FPS, Path=Text}"/>
|
Text="{Binding Converter={StaticResource conv_fps2DeltaTime}, Mode=OneWay, ElementName=uiTextbox_FPS, Path=Text}"/>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Right" Grid.ColumnSpan="2" Grid.Row="4">
|
<StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Right" Grid.ColumnSpan="2" Grid.Row="4">
|
||||||
<Button x:Name="uiBtn_OK" Margin="5" Padding="5" Content="OK" MinWidth="50" Click="funcBtn_OK">
|
<Button x:Name="uiBtn_OK" Margin="5" Padding="5" Content="{DynamicResource ui_AddItem_OK}" MinWidth="50" Click="funcBtn_OK">
|
||||||
<Button.IsEnabled>
|
<Button.IsEnabled>
|
||||||
<MultiBinding Converter="{StaticResource conv_addItem}" Mode="OneWay">
|
<MultiBinding Converter="{StaticResource conv_addItem}" Mode="OneWay">
|
||||||
<Binding ElementName="uiTextbox_Count" Path="Text"/>
|
<Binding ElementName="uiTextbox_Count" Path="Text"/>
|
||||||
@ -43,7 +43,7 @@
|
|||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</Button.IsEnabled>
|
</Button.IsEnabled>
|
||||||
</Button>
|
</Button>
|
||||||
<Button x:Name="uiBtn_Cancel" Margin="5" Padding="5" Content="Cancel" MinWidth="50" Click="funcBtn_Cancel"/>
|
<Button x:Name="uiBtn_Cancel" Margin="5" Padding="5" Content="{DynamicResource ui_AddItem_Cancel}" MinWidth="50" Click="funcBtn_Cancel"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using BallanceTASEditor.Core;
|
||||||
|
|
||||||
namespace BallanceTASEditor.UI {
|
namespace BallanceTASEditor.UI {
|
||||||
public class DialogUtil {
|
public class DialogUtil {
|
||||||
@ -12,7 +13,7 @@ namespace BallanceTASEditor.UI {
|
|||||||
Microsoft.Win32.OpenFileDialog op = new Microsoft.Win32.OpenFileDialog();
|
Microsoft.Win32.OpenFileDialog op = new Microsoft.Win32.OpenFileDialog();
|
||||||
op.RestoreDirectory = true;
|
op.RestoreDirectory = true;
|
||||||
op.Multiselect = false;
|
op.Multiselect = false;
|
||||||
op.Filter = "TAS file(*.tas)|*.tas|All file(*.*)|*.*";
|
op.Filter = I18NProcessor.GetI18N("code_DialogUtil_FileFilter");
|
||||||
if (!(bool)op.ShowDialog()) return "";
|
if (!(bool)op.ShowDialog()) return "";
|
||||||
return op.FileName;
|
return op.FileName;
|
||||||
}
|
}
|
||||||
@ -20,24 +21,26 @@ namespace BallanceTASEditor.UI {
|
|||||||
public static string SaveFileDialog() {
|
public static string SaveFileDialog() {
|
||||||
Microsoft.Win32.SaveFileDialog op = new Microsoft.Win32.SaveFileDialog();
|
Microsoft.Win32.SaveFileDialog op = new Microsoft.Win32.SaveFileDialog();
|
||||||
op.RestoreDirectory = true;
|
op.RestoreDirectory = true;
|
||||||
op.Filter = "TAS file(*.tas)|*.tas|All file(*.*)|*.*";
|
op.Filter = I18NProcessor.GetI18N("code_DialogUtil_FileFilter");
|
||||||
if (!(bool)op.ShowDialog()) return "";
|
if (!(bool)op.ShowDialog()) return "";
|
||||||
return op.FileName;
|
return op.FileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool ConfirmDialog(string str) {
|
public static bool ConfirmDialog(string str) {
|
||||||
var result = MessageBox.Show(str, "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning);
|
var result = MessageBox.Show(str, I18NProcessor.GetI18N("code_DialogUtil_Warning"), MessageBoxButton.YesNo, MessageBoxImage.Warning);
|
||||||
return (result == MessageBoxResult.Yes);
|
return (result == MessageBoxResult.Yes);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool InputNumber(string title, int min, int max, ref int result) {
|
public static bool InputNumber(string title, int min, int max, ref int result) {
|
||||||
while (true) {
|
while (true) {
|
||||||
var dialog = Interaction.InputBox(title, "Input number", "");
|
var dialog = Interaction.InputBox(title, I18NProcessor.GetI18N("code_DialogUtil_InputNumber_Title"), "");
|
||||||
if (dialog == "") return false;
|
if (dialog == "") return false;
|
||||||
if (int.TryParse(dialog, out result)) {
|
if (int.TryParse(dialog, out result)) {
|
||||||
if (result <= max && result >= min) break;
|
if (result <= max && result >= min) break;
|
||||||
}
|
}
|
||||||
MessageBox.Show("Invalid number. Please input again", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning);
|
MessageBox.Show(I18NProcessor.GetI18N("code_DialogUtil_InputNumber_Wrong"),
|
||||||
|
I18NProcessor.GetI18N("code_DialogUtil_Warning"),
|
||||||
|
MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
BallanceTASEditor/icon.ico
Normal file
BIN
BallanceTASEditor/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 264 KiB |
115
README.md
115
README.md
@ -1 +1,114 @@
|
|||||||
# Ballance TAS Editor
|
# Ballance TAS Editor
|
||||||
|
|
||||||
|
A editor written for TAS file editing.
|
||||||
|
|
||||||
|
## Basic Interface
|
||||||
|
|
||||||
|
### Program Menu
|
||||||
|
|
||||||
|
* File
|
||||||
|
* Open: Open a TAS file.
|
||||||
|
* Save: Save modifications to opended TAS file.
|
||||||
|
* Save as...: Save the modifications as a new TAS file and switch to the new file.
|
||||||
|
* Close: Close current file.
|
||||||
|
* Edit
|
||||||
|
* Undo: Undo a operation.
|
||||||
|
* Redo: Redo previous undo operation.
|
||||||
|
* Item Count: Set the count of items showed in editor panel.
|
||||||
|
* Overwritten Paste: Switch paste mode between Overwritten Mode and Insert Mode.
|
||||||
|
* Horizontal Layout: Switch editor layout between horzontal layout and vertical layout.
|
||||||
|
* Help
|
||||||
|
* Report Bugs: Open a web page to report bugs about this program.
|
||||||
|
* About: Open a dialog to show some infomations about this prrogram.
|
||||||
|
|
||||||
|
### TAS Unit Menu
|
||||||
|
|
||||||
|
Right click TAS unit will open a menu. The enable statue of each is decided by your current tools and selected items.
|
||||||
|
|
||||||
|
|Operation|Needed mode|Needed selection|What the operation do|
|
||||||
|
|:---|:---|:---|:---|
|
||||||
|
|Set|Fill mode|Multiple selection|Set selected units as *set* status|
|
||||||
|
|Unset|Fill mode|Multiple selection|Set selected units as *unset* status|
|
||||||
|
|Cut|Cursor mode|Multiple selection|Cut selected units|
|
||||||
|
|Copy|Cursor mode|Multiple selection|Copy selected units|
|
||||||
|
|Paste after this|Cursor mode|Single selection|Pasted copied units after selected unit|
|
||||||
|
|Paste before this|Cursor mode|Single selection|Pasted copied units before selected unit|
|
||||||
|
|Delete|Cursor mode|Single selection|Delete selected units|
|
||||||
|
|Delete this frame|Cursor mode|Single selection|Delete selected unit, and move selection to the next unit|
|
||||||
|
|Delete last frame|Cursor mode|Single selection|Delete one unit aheading of selected unit|
|
||||||
|
|Add blank item after this|Cursor mode|Single selection|Add blank unit after selected unit|
|
||||||
|
|Add blank item before this|Cursor mode|Single selection|Add blank unit before selected unit|
|
||||||
|
|
||||||
|
### Status Bar
|
||||||
|
|
||||||
|
A status bar will be shown at the bottom of window if you opended a TAS file. The item located in status bar from left to right is: Current tools mode, Overwritten paste status, Current selected region.
|
||||||
|
|
||||||
|
## View
|
||||||
|
|
||||||
|
### Basic Operation
|
||||||
|
|
||||||
|
Once a file opened, a slider will be placed at the bottom of window. You can drag it and go to any position of this file which you want to browse.
|
||||||
|
4 buttons were located at the left of slider, from left to right is: fast rewind, rewind, forward, fast forward. Fase backward and fast forward will rewind or forward the number of units by one page at a time.
|
||||||
|
|
||||||
|
If you want to change the count of shown units in display panel, please use Edit - Item Count to change it.
|
||||||
|
|
||||||
|
### Quick Operation
|
||||||
|
|
||||||
|
The key ASDF of keyboard are corresponding with the functions of 4 buttons.
|
||||||
|
|
||||||
|
A mouse wheel will scroll 1 TAS unit.
|
||||||
|
Or, if you press Shift at the same time, it will scroll 1 page TAS units.
|
||||||
|
Or, if you press Crtl at the same time, it will increase or decrease the count of shown item in display panel.
|
||||||
|
|
||||||
|
### Horzontal Layout and Vertical Layout
|
||||||
|
|
||||||
|
After opening a file, you can use Edit - Horizontal Layout to switch layout between horzontal layout and vertical layout. Different layouts suit for different people. Please choose your favorite layout freely.
|
||||||
|
|
||||||
|
## Mode Introduction
|
||||||
|
|
||||||
|
### Basic Mode
|
||||||
|
|
||||||
|
Once ths file opened, 3 tools buttons were placed at the top of window. They are:
|
||||||
|
|
||||||
|
* Cursor mode: Allow you pick TAS unit by column. In this mode, you can copy, paste, insert, delete and etc...
|
||||||
|
* Fill mode: Allow you select TAS unit by cell. And you can set or unset the status of cells.
|
||||||
|
* Draw mode: See cursor as brush. Flip the set status of clicked cell.
|
||||||
|
|
||||||
|
### Multiple and Single Selection
|
||||||
|
|
||||||
|
Cursor mode allow single selection. Click a TAS unit directly, you can select it.
|
||||||
|
|
||||||
|
Cursor mode and Fill mode allow multiple selection. For a multiple selection, you should click a cell as the start point, then hold on shift to click another cell, as the end of selection.
|
||||||
|
Click a cell again will start a new selection, hold shift click a cell to finish the new multiple selection.
|
||||||
|
If you want to multiple select a single cell(if operation require), you can hold on shift to click the start of selection to finish a single cell's multiple selection.
|
||||||
|
|
||||||
|
### Highlight of Selection
|
||||||
|
|
||||||
|
In cursor mode, selected TAS unit will show a orange rectangle at the top of them.
|
||||||
|
|
||||||
|
In fill mode, selected cell will show with orange border.
|
||||||
|
|
||||||
|
## Special Operation
|
||||||
|
|
||||||
|
### Overwritten Paste and Insert Paste
|
||||||
|
|
||||||
|
Paste have 2 mode, overwritten paste and insert paste.
|
||||||
|
Insert will insert copied content before or after selected unit.
|
||||||
|
However, overwrite pasting will use the currently selected cell as the beginning or end of the paste, and write the contents of the clipboard forward or backward directly. The original data of affected unit will be wipe out. If the length of data is not enough, additional items will be added.
|
||||||
|
|
||||||
|
### Shortcut
|
||||||
|
|
||||||
|
* `Ctrl + O`:Open file
|
||||||
|
* `Ctrl + S`:Save file
|
||||||
|
* `Ctrl + Z`:Undo
|
||||||
|
* `Ctrl + Y`:Redo
|
||||||
|
* `Ctrl + X`:Cut
|
||||||
|
* `Ctrl + C`:Copy
|
||||||
|
* `Ctrl + V`:Paste After
|
||||||
|
* `Delete`:Delete this frame
|
||||||
|
* `Backspace`:Delete last frame
|
||||||
|
|
||||||
|
## Something Went Wrong
|
||||||
|
|
||||||
|
If program crashed, program will output a error log in the folder called `logs`. Please send error log to developer to help us to locate and reproduce error.
|
||||||
|
|
||||||
|
|||||||
@ -104,6 +104,7 @@
|
|||||||
* `Ctrl + Y`:重做
|
* `Ctrl + Y`:重做
|
||||||
* `Ctrl + X`:剪切
|
* `Ctrl + X`:剪切
|
||||||
* `Ctrl + C`:复制
|
* `Ctrl + C`:复制
|
||||||
|
* `Ctrl + V`:向后粘贴
|
||||||
* `Delete`:向后删除
|
* `Delete`:向后删除
|
||||||
* `Backspace`:向前删除
|
* `Backspace`:向前删除
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user