Commit dee3822c 王海洋

修改语言等问题

1 个父辈 515ecb2f
...@@ -44,8 +44,9 @@ ...@@ -44,8 +44,9 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath> <HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="Asa.Face.Control"> <Reference Include="Asa.Face.Control, Version=1.0.9259.19278, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Work\王海洋\NS100\SharedDll\Asa.Face.Control.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
......
...@@ -441,7 +441,7 @@ namespace SmartScan ...@@ -441,7 +441,7 @@ namespace SmartScan
} }
else if(YU=="日语") else if(YU=="日语")
{ {
YU = "jn-JS"; YU = "ja-JP";
} }
else else
{ {
......
...@@ -28,6 +28,9 @@ namespace SmartScan.SetControl.WPF ...@@ -28,6 +28,9 @@ namespace SmartScan.SetControl.WPF
public event EventHandler VersionTextClicked; public event EventHandler VersionTextClicked;
public AboutWindowHost() public AboutWindowHost()
{ {
Asa.FaceControl. Language.LoadLanguage(BLLCommon.config.Language);
//Asa.FaceControl.Language.SetLanguage(this);
InitializeComponent(); InitializeComponent();
// 假设您有关闭和最小化按钮,需要为它们添加事件处理 // 假设您有关闭和最小化按钮,需要为它们添加事件处理
closeButton.Click += (s, e) => CloseRequested?.Invoke(this, EventArgs.Empty); closeButton.Click += (s, e) => CloseRequested?.Invoke(this, EventArgs.Empty);
...@@ -51,22 +54,24 @@ namespace SmartScan.SetControl.WPF ...@@ -51,22 +54,24 @@ namespace SmartScan.SetControl.WPF
} }
}; };
string YU = BLLCommon.config.Language; string YU = BLLCommon.config.Language;
if (YU == "English") text1.Text = Asa.FaceControl.Language.Dialog("About_About", "关于");
{ text2.Text = Asa.FaceControl.Language.Dialog("About_mrs", "物料注册系统");
text1.Text = "About"; //if (YU == "English")
text2.Text = "Material Registration System"; //{
// = "About";
// text2.Text = "Material Registration System";
} //}
else if (YU=="日语") //else if (YU=="日语")
{ //{
text1.Text = "About"; // text1.Text = "About";
text2.Text = "材料登録システム"; // text2.Text = "材料登録システム";
} //}
else //else
{ //{
text1.Text ="关于"; // text1.Text ="关于";
text2.Text = "物料注册系统"; // text2.Text = "物料注册系统";
} //}
} }
private void VersionTextBlock_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) private void VersionTextBlock_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
......
...@@ -160,7 +160,7 @@ namespace SmartScan.SetControl.WPF ...@@ -160,7 +160,7 @@ namespace SmartScan.SetControl.WPF
{ {
Name.Add("简体中文"); Name.Add("简体中文");
} }
else if (fileNameWithoutExtension.ToLower() == "jn-JS".ToLower()) else if (fileNameWithoutExtension.ToLower() == "ja-JP".ToLower())
{ {
Name.Add("日语"); Name.Add("日语");
} }
...@@ -260,7 +260,7 @@ namespace SmartScan.SetControl.WPF ...@@ -260,7 +260,7 @@ namespace SmartScan.SetControl.WPF
} }
else if (name == "日语") else if (name == "日语")
{ {
CurrentLng = "jn-JS"; CurrentLng = "ja-JP";
} }
} }
......
...@@ -452,7 +452,7 @@ namespace SmartScan.SetControl.WPF ...@@ -452,7 +452,7 @@ namespace SmartScan.SetControl.WPF
YU = "en-US"; YU = "en-US";
} }
else if (YU == "日语") else if (YU == "日语")
{ YU = "jn-JS"; } { YU = "ja-JP"; }
else else
{ {
YU = "zh-CN"; YU = "zh-CN";
...@@ -852,31 +852,38 @@ namespace SmartScan.SetControl.WPF ...@@ -852,31 +852,38 @@ namespace SmartScan.SetControl.WPF
/// </summary> /// </summary>
private void UpdateRecognitionResults(Panel resultPanel) private void UpdateRecognitionResults(Panel resultPanel)
{ {
Asa.FaceControl.Language.LoadLanguage(BLLCommon.config.Language);
lbl_Green.Text= Asa.FaceControl.Language.Dialog("NS_KetRight_Green", "绿色 - 完全正确");
lbl_yellow.Text = Asa.FaceControl.Language.Dialog("NS_KetRight_yllow", "黄色 - OCR识别结果,需要验证");
lbl_red.Text = Asa.FaceControl.Language.Dialog("NS_KetRight_Red", "红色 - 无法识别或有问题");
string YU = BLLCommon.config.Language; string YU = BLLCommon.config.Language;
if (YU == "English")
{
YU = "en-US";
lbl_Green.Text = "Green - Completely correct";
lbl_yellow.Text = "Yellow - OCR recognition result,\r\n needs verification";
lbl_red.Text = "Red -Unable to recognize or \r\n has issues";
}
else if (YU == "日语")
{
YU = "jn-JS"; //if (YU == "English")
//{
lbl_Green.Text = "緑色 - 完全正確";
lbl_yellow.Text = "黄色 - OCR認識結果、検証が必要"; // YU = "en-US";
lbl_red.Text = "赤色 - 識別不能または問題あり"; // lbl_Green.Text = "Green - Completely correct";
} // lbl_yellow.Text = "Yellow - OCR recognition result,\r\n needs verification";
else // lbl_red.Text = "Red -Unable to recognize or \r\n has issues";
{ //}
YU = "zh-CN"; //else if (YU == "日语")
lbl_Green.Text = "绿色 - 完全正确"; //{
lbl_yellow.Text = "黄色 - OCR识别结果,需要验证";
lbl_red.Text = "红色 - 无法识别或有问题"; // YU = "ja-JP";
}
// lbl_Green.Text = "緑色 - 完全正確";
// lbl_yellow.Text = "黄色 - OCR認識結果、検証が必要";
// lbl_red.Text = "赤色 - 識別不能または問題あり";
//}
//else
//{
// YU = "zh-CN";
// lbl_Green.Text = "绿色 - 完全正确";
// lbl_yellow.Text = "黄色 - OCR识别结果,需要验证";
// lbl_red.Text = "红色 - 无法识别或有问题";
//}
resultPanel.Children.Clear(); resultPanel.Children.Clear();
// 计算识别率 // 计算识别率
...@@ -886,8 +893,9 @@ namespace SmartScan.SetControl.WPF ...@@ -886,8 +893,9 @@ namespace SmartScan.SetControl.WPF
// 添加标题 // 添加标题
TextBlock titleBlock = new TextBlock TextBlock titleBlock = new TextBlock
{ {
Text = YU == "zh-CN" ? "识别结果" : (YU == "jn-JS" ? "認識結果" : "Recognition Result"), // Text = YU == "zh-CN" ? "识别结果" : (YU == "ja-JP" ? "認識結果" : "Recognition Result"),
FontSize = 16, Text= Asa.FaceControl.Language.Dialog("NS_KetRight_TextBlock", "识别结果"),
FontSize = 16,
Margin = new Thickness(0, 0, 0, 10), Margin = new Thickness(0, 0, 0, 10),
Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#f0f0f0")) Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#f0f0f0"))
}; };
...@@ -907,7 +915,7 @@ namespace SmartScan.SetControl.WPF ...@@ -907,7 +915,7 @@ namespace SmartScan.SetControl.WPF
// 添加状态标题 // 添加状态标题
TextBlock statusLabel = new TextBlock TextBlock statusLabel = new TextBlock
{ {
Text = YU == "zh-CN" ? $"已检测字段: {validFields}/{totalFields}" : (YU == "jn-JS" ? $"検出されたフィールド: {validFields}/{totalFields}" : $"Detected Fields: {validFields}/{totalFields}") , Text = YU == "zh-CN" ? $"已检测字段: {validFields}/{totalFields}" : (YU == "ja-JP" ? $"検出されたフィールド: {validFields}/{totalFields}" : $"Detected Fields: {validFields}/{totalFields}") ,
FontWeight = FontWeights.Bold, FontWeight = FontWeights.Bold,
FontSize = 16, FontSize = 16,
Margin = new Thickness(0, 0, 0, 15), Margin = new Thickness(0, 0, 0, 15),
......
...@@ -652,8 +652,8 @@ Visibility="Collapsed"/> ...@@ -652,8 +652,8 @@ Visibility="Collapsed"/>
<Grid Grid.Row="2"> <Grid Grid.Row="2">
<TextBlock Background="#C1C1C1" Margin="0,13,0,40" Height="0.3" Grid.ColumnSpan="2"></TextBlock> <TextBlock Background="#C1C1C1" Margin="0,13,0,40" Height="0.3" Grid.ColumnSpan="2"></TextBlock>
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0 0 10 10"> <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0 0 10 10">
<Button Content="上移" Foreground="White" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Name="MoveUpKey" Height="50" Width="150" FontSize="14" Margin="5" Background="#4B78D0" Click="MoveUpKey_Click"></Button> <Button Content="" Foreground="White" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Name="MoveUpKey" Height="50" Width="150" FontSize="14" Margin="5" Background="#4B78D0" Click="MoveUpKey_Click"></Button>
<Button Content="下移" Foreground="White" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Name="MoveDownKey" Height="50" Width="150" FontSize="14" Margin="5" Background="#4B78D0" Click="MoveDownKey_Click"></Button> <Button Content="" Foreground="White" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Name="MoveDownKey" Height="50" Width="150" FontSize="14" Margin="5" Background="#4B78D0" Click="MoveDownKey_Click"></Button>
<Button Content="删除" Foreground="White" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Name="BtnDelKey" Height="50" Width="150" FontSize="14" Margin="5" Background="#4B78D0" Click="BtnDelKey_Click"></Button> <Button Content="删除" Foreground="White" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Name="BtnDelKey" Height="50" Width="150" FontSize="14" Margin="5" Background="#4B78D0" Click="BtnDelKey_Click"></Button>
<Button Content="保存" Foreground="White" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Name="FrmSet_BtnOK" Height="50" Width="150" FontSize="14" Margin="5" Background="#4B78D0" Click="BtnUpdateKey_Click"></Button> <Button Content="保存" Foreground="White" Style="{DynamicResource buttonStyle}" FontFamily="微软雅黑" Name="FrmSet_BtnOK" Height="50" Width="150" FontSize="14" Margin="5" Background="#4B78D0" Click="BtnUpdateKey_Click"></Button>
......
...@@ -21,7 +21,7 @@ using System.Windows.Navigation; ...@@ -21,7 +21,7 @@ using System.Windows.Navigation;
using System.Windows.Shapes; using System.Windows.Shapes;
using static SmartScan.SetControl.WPF.Model.NeoAlertBox; using static SmartScan.SetControl.WPF.Model.NeoAlertBox;
using Button = System.Windows.Controls.Button; using Button = System.Windows.Controls.Button;
using Asa.FaceControl;
namespace SmartScan.SetControl.WPF namespace SmartScan.SetControl.WPF
{ {
/// <summary> /// <summary>
...@@ -73,7 +73,7 @@ namespace SmartScan.SetControl.WPF ...@@ -73,7 +73,7 @@ namespace SmartScan.SetControl.WPF
public NS_Keyword() public NS_Keyword()
{ {
InitializeComponent(); InitializeComponent();
initKey(); initKey();
} }
......
...@@ -69,9 +69,9 @@ ...@@ -69,9 +69,9 @@
<Reference Include="Asa.Camera.VisionLib"> <Reference Include="Asa.Camera.VisionLib">
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath> <HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="Asa.Face.Control, Version=1.0.8893.18678, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Asa.Face.Control, Version=1.0.9259.19278, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath> <HintPath>..\..\..\Work\王海洋\FaceControl\FaceControl\FaceControl\bin\Debug\Asa.Face.Control.dll</HintPath>
</Reference> </Reference>
<Reference Include="ClosedXML, Version=0.105.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL"> <Reference Include="ClosedXML, Version=0.105.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.105.0\lib\netstandard2.0\ClosedXML.dll</HintPath> <HintPath>..\packages\ClosedXML.0.105.0\lib\netstandard2.0\ClosedXML.dll</HintPath>
...@@ -522,7 +522,7 @@ ...@@ -522,7 +522,7 @@
<None Include="Language\en-US.lngres"> <None Include="Language\en-US.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="Language\jn-JS.lngres"> <None Include="Language\ja-JP.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="Language\zh-CN.lngres"> <None Include="Language\zh-CN.lngres">
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!