-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
15 changed files
with
929 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27703.2026 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TenchoNihonGo", "TenchoNihonGo\TenchoNihonGo.csproj", "{0F0AF66A-465F-4B39-B5C0-6B5CDB467C30}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|x86 = Debug|x86 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{0F0AF66A-465F-4B39-B5C0-6B5CDB467C30}.Debug|x86.ActiveCfg = Debug|x86 | ||
{0F0AF66A-465F-4B39-B5C0-6B5CDB467C30}.Debug|x86.Build.0 = Debug|x86 | ||
{0F0AF66A-465F-4B39-B5C0-6B5CDB467C30}.Release|x86.ActiveCfg = Release|x86 | ||
{0F0AF66A-465F-4B39-B5C0-6B5CDB467C30}.Release|x86.Build.0 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {207D2501-DEC8-4F40-B74D-C32A08628665} | ||
EndGlobalSection | ||
EndGlobal |
Binary file not shown.
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,8 @@ | ||
<Application x:Class="TenchoNihonGo.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
StartupUri="MainWindow.xaml"> | ||
<Application.Resources> | ||
|
||
</Application.Resources> | ||
</Application> |
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,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using System.Data; | ||
using System.Linq; | ||
using System.Windows; | ||
|
||
namespace TenchoNihonGo | ||
{ | ||
/// <summary> | ||
/// App.xaml 的交互逻辑 | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
} | ||
} |
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,25 @@ | ||
<Window x:Class="TenchoNihonGo.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
Title="天朝日語 2.0" Height="400" Width="720" MinHeight="400" MinWidth="720"> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="*" /> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="292*" /> | ||
<ColumnDefinition Width="96" /> | ||
<ColumnDefinition Width="292*" /> | ||
</Grid.ColumnDefinitions> | ||
|
||
<TextBox Grid.Column="0" Text="少し歩き疲れたんだ 少し休みたいんだけど 時間は刻一刻残酷と 私を引っぱっていくんだ 作者:Lance.Moe HP:http://lance.moe/post-289.html CTRL+Z可以撤銷 2016-06-08" Margin="12,12,12,12" Name="editInput" FontFamily="Meiryo" FontSize="14" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" /> | ||
<TextBox Grid.Column="3" Margin="12,12,12,12" Name="editOutput" FontFamily="Meiryo" FontSize="14" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" /> | ||
<Button Grid.Column="1" Content="轉平假名=>" Height="24" Margin="0,12,0,0" Name="btnToHiragana" VerticalAlignment="Top" Click="btnToHiragana_Click" FontFamily="Meiryo UI" FontSize="14" /> | ||
<Button Grid.Column="1" Content="轉片假名=>" Height="24" Margin="0,48,0,0" Name="btnToKatakana" VerticalAlignment="Top" Click="btnToKatakana_Click" FontFamily="Meiryo UI" FontSize="14" /> | ||
<Button Grid.Column="1" Content="轉羅馬音=>" Height="24" Margin="0,84,0,0" Name="btnToRoman" VerticalAlignment="Top" FontFamily="Meiryo UI" FontSize="14" Click="btnToRoman_Click" /> | ||
<Button Grid.Column="1" Content="轉諧音=>" Height="24" Margin="0,120,0,0" Name="btnToXieyin" VerticalAlignment="Top" FontFamily="Meiryo UI" FontSize="14" Click="btnToXieyin_Click" /> | ||
<Button Grid.Column="1" Content="<=假名拼漢字" Height="24" Margin="0,0,0,48" Name="btnToKanji" VerticalAlignment="Bottom" Click="btnToKanji_Click" FontFamily="Meiryo UI" FontSize="14" /> | ||
<Button Grid.Column="1" Content="<=罗馬拼假名" Margin="0,0,0,12" Name="btnRomanToKana" FontFamily="Meiryo UI" FontSize="14" Click="btnRomanToKana_Click" Height="24" VerticalAlignment="Bottom" /> | ||
|
||
</Grid> | ||
</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,160 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
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.Navigation; | ||
using System.Windows.Shapes; | ||
|
||
using System.Runtime.InteropServices; | ||
using System.Runtime.CompilerServices; | ||
|
||
using TenchoNihonGo.Utils; | ||
// Conversion mode (dwCMode) | ||
|
||
|
||
namespace TenchoNihonGo | ||
{ | ||
/// <summary> | ||
/// MainWindow.xaml 的交互逻辑 | ||
/// </summary> | ||
public partial class MainWindow : Window | ||
{ | ||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void btnToHiragana_Click(object sender, RoutedEventArgs e) | ||
{ | ||
try | ||
{ | ||
CFELanguage vLanguage = new CFELanguage(); | ||
vLanguage.Open(); | ||
|
||
string strInput = editInput.Text; | ||
string strOutput = vLanguage.GetJMorphResult(CFELanguage.FELANG_REQ_REV, CFELanguage.FELANG_CMODE_HIRAGANAOUT, strInput.Length, strInput, IntPtr.Zero); | ||
|
||
editOutput.Text = strOutput; | ||
vLanguage.Close(); | ||
} | ||
catch | ||
{ | ||
|
||
} | ||
} | ||
|
||
private void btnToKanji_Click(object sender, RoutedEventArgs e) | ||
{ | ||
try | ||
{ | ||
CFELanguage vLanguage = new CFELanguage(); | ||
vLanguage.Open(); | ||
|
||
string strOutput = editOutput.Text; | ||
string strInput = vLanguage.GetJMorphResult(CFELanguage.FELANG_REQ_CONV, CFELanguage.FELANG_CMODE_HIRAGANAOUT, strOutput.Length, strOutput, IntPtr.Zero); | ||
|
||
editInput.Text = strInput; | ||
|
||
vLanguage.Close(); | ||
} | ||
catch | ||
{ | ||
|
||
} | ||
} | ||
|
||
private void btnToKatakana_Click(object sender, RoutedEventArgs e) | ||
{ | ||
try | ||
{ | ||
CFELanguage vLanguage = new CFELanguage(); | ||
vLanguage.Open(); | ||
|
||
string strInput = editInput.Text; | ||
string strOutput = vLanguage.GetJMorphResult(CFELanguage.FELANG_REQ_REV, CFELanguage.FELANG_CMODE_KATAKANAOUT, strInput.Length, strInput, IntPtr.Zero); | ||
|
||
editOutput.Text = strOutput; | ||
vLanguage.Close(); | ||
} | ||
catch | ||
{ | ||
|
||
} | ||
} | ||
|
||
private void btnRomanToKana_Click(object sender, RoutedEventArgs e) | ||
{ | ||
|
||
|
||
try | ||
{ | ||
CFELanguage vLanguage = new CFELanguage(); | ||
vLanguage.Open(); | ||
|
||
string strInput = ""; | ||
string strOutput = editOutput.Text; | ||
|
||
strInput = vLanguage.GetJMorphResult(CFELanguage.FELANG_REQ_REV, CFELanguage.FELANG_CMODE_PRECONV, strOutput.Length, strOutput, IntPtr.Zero); | ||
|
||
editInput.Text = strInput; | ||
vLanguage.Close(); | ||
} | ||
catch | ||
{ | ||
|
||
} | ||
|
||
} | ||
|
||
private void btnToRoman_Click(object sender, RoutedEventArgs e) | ||
{ | ||
try | ||
{ | ||
CFELanguage vLanguage = new CFELanguage(); | ||
vLanguage.Open(); | ||
|
||
string strInput = editInput.Text; | ||
string strOutput = vLanguage.GetJMorphResult(CFELanguage.FELANG_REQ_REV, CFELanguage.FELANG_CMODE_KATAKANAOUT, strInput.Length, strInput, IntPtr.Zero); | ||
|
||
strOutput = CLSRoman.GetRomaji(strOutput); | ||
|
||
|
||
editOutput.Text = strOutput; | ||
vLanguage.Close(); | ||
} | ||
catch | ||
{ | ||
|
||
} | ||
} | ||
|
||
private void btnToXieyin_Click(object sender, RoutedEventArgs e) | ||
{ | ||
try | ||
{ | ||
CFELanguage vLanguage = new CFELanguage(); | ||
vLanguage.Open(); | ||
|
||
string strInput = editInput.Text; | ||
string strOutput = vLanguage.GetJMorphResult(CFELanguage.FELANG_REQ_REV, CFELanguage.FELANG_CMODE_KATAKANAOUT, strInput.Length, strInput, IntPtr.Zero); | ||
|
||
strOutput = CLSRoman.GetXieyin(strOutput); | ||
|
||
|
||
editOutput.Text = strOutput; | ||
vLanguage.Close(); | ||
} | ||
catch | ||
{ | ||
|
||
} | ||
} | ||
} | ||
} |
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,55 @@ | ||
using System.Reflection; | ||
using System.Resources; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
using System.Windows; | ||
|
||
// 有关程序集的常规信息通过以下 | ||
// 特性集控制。更改这些特性值可修改 | ||
// 与程序集关联的信息。 | ||
[assembly: AssemblyTitle("TenchoNihonGo")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("TenchoNihonGo")] | ||
[assembly: AssemblyCopyright("Copyright © 2016")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// 将 ComVisible 设置为 false 使此程序集中的类型 | ||
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, | ||
// 则将该类型上的 ComVisible 特性设置为 true。 | ||
[assembly: ComVisible(false)] | ||
|
||
//若要开始生成可本地化的应用程序,请在 | ||
//<PropertyGroup> 中的 .csproj 文件中 | ||
//设置 <UICulture>CultureYouAreCodingWith</UICulture>。例如,如果您在源文件中 | ||
//使用的是美国英语,请将 <UICulture> 设置为 en-US。然后取消 | ||
//对以下 NeutralResourceLanguage 特性的注释。更新 | ||
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 | ||
|
||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] | ||
|
||
|
||
[assembly: ThemeInfo( | ||
ResourceDictionaryLocation.None, //主题特定资源词典所处位置 | ||
//(在页面或应用程序资源词典中 | ||
// 未找到某个资源的情况下使用) | ||
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 | ||
//(在页面、应用程序或任何主题特定资源词典中 | ||
// 未找到某个资源的情况下使用) | ||
)] | ||
|
||
|
||
// 程序集的版本信息由下面四个值组成: | ||
// | ||
// 主版本 | ||
// 次版本 | ||
// 内部版本号 | ||
// 修订号 | ||
// | ||
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, | ||
// 方法是按如下所示使用“*”: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.