Commit 3bc2cedb LN

中英文完善

1 个父辈 cce296ab
......@@ -1333,4 +1333,40 @@
<data name="启动失败:设备未初始化完成" xml:space="preserve">
<value>Startup failure: device initialization is not complete</value>
</data>
<data name="FrmPositionTool_groupBox1_Text" xml:space="preserve">
<value>equipment information</value>
</data>
<data name="FrmPositionTool_groupBox2_Text" xml:space="preserve">
<value>location information</value>
</data>
<data name="FrmPositionTool_label10_Text" xml:space="preserve">
<value>Point P4 offset:</value>
</data>
<data name="FrmPositionTool_label4_Text" xml:space="preserve">
<value>Point P5 offset:</value>
</data>
<data name="FrmPositionTool_label5_Text" xml:space="preserve">
<value>Point P6 offset:</value>
</data>
<data name="FrmPositionTool_label9_Text" xml:space="preserve">
<value>Point P3 offset:</value>
</data>
<data name="升降轴位置调试:" xml:space="preserve">
<value>Updown-Axis Debug Location:</value>
</data>
<data name="打开串口失败" xml:space="preserve">
<value>Failed to open serial port</value>
</data>
<data name="文件【{0}】已存在,是否确定覆盖?" xml:space="preserve">
<value>File [{0}] already exists, is it ok to overwrite?</value>
</data>
<data name="检测信号" xml:space="preserve">
<value>detection signal </value>
</data>
<data name="请输入正确的速度" xml:space="preserve">
<value>Please enter the correct speed</value>
</data>
</root>
\ No newline at end of file
......@@ -1332,4 +1332,38 @@
<data name="启动失败:设备未初始化完成" xml:space="preserve">
<value>启动失败:设备未初始化完成</value>
</data>
<data name="FrmPositionTool_groupBox1_Text" xml:space="preserve">
<value>设备信息</value>
</data>
<data name="FrmPositionTool_groupBox2_Text" xml:space="preserve">
<value>位置信息</value>
</data>
<data name="FrmPositionTool_label10_Text" xml:space="preserve">
<value>入料缓冲点P4偏移量:</value>
</data>
<data name="FrmPositionTool_label4_Text" xml:space="preserve">
<value>出料前点P5偏移值:</value>
</data>
<data name="FrmPositionTool_label5_Text" xml:space="preserve">
<value>出料缓冲点P6偏移量:</value>
</data>
<data name="FrmPositionTool_label9_Text" xml:space="preserve">
<value>入料前点P3偏移量:</value>
</data>
<data name="升降轴位置调试:" xml:space="preserve">
<value>升降轴位置调试:</value>
</data>
<data name="打开串口失败" xml:space="preserve">
<value>打开串口失败</value>
</data>
<data name="文件【{0}】已存在,是否确定覆盖?" xml:space="preserve">
<value>文件【{0}】已存在,是否确定覆盖?</value>
</data>
<data name="检测信号" xml:space="preserve">
<value>检测信号</value>
</data>
<data name="请输入正确的速度" xml:space="preserve">
<value>请输入正确的速度</value>
</data>
</root>
\ No newline at end of file
......@@ -19,7 +19,7 @@ namespace OnlineStore.AutoInOutStore
{
public partial class FrmPositionTool : FrmBase
{
private string LogName = "升降轴位置调试:";
private string LogName = ResourceCulture.GetString("升降轴位置调试:");
private string PortName = "";
private int SlvAddr = 0;
private string IoIp = "";
......@@ -45,7 +45,10 @@ namespace OnlineStore.AutoInOutStore
private void Form1_Load(object sender, EventArgs e)
{
ACServerManager.IsShowMsg = false;
LogUtil.logBox = this.richTextBox1;
if (ResourceCulture.CurrLanguage.Equals(ResourceCulture.China))
{
LogUtil.logBox = this.richTextBox1;
}
//ACServerManager.richeBox = this.richTextBox1;
CheckForIllegalCrossThreadCalls = false;
......@@ -63,7 +66,7 @@ namespace OnlineStore.AutoInOutStore
bool isOn = ACServerManager.ServerOnStatus(PortName, SlvAddr);
formStatus(isOn);
timer1.Start();
ioStatusControl1.IOName = "检测信号";
ioStatusControl1.IOName =ResourceCulture.GetString( "检测信号");
}
private void btnServoOn_Click(object sender, EventArgs e)
{
......@@ -82,7 +85,7 @@ namespace OnlineStore.AutoInOutStore
bool result = ACServerManager.OpenPort(PortName);
if (!result)
{
MessageBox.Show("打开串口失败!");
MessageBox.Show(ResourceCulture.GetString("打开串口失败"));
return;
}
......@@ -172,7 +175,7 @@ namespace OnlineStore.AutoInOutStore
if (speed<=(0))
{
MessageBox.Show("请输入正确的速度");
MessageBox.Show(ResourceCulture.GetString("请输入正确的速度"));
txtSpeed.Focus();
return;
}
......@@ -185,7 +188,8 @@ namespace OnlineStore.AutoInOutStore
string filePath = Application.StartupPath + @"\logs\" + fileName;
if (File.Exists(filePath))
{
DialogResult result = MessageBox.Show("文件【"+filePath+"】已存在,是否确定覆盖?","", MessageBoxButtons.OKCancel,MessageBoxIcon.Question);
string msg = ResourceCulture.GetString("文件【{0}】已存在,是否确定覆盖?", "文件【{0}】已存在,是否确定覆盖?", fileName);
DialogResult result = MessageBox.Show(msg, "", MessageBoxButtons.OKCancel,MessageBoxIcon.Question);
if (!result.Equals(DialogResult.OK))
{
return;
......@@ -254,7 +258,11 @@ namespace OnlineStore.AutoInOutStore
{
preValue = PositionList[num - 2];
}
LogUtil.info(LogName + "收到信号,【"+ num + "】【" + currPos+"】,差值【"+Math.Abs(currPos-preValue)+"】");
LogUtil.info(LogName + "【"+ num + "】【" + currPos+"】【"+Math.Abs(currPos-preValue)+"】");
if (LogUtil.logBox == null)
{
this.richTextBox1.AppendText(LogName + "【" + num + "】【" + currPos + "】【" + Math.Abs(currPos - preValue) + "】"+Environment.NewLine);
}
LastValue = IO_VALUE.HIGH;
LastGetPTime = DateTime.Now;
}
......@@ -333,6 +341,7 @@ namespace OnlineStore.AutoInOutStore
ACServerManager.SuddenStop(PortName, SlvAddr);
Thread.Sleep(100);
}
LogUtil.logBox = null;
//ACServerManager.CloseAllPort();
//IOManager.instance.CloseAllConnection();
}
......
......@@ -327,6 +327,14 @@ namespace OnlineStore.DeviceLibrary
public override void CloseAllConnection()
{
if (conTimer != null)
{
conTimer.Stop();
}
if (AIOMap == null)
{
return;
}
foreach (AIOBOX aio in AIOMap.Values)
{
aio.Close();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!