Commit dee3822c 王海洋

修改语言等问题

1 个父辈 515ecb2f
......@@ -44,8 +44,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="Asa.Face.Control">
<HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath>
<Reference Include="Asa.Face.Control, Version=1.0.9259.19278, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Work\王海洋\NS100\SharedDll\Asa.Face.Control.dll</HintPath>
</Reference>
<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>
......
......@@ -441,7 +441,7 @@ namespace SmartScan
}
else if(YU=="日语")
{
YU = "jn-JS";
YU = "ja-JP";
}
else
{
......
......@@ -28,6 +28,9 @@ namespace SmartScan.SetControl.WPF
public event EventHandler VersionTextClicked;
public AboutWindowHost()
{
Asa.FaceControl. Language.LoadLanguage(BLLCommon.config.Language);
//Asa.FaceControl.Language.SetLanguage(this);
InitializeComponent();
// 假设您有关闭和最小化按钮,需要为它们添加事件处理
closeButton.Click += (s, e) => CloseRequested?.Invoke(this, EventArgs.Empty);
......@@ -51,22 +54,24 @@ namespace SmartScan.SetControl.WPF
}
};
string YU = BLLCommon.config.Language;
if (YU == "English")
{
text1.Text = "About";
text2.Text = "Material Registration System";
text1.Text = Asa.FaceControl.Language.Dialog("About_About", "关于");
text2.Text = Asa.FaceControl.Language.Dialog("About_mrs", "物料注册系统");
//if (YU == "English")
//{
// = "About";
// text2.Text = "Material Registration System";
}
else if (YU=="日语")
{
text1.Text = "About";
text2.Text = "材料登録システム";
}
else
{
text1.Text ="关于";
text2.Text = "物料注册系统";
}
//}
//else if (YU=="日语")
//{
// text1.Text = "About";
// text2.Text = "材料登録システム";
//}
//else
//{
// text1.Text ="关于";
// text2.Text = "物料注册系统";
//}
}
private void VersionTextBlock_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
......
......@@ -160,7 +160,7 @@ namespace SmartScan.SetControl.WPF
{
Name.Add("简体中文");
}
else if (fileNameWithoutExtension.ToLower() == "jn-JS".ToLower())
else if (fileNameWithoutExtension.ToLower() == "ja-JP".ToLower())
{
Name.Add("日语");
}
......@@ -260,7 +260,7 @@ namespace SmartScan.SetControl.WPF
}
else if (name == "日语")
{
CurrentLng = "jn-JS";
CurrentLng = "ja-JP";
}
}
......
......@@ -452,7 +452,7 @@ namespace SmartScan.SetControl.WPF
YU = "en-US";
}
else if (YU == "日语")
{ YU = "jn-JS"; }
{ YU = "ja-JP"; }
else
{
YU = "zh-CN";
......@@ -852,31 +852,38 @@ namespace SmartScan.SetControl.WPF
/// </summary>
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;
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";
lbl_Green.Text = "緑色 - 完全正確";
lbl_yellow.Text = "黄色 - OCR認識結果、検証が必要";
lbl_red.Text = "赤色 - 識別不能または問題あり";
}
else
{
YU = "zh-CN";
lbl_Green.Text = "绿色 - 完全正确";
lbl_yellow.Text = "黄色 - OCR识别结果,需要验证";
lbl_red.Text = "红色 - 无法识别或有问题";
}
//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 = "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();
// 计算识别率
......@@ -886,8 +893,9 @@ namespace SmartScan.SetControl.WPF
// 添加标题
TextBlock titleBlock = new TextBlock
{
Text = YU == "zh-CN" ? "识别结果" : (YU == "jn-JS" ? "認識結果" : "Recognition Result"),
FontSize = 16,
// Text = YU == "zh-CN" ? "识别结果" : (YU == "ja-JP" ? "認識結果" : "Recognition Result"),
Text= Asa.FaceControl.Language.Dialog("NS_KetRight_TextBlock", "识别结果"),
FontSize = 16,
Margin = new Thickness(0, 0, 0, 10),
Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#f0f0f0"))
};
......@@ -907,7 +915,7 @@ namespace SmartScan.SetControl.WPF
// 添加状态标题
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,
FontSize = 16,
Margin = new Thickness(0, 0, 0, 15),
......
......@@ -652,8 +652,8 @@ Visibility="Collapsed"/>
<Grid Grid.Row="2">
<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">
<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="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="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>
......
......@@ -21,7 +21,7 @@ using System.Windows.Navigation;
using System.Windows.Shapes;
using static SmartScan.SetControl.WPF.Model.NeoAlertBox;
using Button = System.Windows.Controls.Button;
using Asa.FaceControl;
namespace SmartScan.SetControl.WPF
{
/// <summary>
......@@ -73,7 +73,7 @@ namespace SmartScan.SetControl.WPF
public NS_Keyword()
{
InitializeComponent();
initKey();
}
......
......@@ -69,9 +69,9 @@
<Reference Include="Asa.Camera.VisionLib">
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
</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>
<HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath>
<HintPath>..\..\..\Work\王海洋\FaceControl\FaceControl\FaceControl\bin\Debug\Asa.Face.Control.dll</HintPath>
</Reference>
<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>
......@@ -522,7 +522,7 @@
<None Include="Language\en-US.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Language\jn-JS.lngres">
<None Include="Language\ja-JP.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Language\zh-CN.lngres">
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!