Commit 4fe808a8 LN

1

1 个父辈 1cbf2cc2
正在显示 85 个修改的文件 包含 194 行增加35 行删除
......@@ -51,7 +51,7 @@ namespace OnlineStore.ACSingleStore
{
this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl();
control.IOName = ioValue.ElectricalDefinition + "_" + ioValue.Explain;
control.IOName = ioValue.ElectricalDefinition + "_" + ResourceCulture.GetString(ioValue.ElectricalDefinition, ioValue.Explain);
control.IOValue = 0;
control.isCanClick = false;
control.Name = "IO_" + ioValue.ProName;
......@@ -69,7 +69,7 @@ namespace OnlineStore.ACSingleStore
{
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl();
control.IOName = ioValue.ElectricalDefinition + "_" + ioValue.Explain;
control.IOName = ioValue.ElectricalDefinition + "_" + ResourceCulture.GetString(ioValue.ElectricalDefinition, ioValue.Explain);
control.IOValue = 0;
control.isCanClick = true;
//control.Location = new System.Drawing.Point(0, 25*roleindex);
......
......@@ -163,6 +163,17 @@ namespace OnlineStore.ACSingleStore
groupCode.Visible = false;
}
private string WaitStart = ResourceCulture.GetString("等待启动");
private string dooropen = ResourceCulture.GetString("前门未关");
private string HasWare = ResourceCulture.GetString("叉子料盘检测有料,请检查");
private string StartAuto = ResourceCulture.GetString("开始自动出入库");
private string StopAuto = ResourceCulture.GetString("停止自动出入库");
private string AutoOut = ResourceCulture.GetString("自动出库:");
private string AutoIn = ResourceCulture.GetString("自动入库:");
public static string cannotMove = ResourceCulture.GetString("定位气缸不在下降端,不能移动进出轴");
public static string warn = ResourceCulture.GetString("警告");
private string StartCycle = ResourceCulture.GetString("开始循环出库");
private string StopCycle = ResourceCulture.GetString("停止循环出库");
private DateTime preReadModblsTime = DateTime.Now;
private void timer1_Tick(object sender, EventArgs e)
{
......@@ -228,7 +239,7 @@ namespace OnlineStore.ACSingleStore
//如果不在出入库中,且叉子上有信号,需要提示检查叉子
if (store.storeRunStatus.Equals(StoreRunStatus.Runing) && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
lblWarnMsg.Text = lblWarnMsg.Text + " 叉子料盘检测有料,请检查";
lblWarnMsg.Text = lblWarnMsg.Text + " "+ HasWare;
}
if (store.TempOrHumidityIsAlarm)
{
......@@ -238,14 +249,14 @@ namespace OnlineStore.ACSingleStore
{
string msg = store.autoMsg;
lblMsg.Text = msg;
if (btnStartAuTo.Text.Equals("开始自动出入库"))
if (btnStartAuTo.Text.Equals(StartAuto))
{
btnStartAuTo.Text = "停止自动出入库";
btnStartAuTo.Text = StopAuto;
}
try
{
msg = msg.Replace("自动出库:", "");
msg = msg.Replace("自动入库:", "");
msg = msg.Replace(AutoOut, "");
msg = msg.Replace(AutoIn, "");
int index = store.PositionNumList.IndexOf(msg);
if (index >= 0 && (!msg.Equals("")))
{
......@@ -257,17 +268,17 @@ namespace OnlineStore.ACSingleStore
else
{
// lblMsg.Text = "没有开启自动出入库";
if (btnStartAuTo.Text.Equals("停止自动出入库"))
if (btnStartAuTo.Text.Equals(StopAuto))
{
btnStartAuTo.Text = "开始自动出入库";
btnStartAuTo.Text = StartAuto;
}
}
}
else
{
lblThisSta.Text = "等待启动";
lblThisSta.Text = WaitStart;
lblWarnMsg.Text = "";
btnStartAuTo.Text = "开始自动出入库";
btnStartAuTo.Text = StartAuto;
}
}
......@@ -662,11 +673,6 @@ namespace OnlineStore.ACSingleStore
MyMessage.Show("请先启动料仓!");
}
}
//private void btnAxisConfig_Click(object sender, EventArgs e)
//{
// FormManager.ShowAxisConfig(store);
//}
private void 轴卡点动ToolStripMenuItem_Click(object sender, EventArgs e)
{
......@@ -738,16 +744,6 @@ namespace OnlineStore.ACSingleStore
private void 扫码测试ToolStripMenuItem_Click(object sender, EventArgs e)
{
//IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
//string message = "";
//List<string> codeList = CodeManager.CameraScan();
//foreach (string str in codeList)
//{
// message = message + str + "##";
//}
//LogUtil.info("扫码测试收到二维码 :" + message);
//IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.LOW);
store.dlScanSocket.StartConnect();
store.GetCameraCode();
}
......@@ -1020,11 +1016,11 @@ namespace OnlineStore.ACSingleStore
{
if (status)
{
btnDebug.Text = "禁用调试";
btnDebug.Text = ResourceCulture.GetString("禁用调试");
}
else
{
btnDebug.Text = "启用调试";
btnDebug.Text = ResourceCulture.GetString("启用调试");
}
axisMoveControl1.Enabled = status;
groupInout.Enabled = status;
......@@ -1032,7 +1028,7 @@ namespace OnlineStore.ACSingleStore
private void btnDebug_Click(object sender, EventArgs e)
{
if (btnDebug.Text.Equals("启用调试"))
if (btnDebug.Text.Equals(ResourceCulture.GetString("启用调试")))
{
DebugStatus(true);
}
......@@ -1111,5 +1107,41 @@ namespace OnlineStore.ACSingleStore
this.LanguageProcess();
}
public override void LanguagePro()
{
if (store != null)
{
axisMoveControl1.LoadData(store, store.moveAxisList.ToArray());
}
string className = this.ClassName;
CurrLanguage = ResourceCulture.CurrLanguage;
WaitStart = ResourceCulture.GetString("等待启动");
dooropen = ResourceCulture.GetString("前门未关");
HasWare = ResourceCulture.GetString("叉子料盘检测有料,请检查");
StartAuto = ResourceCulture.GetString("开始自动出入库");
StopAuto = ResourceCulture.GetString("停止自动出入库");
AutoOut = ResourceCulture.GetString("自动出库:");
AutoIn = ResourceCulture.GetString("自动入库:");
cannotMove = ResourceCulture.GetString("定位气缸不在下降端,不能移动进出轴");
warn = ResourceCulture.GetString("警告");
StartCycle = ResourceCulture.GetString("开始循环出库");
StopCycle = ResourceCulture.GetString("停止循环出库");
显示ToolStripMenuItem.Text = ResourceCulture.GetString(ResourceCulture.GetTextIdStr(className, 显示ToolStripMenuItem.Name), 显示ToolStripMenuItem.Text);
toolStripMenuItem1.Text = ResourceCulture.GetString(ResourceCulture.GetTextIdStr(className, toolStripMenuItem1.Name), toolStripMenuItem1.Text);
notifyIcon1.Text = this.Text;
if (CurrLanguage.Equals(ResourceCulture.China))
{
LogUtil.logBox = this.richTextBox1;
}
else
{
LogUtil.ClearLog();
LogUtil.logBox = null;
this.richTextBox1.Clear();
}
}
}
}
using OnlineStore.Common;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Globalization;
......@@ -44,8 +45,8 @@ namespace OnlineStore
private static void LoadData()
{
//ResourceControl.GetStringEvent += GetString;
//CSVResourceControl.GetStrEvent += GetString;
//CSVResourceControl.GetStringEvent += GetString;
CSVResourceControl.GetStrEvent += GetString;
CSVResourceControl.GetStringEvent += GetString;
CodeLibrary.CodeResourceControl.GetLanguageEvent += CodeResourceControl_GetLanguageEvent;
//string englishPath = Application.StartupPath + @"\resource\en-US.resource";
//string chinaPath = Application.StartupPath + @"\resource\zh-CN.resource";
......@@ -60,6 +61,8 @@ namespace OnlineStore
string[] lines = File.ReadAllLines(rPath);
foreach (string line in lines)
{
try
{
if (String.IsNullOrEmpty(line))
{
continue;
......@@ -81,6 +84,10 @@ namespace OnlineStore
EnglishMap.Add(key, eng);
}
}
}catch(Exception ex)
{
LogUtil.error("读取文件【"+ rPath + "】【"+ line + "】出错:" + ex.ToString());
}
}
}
ResourceMap.Add(China, ChinaMap);
......@@ -240,6 +247,8 @@ namespace OnlineStore
}
try
{
if (ResourceMap != null)
{
if (!ResourceMap.ContainsKey(CurrLanguage))
{
if (ShowMsg)
......@@ -259,6 +268,7 @@ namespace OnlineStore
NoIdLog(id, defaultStr);
}
}
}
return strCurLanguage;
}
catch (Exception ex)
......
......@@ -210,3 +210,46 @@ FrmAbout_lblCodeName_Text,软件编号:52 43 2D 44 4C 2D 41 43 53 69 6E 67 6C 65 53
FrmAbout_lblTime_Text,更新时间:2020-02-07 21:16,UpdateTime:2020-02-07 21:16
FrmAbout_lblVersion_Text,版本号:1.0.7342.38298,Version:1.0.7342.38298
FrmAbout_btnNext_Text,确定,Confirm
Middle_Axis,(轴一)旋转轴,(Axis 1) rotation axis
UpDown_Axis,(轴二)升降轴轴,(Axis 2) lifting axis
InOut_Axis,(轴三)进出轴,(Axis 3) in-out axis
Comp_Axis,(轴四)压紧轴,(Axis 4)pressure axis
启用调试,启用调试,Enable debugging
等待启动,等待启动,Wait to start
前门未关,前门未关,Front door open
叉子料盘检测有料,请检查,叉子料盘检测有料,请检查,Fork tray full& please check
开始自动出入库,开始自动出入库,Start auto storing
停止自动出入库,停止自动出入库,Stop auto storing
自动出库:,自动出库:,
自动入库:,自动入库:,
定位气缸不在下降端,不能移动进出轴,定位气缸不在下降端,不能移动进出轴,The position cylinder is not at the descent position& not move the in-out axis
警告,警告,Warning
开始循环出库,开始循环出库,Start looping out
停止循环出库,停止循环出库,Stop the loop
FrmStoreBox_显示ToolStripMenuItem_Text,显示,Show
FrmStoreBox_toolStripMenuItem1_Text,退出,Exit
X01,急停,Emergency stop
X02,复位,Reset
X03,自动,
X04,气压检测,Pressure detection
X05,料盘检测1(进料口),
X06,料盘检测2(料叉),
X07,进料口门上升端,Portal ascent position
X08,进料口门下降端,Portal descent position
X09,安全光栅,Security grating
X10,前门限位,
X11,左侧门限位,
X12,右侧门限位,
Y01,自动指示灯,Auto indicator light
Y02,故障指示灯,Error indicator light
Y03,待机指示灯,indicator light
Y04,故障蜂鸣器,
Y05,吹气SOL ON,Blowing SOL ON
Y06,料仓运转ON,SMD BOX operating ON
Y07,轴2刹车电源ON,Brake power of axis2 ON
Y08,进料口门上升SOL,Portal ascent SOL
Y09,进料口门下降SOL,Portal descent SOL
Y10,相机照明开,Camera light ON
升降轴位置调试:,升降轴位置调试:,Updown-Axis Debug Location:
是否确定退出?,是否确定退出?,
提示,提示,Remind
......@@ -210,3 +210,46 @@ FrmAbout_lblCodeName_Text,软件编号:52 43 2D 44 4C 2D 41 43 53 69 6E 67 6C 65
FrmAbout_lblTime_Text,更新时间:2020-02-07 21:16,UpdateTime:2020-02-07 21:16
FrmAbout_lblVersion_Text,版本号:1.0.7342.38298,Version:1.0.7342.38298
FrmAbout_btnNext_Text,确定,Confirm
Middle_Axis,(轴一)旋转轴,(Axis 1) rotation axis
UpDown_Axis,(轴二)升降轴轴,(Axis 2) lifting axis
InOut_Axis,(轴三)进出轴,(Axis 3) in-out axis
Comp_Axis,(轴四)压紧轴,(Axis 4)pressure axis
启用调试,启用调试,Enable debugging
等待启动,等待启动,Wait to start
前门未关,前门未关,Front door open
叉子料盘检测有料,请检查,叉子料盘检测有料,请检查,Fork tray full& please check
开始自动出入库,开始自动出入库,Start auto storing
停止自动出入库,停止自动出入库,Stop auto storing
自动出库:,自动出库:,
自动入库:,自动入库:,
定位气缸不在下降端,不能移动进出轴,定位气缸不在下降端,不能移动进出轴,The position cylinder is not at the descent position& not move the in-out axis
警告,警告,Warning
开始循环出库,开始循环出库,Start looping out
停止循环出库,停止循环出库,Stop the loop
FrmStoreBox_显示ToolStripMenuItem_Text,显示,Show
FrmStoreBox_toolStripMenuItem1_Text,退出,Exit
X01,急停,Emergency stop
X02,复位,Reset
X03,自动,
X04,气压检测,Pressure detection
X05,料盘检测1(进料口),
X06,料盘检测2(料叉),
X07,进料口门上升端,Portal ascent position
X08,进料口门下降端,Portal descent position
X09,安全光栅,Security grating
X10,前门限位,
X11,左侧门限位,
X12,右侧门限位,
Y01,自动指示灯,Auto indicator light
Y02,故障指示灯,Error indicator light
Y03,待机指示灯,indicator light
Y04,故障蜂鸣器,
Y05,吹气SOL ON,Blowing SOL ON
Y06,料仓运转ON,SMD BOX operating ON
Y07,轴2刹车电源ON,Brake power of axis2 ON
Y08,进料口门上升SOL,Portal ascent SOL
Y09,进料口门下降SOL,Portal descent SOL
Y10,相机照明开,Camera light ON
升降轴位置调试:,升降轴位置调试:,Updown-Axis Debug Location:
是否确定退出?,是否确定退出?,
提示,提示,Remind
......@@ -36,7 +36,7 @@ namespace OnlineStore.ACPackingStore
comboBox1.Items.Clear();
foreach (ConfigMoveAxis a in axisList)
{
comboBox1.Items.Add(a.Explain);
comboBox1.Items.Add(a.DisplayStr);
}
comboBox1.SelectedIndex = 0;
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OnlineStore.LoadCSVLibrary
{
public class CSVResourceControl
{
public delegate string GetStrDelegate(string id, string defaultStr);
public static event GetStrDelegate GetStrEvent;
public delegate string GetStringDelegate(string id, string defaultStr, params object[] param);
public static event GetStringDelegate GetStringEvent;
public static string GetString(string id, string defaultStr)
{
string result = GetStrEvent?.Invoke(id, defaultStr);
return result;
}
public static string GetString(string id, string defaultStr, params object[] param)
{
string result = GetStringEvent?.Invoke(id, defaultStr, param);
return result;
}
}
}
......@@ -47,6 +47,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="CSVExection.cs" />
<Compile Include="CSVResourceControl.cs" />
<Compile Include="position\ACSAStorePosition.cs" />
<Compile Include="storeConfig\ConfigItemBase.cs" />
<Compile Include="storeConfig\ConfigProAttribute.cs" />
......
......@@ -149,10 +149,14 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// 下拉列表显示
/// </summary>
/// <summary>
/// 下拉列表显示
/// </summary>
public string DisplayStr
{
get {
return Explain + "(" + ProName + ")";
get
{
return CSVResourceControl.GetString(ProName, Explain) + "(" + ProName + ")";
}
set
{
......@@ -243,7 +247,7 @@ namespace OnlineStore.LoadCSVLibrary
{
get
{
return ElectricalDefinition + "_" + Explain + "(" + ProName+")";
return ElectricalDefinition + "_" + CSVResourceControl.GetString(ElectricalDefinition, Explain) + "(" + ProName + ")";
}
set
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!