-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ea1905
commit 0142121
Showing
7 changed files
with
202 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<Window x:Class="cw2tools.LocalStrings" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:cw2tools" | ||
mc:Ignorable="d" | ||
Title="LocalStrings" Height="450" Width="800"> | ||
<StackPanel> | ||
<TextBlock Text="语言LUT"/> | ||
<TextBox x:Name="LUT" HorizontalAlignment="Left" Width="100"/> | ||
<Button Content="查找" HorizontalAlignment="Left" Click="Button_Click"/> | ||
<TextBlock Text="语言代码"/> | ||
<TextBox x:Name="LanguageCode" HorizontalAlignment="Left" Width="100" Text="0"/> | ||
<TextBlock Text="字符串表"/> | ||
<TextBox x:Name="StringLut" HorizontalAlignment="Left" Width="100"/> | ||
<Button Content="查表" HorizontalAlignment="Left" Click="Button_Click_1"/> | ||
<Button Content="导出 csv" HorizontalAlignment="Left" Click="Button_Click_2"/> | ||
<TextBlock Text="字符串池基址"/> | ||
<TextBox x:Name="StringsBase" HorizontalAlignment="Left" Width="100"/> | ||
<Button Content="导入 csv(字符串池法)" HorizontalAlignment="Left"/> | ||
<Button Content="导入 csv(就地替换)" HorizontalAlignment="Left"/> | ||
</StackPanel> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Shapes; | ||
using static cw2tools.CasioInternal.Static; | ||
using static cw2tools.CasioInternal.Strings; | ||
|
||
namespace cw2tools | ||
{ | ||
/// <summary> | ||
/// LocalStrings.xaml 的交互逻辑 | ||
/// </summary> | ||
public unsafe partial class LocalStrings : Window | ||
{ | ||
public LocalStrings() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void Button_Click(object sender, RoutedEventArgs e) | ||
{ | ||
LUT.Text = $"{LookupLangauge():X4}"; | ||
} | ||
|
||
private void Button_Click_1(object sender, RoutedEventArgs e) | ||
{ | ||
var lut = Convert.ToUInt32(LUT.Text); | ||
var code = Convert.ToUInt32(LanguageCode.Text); | ||
StringLut.Text = $"{((ushort*)lut)[code]:X4}"; | ||
} | ||
|
||
private void Button_Click_2(object sender, RoutedEventArgs e) | ||
{ | ||
|
||
} | ||
} | ||
} |