Commit eb9fc358 刘韬

1

1 个父辈 cde4adc1
using System; using OnlineStore;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
...@@ -14,9 +15,9 @@ namespace AutoScanAndLabel ...@@ -14,9 +15,9 @@ namespace AutoScanAndLabel
public AboutBox1() public AboutBox1()
{ {
InitializeComponent(); InitializeComponent();
this.Text = String.Format("关于 {0}", AssemblyTitle); this.Text = String.Format(crc.GetString("Res0001", "关于 {0}"), AssemblyTitle);
this.labelProductName.Text = AssemblyProduct; this.labelProductName.Text = AssemblyProduct;
this.labelVersion.Text = String.Format("版本 {0}", AssemblyVersion); this.labelVersion.Text = String.Format(crc.GetString("Res0002", "版本 {0}"), AssemblyVersion);
this.labelCopyright.Text = AssemblyCopyright; this.labelCopyright.Text = AssemblyCopyright;
this.labelCompanyName.Text = AssemblyCompany; this.labelCompanyName.Text = AssemblyCompany;
this.textBoxDescription.Text = AssemblyDescription; this.textBoxDescription.Text = AssemblyDescription;
...@@ -65,7 +66,7 @@ namespace AutoScanAndLabel ...@@ -65,7 +66,7 @@ namespace AutoScanAndLabel
DateTime d1 = DateTime.Parse("2000-01-01"); DateTime d1 = DateTime.Parse("2000-01-01");
var newData = d1.AddDays(days); var newData = d1.AddDays(days);
newData = newData.AddSeconds(seconds * 2); newData = newData.AddSeconds(seconds * 2);
updatetime = "LastUpdate: "+newData.ToString("yyyy-MM-dd HH:mm:ss"); updatetime = "LastUpdate: " + newData.ToString("yyyy-MM-dd HH:mm:ss");
} }
if (attributes.Length == 0) if (attributes.Length == 0)
...@@ -126,4 +127,4 @@ namespace AutoScanAndLabel ...@@ -126,4 +127,4 @@ namespace AutoScanAndLabel
ConfigHelper.AdvanceConfigForm.ShowEditDialog(this); ConfigHelper.AdvanceConfigForm.ShowEditDialog(this);
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -24,11 +24,24 @@ ...@@ -24,11 +24,24 @@
<conversionPattern value="[%date][%t]%-5p %m%n" /> <conversionPattern value="[%date][%t]%-5p %m%n" />
</layout> </layout>
</appender> </appender>
<appender name="LngResource" type="log4net.Appender.RollingFileAppender">
<file value="logs/LngResource.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%m%n" />
</layout>
</appender>
<logger name="RollingLogFileAppender"> <logger name="RollingLogFileAppender">
<level value="ALL" /> <level value="ALL" />
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender" />
</logger> </logger>
<logger name="LngResource">
<level value="ALL" />
<appender-ref ref="LngResource" />
</logger>
<logger name="HCBOARD"> <logger name="HCBOARD">
<level value="ALL" /> <level value="ALL" />
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender" />
......
...@@ -88,7 +88,7 @@ namespace AutoScanAndLabel ...@@ -88,7 +88,7 @@ namespace AutoScanAndLabel
// //
this.启用调试模式ToolStripMenuItem.Name = "启用调试模式ToolStripMenuItem"; this.启用调试模式ToolStripMenuItem.Name = "启用调试模式ToolStripMenuItem";
this.启用调试模式ToolStripMenuItem.Size = new System.Drawing.Size(192, 26); this.启用调试模式ToolStripMenuItem.Size = new System.Drawing.Size(192, 26);
this.启用调试模式ToolStripMenuItem.Text = "启用调试模式"; this.启用调试模式ToolStripMenuItem.Text = "启用配置模式";
this.启用调试模式ToolStripMenuItem.Click += new System.EventHandler(this.启用调试模式ToolStripMenuItem_Click); this.启用调试模式ToolStripMenuItem.Click += new System.EventHandler(this.启用调试模式ToolStripMenuItem_Click);
// //
// toolStripSeparator4 // toolStripSeparator4
...@@ -261,6 +261,7 @@ namespace AutoScanAndLabel ...@@ -261,6 +261,7 @@ namespace AutoScanAndLabel
this.stateView.Name = "stateView"; this.stateView.Name = "stateView";
this.stateView.Size = new System.Drawing.Size(605, 197); this.stateView.Size = new System.Drawing.Size(605, 197);
this.stateView.TabIndex = 0; this.stateView.TabIndex = 0;
this.stateView.Tag = "not";
this.stateView.UseCompatibleStateImageBehavior = false; this.stateView.UseCompatibleStateImageBehavior = false;
// //
// listView1 // listView1
...@@ -276,6 +277,7 @@ namespace AutoScanAndLabel ...@@ -276,6 +277,7 @@ namespace AutoScanAndLabel
this.listView1.ShowGroups = false; this.listView1.ShowGroups = false;
this.listView1.Size = new System.Drawing.Size(597, 118); this.listView1.Size = new System.Drawing.Size(597, 118);
this.listView1.TabIndex = 2; this.listView1.TabIndex = 2;
this.listView1.Tag = "not";
this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.UseCompatibleStateImageBehavior = false;
// //
// btn_stop // btn_stop
......
...@@ -40,6 +40,7 @@ namespace AutoScanAndLabel ...@@ -40,6 +40,7 @@ namespace AutoScanAndLabel
this.logBox.Name = "logBox"; this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(746, 495); this.logBox.Size = new System.Drawing.Size(746, 495);
this.logBox.TabIndex = 0; this.logBox.TabIndex = 0;
this.logBox.Tag = "not";
this.logBox.Text = ""; this.logBox.Text = "";
// //
// LogControl // LogControl
......
...@@ -62,14 +62,12 @@ namespace AutoScanAndLabel ...@@ -62,14 +62,12 @@ namespace AutoScanAndLabel
private void cb_printerselect_SelectedIndexChanged(object sender, EventArgs e) private void cb_printerselect_SelectedIndexChanged(object sender, EventArgs e)
{ {
Config.Set(Setting_Init.PrinterName, (sender as ComboBox).Text); Config.Set(Setting_Init.PrinterName, (sender as ComboBox).Text);
Config.SaveChange();
RobotManage.LoadPrintSetting(); RobotManage.LoadPrintSetting();
} }
private void cb_labelselect_SelectedIndexChanged(object sender, EventArgs e) private void cb_labelselect_SelectedIndexChanged(object sender, EventArgs e)
{ {
Config.Set(Setting_Init.LabelName, (sender as ComboBox).Text); Config.Set(Setting_Init.LabelName, (sender as ComboBox).Text);
Config.SaveChange();
RobotManage.LoadPrintSetting(); RobotManage.LoadPrintSetting();
} }
......
using DeviceLibrary; using OnlineStore;
using DeviceLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -192,7 +193,7 @@ namespace AutoScanAndLabel ...@@ -192,7 +193,7 @@ namespace AutoScanAndLabel
var cc = tableLayoutPanel1.Controls.Find(((Button)sender).Name, false); var cc = tableLayoutPanel1.Controls.Find(((Button)sender).Name, false);
var speed = tableLayoutPanel1.Controls.Find(((Button)sender).Name+ "_speed", false); var speed = tableLayoutPanel1.Controls.Find(((Button)sender).Name+ "_speed", false);
if (MessageBox.Show($"{((Button)sender).Text} : {cc[1].Text}", "请确认是否运动到该位置", MessageBoxButtons.OKCancel) == DialogResult.Cancel) if (MessageBox.Show($"{((Button)sender).Text} : {cc[1].Text}", crc.GetString("Res0029","请确认是否运动到该位置"), MessageBoxButtons.OKCancel) == DialogResult.Cancel)
return; return;
...@@ -249,4 +250,4 @@ namespace AutoScanAndLabel ...@@ -249,4 +250,4 @@ namespace AutoScanAndLabel
CSVConfigReader.SaveConfig(Config.ConfigFilePath, Config); CSVConfigReader.SaveConfig(Config.ConfigFilePath, Config);
} }
} }
} }
\ No newline at end of file \ No newline at end of file
 using OnlineStore;
namespace AutoScanAndLabel namespace AutoScanAndLabel
{ {
partial class ConfigControl partial class ConfigControl
...@@ -45,7 +46,7 @@ namespace AutoScanAndLabel ...@@ -45,7 +46,7 @@ namespace AutoScanAndLabel
this.groupBox3.Size = new System.Drawing.Size(628, 461); this.groupBox3.Size = new System.Drawing.Size(628, 461);
this.groupBox3.TabIndex = 108; this.groupBox3.TabIndex = 108;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "点位列表"; this.groupBox3.Text = crc.GetString("Res0029","点位列表");
// //
// tableLayoutPanel1 // tableLayoutPanel1
// //
...@@ -73,7 +74,7 @@ namespace AutoScanAndLabel ...@@ -73,7 +74,7 @@ namespace AutoScanAndLabel
this.btnSavePos.Name = "btnSavePos"; this.btnSavePos.Name = "btnSavePos";
this.btnSavePos.Size = new System.Drawing.Size(133, 31); this.btnSavePos.Size = new System.Drawing.Size(133, 31);
this.btnSavePos.TabIndex = 109; this.btnSavePos.TabIndex = 109;
this.btnSavePos.Text = "全部保存"; this.btnSavePos.Text = crc.GetString("Res0030","全部保存");
this.btnSavePos.UseVisualStyleBackColor = true; this.btnSavePos.UseVisualStyleBackColor = true;
this.btnSavePos.Click += new System.EventHandler(this.btnSavePos_Click); this.btnSavePos.Click += new System.EventHandler(this.btnSavePos_Click);
// //
...@@ -97,4 +98,4 @@ namespace AutoScanAndLabel ...@@ -97,4 +98,4 @@ namespace AutoScanAndLabel
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Button btnSavePos; private System.Windows.Forms.Button btnSavePos;
} }
} }
\ No newline at end of file \ No newline at end of file
using System; using OnlineStore;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
...@@ -47,11 +48,11 @@ namespace AutoScanAndLabel.UC ...@@ -47,11 +48,11 @@ namespace AutoScanAndLabel.UC
editindex = value; editindex = value;
if (editindex < 0) if (editindex < 0)
{ {
btn_add.Text = "添加"; btn_add.Text = crc.GetString("Res0031","添加");
btn_cel.Visible = false; btn_cel.Visible = false;
} }
else { else {
btn_add.Text = "修改"; btn_add.Text = crc.GetString("Res0032","修改");
btn_cel.Visible = true; btn_cel.Visible = true;
} }
} }
...@@ -60,7 +61,7 @@ namespace AutoScanAndLabel.UC ...@@ -60,7 +61,7 @@ namespace AutoScanAndLabel.UC
{ {
if (listBox1.SelectedIndex < 0) if (listBox1.SelectedIndex < 0)
return; return;
var rl=MessageBox.Show(string.Format("确定要删除:\"{0}\"?", listBox1.SelectedItem), "警告", MessageBoxButtons.YesNo); var rl=MessageBox.Show(string.Format(crc.GetString("Res0033","确定要删除:\"{0}\"?"), listBox1.SelectedItem), crc.GetString("Res0034","警告"), MessageBoxButtons.YesNo);
if (rl != DialogResult.Yes) if (rl != DialogResult.Yes)
return; return;
if (listBox1.SelectedIndex == editindex) if (listBox1.SelectedIndex == editindex)
...@@ -106,4 +107,4 @@ namespace AutoScanAndLabel.UC ...@@ -106,4 +107,4 @@ namespace AutoScanAndLabel.UC
textBox1.Text = ""; textBox1.Text = "";
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -38,7 +38,7 @@ namespace OnlineStore ...@@ -38,7 +38,7 @@ namespace OnlineStore
LoadData(); LoadData();
var lngjson = JsonHelper.SerializeObject(LangMap); var lngjson = JsonHelper.SerializeObject(LangMap);
/*
Task.Run(() => { Task.Run(() => {
//return; //return;
try try
...@@ -62,16 +62,13 @@ namespace OnlineStore ...@@ -62,16 +62,13 @@ namespace OnlineStore
File.WriteAllLines(Path.Combine(rPath, lngfilename), datalines); File.WriteAllLines(Path.Combine(rPath, lngfilename), datalines);
} }
LoadData(true); LoadData(true);
//SetCurrentCulture(CurrLanguage);
//LanguageChangeEvent?.Invoke(null, EventArgs.Empty);
} }
catch (Exception e) catch (Exception e)
{ {
LogUtil.info("语言资源处理出错:" + e.ToString()); LogUtil.info("语言资源处理出错:" + e.ToString());
} }
}); });
*/
LoadData(true); LoadData(true);
} }
...@@ -214,7 +211,7 @@ namespace OnlineStore ...@@ -214,7 +211,7 @@ namespace OnlineStore
if (!LangMap["zh-CN"].ContainsKey(id) && checkInterid(id) && !hss.Contains(id)) if (!LangMap["zh-CN"].ContainsKey(id) && checkInterid(id) && !hss.Contains(id))
{ {
hss.Add(id); hss.Add(id);
LOG.Info("" + id + "\t" + defaultStr); LOG.Info("" + id + "\t" + defaultStr.Replace("\r\n","\\r\\n"));
} }
} }
......
using System; using OnlineStore;
using System;
using System.IO; using System.IO;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -27,7 +28,7 @@ namespace OnlineStore.Common ...@@ -27,7 +28,7 @@ namespace OnlineStore.Common
{ {
if (isLog == 1) if (isLog == 1)
{ {
LOGGER.Info("给服务器发送数据【" + paramData + "】 "); LOGGER.Info(crc.GetString("Res0035","给服务器发送数据【") + paramData + "】 ");
} }
if (paramData != "null" && paramData != null) if (paramData != "null" && paramData != null)
{ {
...@@ -61,7 +62,7 @@ namespace OnlineStore.Common ...@@ -61,7 +62,7 @@ namespace OnlineStore.Common
} }
if (isLog == 1) if (isLog == 1)
{ {
LOGGER.Info("收到服务器数据【" + result + "】"); LOGGER.Info(crc.GetString("Res0036","收到服务器数据【") + result + "】");
} }
return result; return result;
} }
......
 using OnlineStore;
using log4net; using log4net;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -36,7 +37,7 @@ namespace OnlineStore.Common ...@@ -36,7 +37,7 @@ namespace OnlineStore.Common
{ {
Release(); Release();
} }
LogName = "温湿度传感器[" + port + "]"; LogName = crc.GetString("Res0037","温湿度传感器[") + port + "]";
if (sb == null) if (sb == null)
{ {
...@@ -236,7 +237,7 @@ namespace OnlineStore.Common ...@@ -236,7 +237,7 @@ namespace OnlineStore.Common
} }
catch (Exception ex) catch (Exception ex)
{ {
LOGGER.Info(LogName + "转换出错:" + ex.ToString()); LOGGER.Info(LogName + crc.GetString("Res0038","转换出错:") + ex.ToString());
} }
return list; return list;
} }
...@@ -280,7 +281,7 @@ namespace OnlineStore.Common ...@@ -280,7 +281,7 @@ namespace OnlineStore.Common
} }
catch (Exception ex) catch (Exception ex)
{ {
LOGGER.Info(LogName + "转换出错:" + ex.ToString()); LOGGER.Info(LogName + crc.GetString("Res0038","转换出错:") + ex.ToString());
} }
return -1; return -1;
} }
...@@ -307,10 +308,10 @@ namespace OnlineStore.Common ...@@ -307,10 +308,10 @@ namespace OnlineStore.Common
} }
catch (Exception ex) catch (Exception ex)
{ {
LOGGER.Info(LogName + "转换出错:" + ex.ToString()); LOGGER.Info(LogName + crc.GetString("Res0038","转换出错:") + ex.ToString());
} }
return list; return list;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using log4net; using OnlineStore;
using log4net;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO.Ports; using System.IO.Ports;
...@@ -342,7 +343,7 @@ namespace OnlineStore.Common ...@@ -342,7 +343,7 @@ namespace OnlineStore.Common
{ {
strSend += string.Format("{0:X2} ", data[i]); strSend += string.Format("{0:X2} ", data[i]);
} }
LOGGER.Debug("【" + _serialPort.PortName + "】发送数据【" + strSend + "】"); LOGGER.Debug("【" + _serialPort.PortName + crc.GetString("Res0043","】发送数据【") + strSend + "】");
//禁止接收事件时直接退出 //禁止接收事件时直接退出
if (ReceiveEventFlag) if (ReceiveEventFlag)
{ {
...@@ -555,4 +556,4 @@ namespace OnlineStore.Common ...@@ -555,4 +556,4 @@ namespace OnlineStore.Common
#endregion #endregion
} }
} }
\ No newline at end of file \ No newline at end of file
using System; using OnlineStore;
using System;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
...@@ -33,7 +34,7 @@ namespace OnlineStore.Common ...@@ -33,7 +34,7 @@ namespace OnlineStore.Common
private void logLocalIp() private void logLocalIp()
{ {
string[] addresses = GetLocalAddresses(); string[] addresses = GetLocalAddresses();
string iplist = "本机IP:["; string iplist = $"本机IP:";
if (addresses.Length > 0) if (addresses.Length > 0)
{ {
for (int i = 0; i < addresses.Length; i++) for (int i = 0; i < addresses.Length; i++)
...@@ -263,4 +264,4 @@ namespace OnlineStore.Common ...@@ -263,4 +264,4 @@ namespace OnlineStore.Common
} }
} }
} }
\ No newline at end of file \ No newline at end of file
 using OnlineStore;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -26,7 +27,7 @@ namespace OnlineStore.Common ...@@ -26,7 +27,7 @@ namespace OnlineStore.Common
private void logLocalIp() private void logLocalIp()
{ {
string[] addresses = GetLocalAddresses(); string[] addresses = GetLocalAddresses();
string iplist = "本机IP:["; string iplist = $"本机IP:[";
if (addresses.Length > 0) if (addresses.Length > 0)
{ {
for (int i = 0; i < addresses.Length; i++) for (int i = 0; i < addresses.Length; i++)
...@@ -156,4 +157,4 @@ namespace OnlineStore.Common ...@@ -156,4 +157,4 @@ namespace OnlineStore.Common
return retval; return retval;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using OnlineStore.Common; using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -75,7 +76,7 @@ namespace DeviceLibrary ...@@ -75,7 +76,7 @@ namespace DeviceLibrary
else if (wait.WaitType.Equals(WaitEnum.W002_IOValue)) else if (wait.WaitType.Equals(WaitEnum.W002_IOValue))
{ {
ConfigIO io = RobotManage.Config.getWaitIO(wait.IoType); ConfigIO io = RobotManage.Config.getWaitIO(wait.IoType);
NotOkMsg = " 等待【" + io.DisplayStr + "】=【" + wait.IoValue + "】"; NotOkMsg = crc.GetString("Res0035","等待")+"【" + io.DisplayStr + "】=【" + wait.IoValue + "】";
wait.IsEnd = IOManager.IOValue(wait.IoType).Equals(wait.IoValue); wait.IsEnd = IOManager.IOValue(wait.IoType).Equals(wait.IoValue);
if (!wait.IsEnd) if (!wait.IsEnd)
{ {
...@@ -83,7 +84,7 @@ namespace DeviceLibrary ...@@ -83,7 +84,7 @@ namespace DeviceLibrary
if (span.TotalMilliseconds > timeOutMs && NoAlarm()) if (span.TotalMilliseconds > timeOutMs && NoAlarm())
{ {
WarnMsg = Name + "[" + MoveInfo.MoveStep + "] 等待(" + io.DisplayStr + "=" + wait.IoValue + ") 超时"; WarnMsg = Name + "[" + MoveInfo.MoveStep + "] "+crc.GetString("Res0035","等待")+"(" + io.DisplayStr + "=" + wait.IoValue + ") "+crc.GetString("Res0036","超时");
Msg.add(WarnMsg, MsgLevel.warning); Msg.add(WarnMsg, MsgLevel.warning);
if (NoAlarm()) if (NoAlarm())
...@@ -173,7 +174,7 @@ namespace DeviceLibrary ...@@ -173,7 +174,7 @@ namespace DeviceLibrary
} }
else if (span.TotalSeconds > MoveInfo.TimeOutSeconds) else if (span.TotalSeconds > MoveInfo.TimeOutSeconds)
{ {
WarnMsg = Name + "[" + MoveInfo.MoveStep + "]等待" + NotOkMsg + "超时[" + Math.Round(span.TotalSeconds, 1) + "]秒"; WarnMsg = Name + "[" + MoveInfo.MoveStep + "]"+crc.GetString("Res0035","等待") + NotOkMsg + crc.GetString("Res0036","超时")+"[" + Math.Round(span.TotalSeconds, 1) + "]"+crc.GetString("Res0039","秒");
int second = (int)(MoveInfo.TimeOutSeconds / span.TotalSeconds) * 10; int second = (int)(MoveInfo.TimeOutSeconds / span.TotalSeconds) * 10;
if (second > 120) if (second > 120)
...@@ -287,4 +288,4 @@ namespace DeviceLibrary ...@@ -287,4 +288,4 @@ namespace DeviceLibrary
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using OnlineStore;
using CodeLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -49,13 +50,13 @@ namespace DeviceLibrary ...@@ -49,13 +50,13 @@ namespace DeviceLibrary
//右侧料串已空 //右侧料串已空
if (RightMoveInfo.IsStep(MoveStep.Wait) && IOValue(IO_Type.RightEnd_Check).Equals(IO_VALUE.HIGH) && RightShelfNoTray) if (RightMoveInfo.IsStep(MoveStep.Wait) && IOValue(IO_Type.RightEnd_Check).Equals(IO_VALUE.HIGH) && RightShelfNoTray)
{ {
Msg.add("右侧料串已空,等待取走料串", MsgLevel.warning); Msg.add(crc.GetString("Res0059","右侧料串已空,等待取走料串"), MsgLevel.warning);
} }
//左侧料串已满 //左侧料串已满
if (LeftMoveInfo.IsStep(MoveStep.Wait) && IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.HIGH) && LeftShelfNoTray) if (LeftMoveInfo.IsStep(MoveStep.Wait) && IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.HIGH) && LeftShelfNoTray)
{ {
Msg.add("作侧料串已满,等待取走料串", MsgLevel.warning); Msg.add(crc.GetString("Res0060","作侧料串已满,等待取走料串"), MsgLevel.warning);
} }
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using OnlineStore;
using CodeLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -131,19 +132,19 @@ namespace DeviceLibrary ...@@ -131,19 +132,19 @@ namespace DeviceLibrary
string LabelState() { string LabelState() {
string state = ""; string state = "";
if (LabelMoveInfo.MoveStep >= MoveStep.Lbl_Printted) { if (LabelMoveInfo.MoveStep >= MoveStep.Lbl_Printted) {
state += "标签已打印,当前ReelID:" + LabelMoveInfo.MoveParam.WareCode; state += crc.GetString("Res0072","标签已打印,当前ReelID:") + LabelMoveInfo.MoveParam.WareCode;
} }
if (LabelMoveInfo.MoveStep == MoveStep.Lbl01) if (LabelMoveInfo.MoveStep == MoveStep.Lbl01)
{ {
state += "等待标签打印"; state += crc.GetString("Res0073","等待标签打印");
} }
if (LabelMoveInfo.MoveStep == MoveStep.Wait) if (LabelMoveInfo.MoveStep == MoveStep.Wait)
{ {
state += "等待中"; state += crc.GetString("Res0074","等待中");
} }
return state; return state;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using OnlineStore;
using CodeLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -62,7 +63,7 @@ namespace DeviceLibrary ...@@ -62,7 +63,7 @@ namespace DeviceLibrary
} }
break; break;
case MoveStep.L10_WaitReelPut: case MoveStep.L10_WaitReelPut:
Msg.add("左侧空闲中", MsgLevel.info); Msg.add(crc.GetString("Res0040","左侧空闲中"), MsgLevel.info);
break; break;
case MoveStep.L11_ReelPutted: case MoveStep.L11_ReelPutted:
LeftCount++; LeftCount++;
...@@ -200,16 +201,16 @@ namespace DeviceLibrary ...@@ -200,16 +201,16 @@ namespace DeviceLibrary
string state = ""; string state = "";
if (IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.LeftEnd_Check).Equals(IO_VALUE.HIGH))
{ {
state += $"有料串,已放置{LeftCount}张料盘"; state += string.Format(crc.GetString("Res0069","有料串,已放置{0}张料盘"), LeftCount);
if (LeftShelfNoTray) if (LeftShelfNoTray)
state += ",料串已满"; state += "," + crc.GetString("Res0043","料串已满");
else else
state += "."; state += ".";
state += "当前ReelID:" + LeftMoveInfo.MoveParam.WareCode; state += crc.GetString("Res0045","当前ReelID:") + LeftMoveInfo.MoveParam.WareCode;
} }
else else
{ {
return "无料串"; return crc.GetString("Res0046","无料串");
} }
return state; return state;
...@@ -263,4 +264,4 @@ namespace DeviceLibrary ...@@ -263,4 +264,4 @@ namespace DeviceLibrary
Left_Batch_Axis.BatchAxisStartCheck(IO_Type.LeftTop_Check, IO_VALUE.LOW); Left_Batch_Axis.BatchAxisStartCheck(IO_Type.LeftTop_Check, IO_VALUE.LOW);
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using OnlineStore;
using CodeLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -66,11 +67,11 @@ namespace DeviceLibrary ...@@ -66,11 +67,11 @@ namespace DeviceLibrary
{ {
if (MiddleMoveInfo.MoveParam.IsNg) if (MiddleMoveInfo.MoveParam.IsNg)
{ {
Msg.add("抓料失败请手动处理,请将料盘放入:NG箱,按右侧按钮继续", MsgLevel.warning); Msg.add(crc.GetString("Res0047","抓料失败请手动处理,请将料盘放入:NG箱,按右侧按钮继续"), MsgLevel.warning);
} }
else else
{ {
Msg.add("抓料失败请手动处理,请将料盘放入: 左侧料串,按右侧按钮继续", MsgLevel.warning); Msg.add(crc.GetString("Res0048","抓料失败请手动处理,请将料盘放入: 左侧料串,按右侧按钮继续"), MsgLevel.warning);
} }
if (IOValue(IO_Type.Right_BTN).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.Right_BTN).Equals(IO_VALUE.HIGH))
...@@ -140,7 +141,7 @@ namespace DeviceLibrary ...@@ -140,7 +141,7 @@ namespace DeviceLibrary
else if (MiddleMoveInfo.IsTimeOut(60)) else if (MiddleMoveInfo.IsTimeOut(60))
{ {
MiddleMoveInfo.log("等待左侧允许放料"); MiddleMoveInfo.log("等待左侧允许放料");
Msg.add("等待左侧允许放料", MsgLevel.info); Msg.add(crc.GetString("Res0049","等待左侧允许放料"), MsgLevel.info);
} }
break; break;
case MoveStep.M08: case MoveStep.M08:
...@@ -162,7 +163,7 @@ namespace DeviceLibrary ...@@ -162,7 +163,7 @@ namespace DeviceLibrary
MiddleMoveInfo.NextMoveStep(MoveStep.M09); MiddleMoveInfo.NextMoveStep(MoveStep.M09);
MiddleMoveInfo.log("等待夹爪放松"); MiddleMoveInfo.log("等待夹爪放松");
} }
Msg.add("等待夹爪放松", MsgLevel.warning); Msg.add(crc.GetString("Res0050","等待夹爪放松"), MsgLevel.warning);
break; break;
case MoveStep.M10: case MoveStep.M10:
MiddleMoveInfo.NextMoveStep(MoveStep.M_ReturnToP1); MiddleMoveInfo.NextMoveStep(MoveStep.M_ReturnToP1);
...@@ -196,7 +197,7 @@ namespace DeviceLibrary ...@@ -196,7 +197,7 @@ namespace DeviceLibrary
MiddleMoveInfo.NextMoveStep(MoveStep.M22); MiddleMoveInfo.NextMoveStep(MoveStep.M22);
MiddleMoveInfo.log("等待夹爪放松"); MiddleMoveInfo.log("等待夹爪放松");
} }
Msg.add("等待夹爪放松", MsgLevel.warning); Msg.add(crc.GetString("Res0050","等待夹爪放松"), MsgLevel.warning);
break; break;
case MoveStep.M23: case MoveStep.M23:
MiddleMoveInfo.NextMoveStep(MoveStep.M_ReturnToP1); MiddleMoveInfo.NextMoveStep(MoveStep.M_ReturnToP1);
...@@ -224,12 +225,12 @@ namespace DeviceLibrary ...@@ -224,12 +225,12 @@ namespace DeviceLibrary
string MiddleState() { string MiddleState() {
string state = ""; string state = "";
if (MiddleMoveInfo.MoveStep == MoveStep.M_Standby || MiddleMoveInfo.MoveStep == MoveStep.Wait) if (MiddleMoveInfo.MoveStep == MoveStep.M_Standby || MiddleMoveInfo.MoveStep == MoveStep.Wait)
state += "等待中"; state += crc.GetString("Res0074","等待中");
else else
state += "当前ReelID:" + MiddleMoveInfo.MoveParam.WareCode; state += crc.GetString("Res0045","当前ReelID:") + MiddleMoveInfo.MoveParam.WareCode;
return state; return state;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using OnlineStore;
using CodeLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -111,7 +112,7 @@ namespace DeviceLibrary ...@@ -111,7 +112,7 @@ namespace DeviceLibrary
} }
break; break;
case MoveStep.R10_WaitReelLeave: case MoveStep.R10_WaitReelLeave:
Msg.add("等待料盘取走", MsgLevel.info); Msg.add(crc.GetString("Res0012","等待料盘取走"), MsgLevel.info);
break; break;
case MoveStep.R11_NextReel: case MoveStep.R11_NextReel:
RightCount++; RightCount++;
...@@ -228,15 +229,15 @@ namespace DeviceLibrary ...@@ -228,15 +229,15 @@ namespace DeviceLibrary
{ {
state += $"有料串,已提取{RightCount}张料盘"; state += $"有料串,已提取{RightCount}张料盘";
if (RightShelfNoTray) if (RightShelfNoTray)
state += ",料串已清空. "; state += crc.GetString("Res0034",",料串已清空. ");
else else
state += "."; state += ".";
state += "当前ReelID:"+ RightMoveInfo.MoveParam.WareCode; state += crc.GetString("Res0045","当前ReelID:")+ RightMoveInfo.MoveParam.WareCode;
} }
else else
{ {
return "无料串"; return crc.GetString("Res0046","无料串");
} }
return state; return state;
...@@ -336,7 +337,7 @@ namespace DeviceLibrary ...@@ -336,7 +337,7 @@ namespace DeviceLibrary
string buchongStr = ""; string buchongStr = "";
if (isLast) if (isLast)
{ {
buchongStr = "(最后一盘料已补充5)"; buchongStr = $"(最后一盘料已补充5)";
height += 5; height += 5;
} }
...@@ -362,7 +363,7 @@ namespace DeviceLibrary ...@@ -362,7 +363,7 @@ namespace DeviceLibrary
} }
} }
if (LastHeight <= 8) { LastHeight = 8; } if (LastHeight <= 8) { LastHeight = 8; }
string msg = Name + " 计算盘高:上升前 [" + RightStartMovePosition + "]实时[ " + RightEndMovePosition + "]差值[" + (RightEndMovePosition - RightStartMovePosition) + "]系数[" + AxisChangeValue + "] 计算后" + buchongStr + "[" + height + "]" + ",归类为【" + LastHeight + "mm】"; string msg = Name + $" 计算盘高:上升前 [{RightStartMovePosition}]实时[{RightEndMovePosition}]差值[{(RightEndMovePosition - RightStartMovePosition)}]系数[{ AxisChangeValue}] 计算后{ buchongStr }[{ height }],归类为【{ LastHeight }mm】";
LogUtil.info(msg); LogUtil.info(msg);
return LastHeight; return LastHeight;
} }
...@@ -370,4 +371,4 @@ namespace DeviceLibrary ...@@ -370,4 +371,4 @@ namespace DeviceLibrary
} }
} }
\ No newline at end of file \ No newline at end of file
using OnlineStore.Common; using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -12,7 +13,7 @@ namespace DeviceLibrary ...@@ -12,7 +13,7 @@ namespace DeviceLibrary
{ {
public partial class MainMachine : IRobot public partial class MainMachine : IRobot
{ {
public string Name { get; set; } = "移载"; public string Name { get; set; } = crc.GetString("Res0036","移载");
private bool _canRunning=true; private bool _canRunning=true;
public bool canRunning public bool canRunning
{ {
...@@ -72,16 +73,16 @@ namespace DeviceLibrary ...@@ -72,16 +73,16 @@ namespace DeviceLibrary
Config = _config; Config = _config;
RightMoveInfo = new MoveInfo("右侧取料"); RightMoveInfo = new MoveInfo(crc.GetString("Res0039","右侧取料"));
RightMoveInfo.SetStateDelegate(RightState); RightMoveInfo.SetStateDelegate(RightState);
MiddleMoveInfo = new MoveInfo("移栽"); MiddleMoveInfo = new MoveInfo(crc.GetString("Res0042","移栽"));
MiddleMoveInfo.SetStateDelegate(MiddleState); MiddleMoveInfo.SetStateDelegate(MiddleState);
LeftMoveInfo = new MoveInfo("左侧放料"); LeftMoveInfo = new MoveInfo(crc.GetString("Res0051","左侧放料"));
LeftMoveInfo.SetStateDelegate(LeftState); LeftMoveInfo.SetStateDelegate(LeftState);
LabelMoveInfo = new MoveInfo("贴标"); LabelMoveInfo = new MoveInfo(crc.GetString("Res0052","贴标"));
LabelMoveInfo.SetStateDelegate(LabelState); LabelMoveInfo.SetStateDelegate(LabelState);
ResetMoveInfo = new MoveInfo("重置"); ResetMoveInfo = new MoveInfo(crc.GetString("Res0053","重置"));
#region 初始化led #region 初始化led
AlarmLed = new Led(Config.DOList[IO_Type.Alarm_HddLed].GetIOAddr()); AlarmLed = new Led(Config.DOList[IO_Type.Alarm_HddLed].GetIOAddr());
...@@ -117,7 +118,7 @@ namespace DeviceLibrary ...@@ -117,7 +118,7 @@ namespace DeviceLibrary
{ {
if (Label_Y_Axis.GetAclPosition() > Config.Label_Y_P2 + Label_Y_Axis.Config.CanErrorCountMax) if (Label_Y_Axis.GetAclPosition() > Config.Label_Y_P2 + Label_Y_Axis.Config.CanErrorCountMax)
{ {
return (true,"可能与贴标Y轴干涉"); return (true,crc.GetString("Res0054","可能与贴标Y轴干涉"));
} }
} }
return (false,""); return (false,"");
...@@ -128,13 +129,13 @@ namespace DeviceLibrary ...@@ -128,13 +129,13 @@ namespace DeviceLibrary
if (to > from) if (to > from)
{ {
if (Take_Middle_Axis.GetAclPosition() > Math.Max(Config.Take_Middle_P1, Config.Take_Middle_P2) + Take_Middle_Axis.Config.CanErrorCountMax) { if (Take_Middle_Axis.GetAclPosition() > Math.Max(Config.Take_Middle_P1, Config.Take_Middle_P2) + Take_Middle_Axis.Config.CanErrorCountMax) {
return (true, "可能与旋转轴干涉"); ; return (true, crc.GetString("Res0055","可能与旋转轴干涉")); ;
} }
} }
var Label_Z_Pos = Label_Z_Axis.GetAclPosition(); var Label_Z_Pos = Label_Z_Axis.GetAclPosition();
if (Label_Z_Pos>Math.Max(Config.Label_Z_P2,Config.Label_Z_P4)+ Label_Z_Axis.Config.CanErrorCountMax) if (Label_Z_Pos>Math.Max(Config.Label_Z_P2,Config.Label_Z_P4)+ Label_Z_Axis.Config.CanErrorCountMax)
return (true, "可能与贴标Z轴干涉"); ; return (true, crc.GetString("Res0056","可能与贴标Z轴干涉")); ;
return (false, ""); return (false, "");
} }
...@@ -290,7 +291,7 @@ namespace DeviceLibrary ...@@ -290,7 +291,7 @@ namespace DeviceLibrary
bool ok = true; bool ok = true;
if (UserPause) if (UserPause)
{ {
Msg.add("用户暂停", MsgLevel.warning); Msg.add(crc.GetString("Res0057","用户暂停"), MsgLevel.warning);
DeviceSuddenStop(); DeviceSuddenStop();
ok = false; ok = false;
}else if (IOValue(IO_Type.GratingSignal_Check).Equals(IO_VALUE.LOW)) }else if (IOValue(IO_Type.GratingSignal_Check).Equals(IO_VALUE.LOW))
...@@ -302,17 +303,17 @@ namespace DeviceLibrary ...@@ -302,17 +303,17 @@ namespace DeviceLibrary
ok = false; ok = false;
DeviceSuddenStop(); DeviceSuddenStop();
} }
Msg.add("安全光栅被遮挡" + (ok ? "[已忽略]" : ""), MsgLevel.warning); Msg.add(crc.GetString("Res0058","安全光栅被遮挡") + (ok ? crc.GetString("Res0061","[已忽略]") : ""), MsgLevel.warning);
} }
if (IOValue(IO_Type.HasNgBox).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.HasNgBox).Equals(IO_VALUE.LOW))
{ {
Msg.add("没有检测到NG料箱", MsgLevel.warning); Msg.add(crc.GetString("Res0062","没有检测到NG料箱"), MsgLevel.warning);
ok = false; ok = false;
} }
if (IOValue(IO_Type.HasPrinter).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.HasPrinter).Equals(IO_VALUE.LOW))
{ {
Msg.add("没有检测打印机", MsgLevel.warning); Msg.add(crc.GetString("Res0063","没有检测打印机"), MsgLevel.warning);
ok = false; ok = false;
} }
if (IOValue(IO_Type.LeftBackDoor_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.LeftBackDoor_Check).Equals(IO_VALUE.LOW))
...@@ -322,7 +323,7 @@ namespace DeviceLibrary ...@@ -322,7 +323,7 @@ namespace DeviceLibrary
ok = false; ok = false;
DeviceSuddenStop(); DeviceSuddenStop();
} }
Msg.add("左后门没有关闭" + (ok ? "[已忽略]" : ""), MsgLevel.warning); Msg.add(crc.GetString("Res0064","左后门没有关闭") + (ok ? crc.GetString("Res0061","[已忽略]") : ""), MsgLevel.warning);
} }
if (IOValue(IO_Type.RightBackDoor_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.RightBackDoor_Check).Equals(IO_VALUE.LOW))
{ {
...@@ -331,7 +332,7 @@ namespace DeviceLibrary ...@@ -331,7 +332,7 @@ namespace DeviceLibrary
ok = false; ok = false;
DeviceSuddenStop(); DeviceSuddenStop();
} }
Msg.add("右后门没有关闭" + (ok ? "[已忽略]" : ""), MsgLevel.warning); Msg.add(crc.GetString("Res0065","右后门没有关闭") + (ok ? crc.GetString("Res0061","[已忽略]") : ""), MsgLevel.warning);
} }
lastSafeCheckStatus = ok; lastSafeCheckStatus = ok;
return ok; return ok;
...@@ -363,7 +364,7 @@ namespace DeviceLibrary ...@@ -363,7 +364,7 @@ namespace DeviceLibrary
if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
{ {
Alarm(AlarmType.SuddenStop); Alarm(AlarmType.SuddenStop);
Msg.add("急停中", MsgLevel.warning); Msg.add(crc.GetString("Res0066","急停中"), MsgLevel.warning);
ok = false; ok = false;
} }
else if (alarmType == AlarmType.SuddenStop) { else if (alarmType == AlarmType.SuddenStop) {
...@@ -373,7 +374,7 @@ namespace DeviceLibrary ...@@ -373,7 +374,7 @@ namespace DeviceLibrary
//} //}
//else //else
{ {
Msg.add("系统需要重置", MsgLevel.warning); Msg.add(crc.GetString("Res0067","系统需要重置"), MsgLevel.warning);
ok = false; ok = false;
} }
} }
...@@ -386,7 +387,7 @@ namespace DeviceLibrary ...@@ -386,7 +387,7 @@ namespace DeviceLibrary
if (span.TotalSeconds > RobotManage.Config.AirCheckSeconds) if (span.TotalSeconds > RobotManage.Config.AirCheckSeconds)
{ {
ok = false; ok = false;
Msg.add("气压不足", MsgLevel.warning); Msg.add(crc.GetString("Res0068","气压不足"), MsgLevel.warning);
} }
} }
else { else {
...@@ -412,4 +413,4 @@ namespace DeviceLibrary ...@@ -412,4 +413,4 @@ namespace DeviceLibrary
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using OnlineStore.Common; using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -39,7 +40,7 @@ namespace DeviceLibrary ...@@ -39,7 +40,7 @@ namespace DeviceLibrary
var ElectricGripperPort = ConfigHelper.Config.Get("ElectricGripperPort"); var ElectricGripperPort = ConfigHelper.Config.Get("ElectricGripperPort");
electricGripper = new ElectricGripper(); electricGripper = new ElectricGripper();
if (!electricGripper.OpenPort(ElectricGripperPort)) { if (!electricGripper.OpenPort(ElectricGripperPort)) {
msg += $"电夹爪通讯失败:{ElectricGripperPort}\n"; msg += crc.GetString("Res0188","电夹爪通讯失败:{0}\n", ElectricGripperPort);
IsLoadOk = false; IsLoadOk = false;
} }
...@@ -47,7 +48,7 @@ namespace DeviceLibrary ...@@ -47,7 +48,7 @@ namespace DeviceLibrary
if (!IOManager.ConnectionIOList(new List<string>())) if (!IOManager.ConnectionIOList(new List<string>()))
{ {
IsLoadOk = false; IsLoadOk = false;
msg += "IO板卡初始化失败\n"; msg += crc.GetString("Res0189","IO板卡初始化失败\n");
} }
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH); IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH); IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
...@@ -59,7 +60,7 @@ namespace DeviceLibrary ...@@ -59,7 +60,7 @@ namespace DeviceLibrary
} }
} }
public static void LoadDebug() { public static void LoadDebug() {
LoadFinishEvent?.Invoke(true, "打开调试模式"); LoadFinishEvent?.Invoke(true, crc.GetString("Res0190","打开配置模式"));
} }
public static void Start() { public static void Start() {
//Init(); //Init();
...@@ -133,4 +134,4 @@ namespace DeviceLibrary ...@@ -133,4 +134,4 @@ namespace DeviceLibrary
LogUtil.info("PrintLabel 打印机初始化完成【" + labelName + "】【" + PrintName + "】"); LogUtil.info("PrintLabel 打印机初始化完成【" + labelName + "】【" + PrintName + "】");
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using OnlineStore.Common; using OnlineStore;
using OnlineStore.Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -32,7 +33,7 @@ namespace DeviceLibrary ...@@ -32,7 +33,7 @@ namespace DeviceLibrary
{ {
GripperType = GripperTypeE.Gripper; GripperType = GripperTypeE.Gripper;
if (moveInfo != null) if (moveInfo != null)
moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitAction),"夹爪夹紧")); moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitAction),crc.GetString("Res0192","夹爪夹紧")));
if (!IsBusy) if (!IsBusy)
{ {
axis.Push(ConfigHelper.Config.Get("ElectricGripperPushForce",40), 4.5f, 15); axis.Push(ConfigHelper.Config.Get("ElectricGripperPushForce",40), 4.5f, 15);
...@@ -64,7 +65,7 @@ namespace DeviceLibrary ...@@ -64,7 +65,7 @@ namespace DeviceLibrary
else else
{ {
if (moveInfo != null) if (moveInfo != null)
moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitAction), "夹爪放松")); moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitAction), crc.GetString("Res0193","夹爪放松")));
return false; return false;
} }
} }
...@@ -134,4 +135,4 @@ namespace DeviceLibrary ...@@ -134,4 +135,4 @@ namespace DeviceLibrary
None None
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -958,6 +958,7 @@ ...@@ -958,6 +958,7 @@
this.Controls.Add(this.groupAxis); this.Controls.Add(this.groupAxis);
this.Name = "AxisMoveControl"; this.Name = "AxisMoveControl";
this.Size = new System.Drawing.Size(699, 402); this.Size = new System.Drawing.Size(699, 402);
this.Load += new System.EventHandler(this.AxisMoveControl_Load);
this.groupAxis.ResumeLayout(false); this.groupAxis.ResumeLayout(false);
this.groupAxis.PerformLayout(); this.groupAxis.PerformLayout();
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
......
using System; using OnlineStore;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
...@@ -25,6 +26,14 @@ namespace DeviceLibrary ...@@ -25,6 +26,14 @@ namespace DeviceLibrary
public AxisMoveControl() public AxisMoveControl()
{ {
InitializeComponent(); InitializeComponent();
this.Tag = "not";
crc.OpenResourceLog = true;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
crc.CurrLanguage = ConfigHelper.Config.Get("Default_Language","zh-CN");
}
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{
crc.LanguageProcess(this);
} }
public void LoadData(IRobot equipBase, bool isHc = true) public void LoadData(IRobot equipBase, bool isHc = true)
{ {
...@@ -66,7 +75,7 @@ namespace DeviceLibrary ...@@ -66,7 +75,7 @@ namespace DeviceLibrary
{ {
if (axis == null) if (axis == null)
{ {
MessageBox.Show("请先选择运动轴", "警告 ", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(crc.GetString("Res0194","请先选择运动轴"), crc.GetString("Res0195","警告 "), MessageBoxButtons.OK, MessageBoxIcon.Error);
return false; return false;
} }
...@@ -208,8 +217,8 @@ namespace DeviceLibrary ...@@ -208,8 +217,8 @@ namespace DeviceLibrary
comjSpeed.Items.Add(targetSpeed * i / 10); comjSpeed.Items.Add(targetSpeed * i / 10);
} }
comjSpeed.SelectedIndex = 4; comjSpeed.SelectedIndex = 4;
btnAddMove.Text = "点动+ "; btnAddMove.Text = crc.GetString("Res0196","点动+ ");
btnDelMove.Text = "点动- "; btnDelMove.Text = crc.GetString("Res0197","点动- ");
txtASpeed.Text = targetSpeed.ToString(); txtASpeed.Text = targetSpeed.ToString();
int SelIndex = cmbAxis.SelectedIndex; int SelIndex = cmbAxis.SelectedIndex;
...@@ -272,7 +281,7 @@ namespace DeviceLibrary ...@@ -272,7 +281,7 @@ namespace DeviceLibrary
int speed = Convert.ToInt32(comjSpeed.Text); int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0) if (speed <= 0)
{ {
MessageBox.Show("提示", "请先输入正确的速度"); MessageBox.Show(crc.GetString("Res0198","提示"), crc.GetString("Res0199","请先输入正确的速度"));
return; return;
} }
btnAddMove.BackColor = Color.Green; btnAddMove.BackColor = Color.Green;
...@@ -301,7 +310,7 @@ namespace DeviceLibrary ...@@ -301,7 +310,7 @@ namespace DeviceLibrary
int speed = Convert.ToInt32(comjSpeed.Text); int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0) if (speed <= 0)
{ {
MessageBox.Show("提示", "请先输入正确的速度"); MessageBox.Show(crc.GetString("Res0198","提示"), crc.GetString("Res0199","请先输入正确的速度"));
return; return;
} }
btnDelMove.BackColor = Color.Green; btnDelMove.BackColor = Color.Green;
...@@ -333,7 +342,7 @@ namespace DeviceLibrary ...@@ -333,7 +342,7 @@ namespace DeviceLibrary
} }
private void ReadAxisStatus() private void ReadAxisStatus()
{ {
groupBox2.Text = cmbAxis.Text + "-状态监控"; groupBox2.Text = cmbAxis.Text + "-"+crc.GetString("Res0200","状态监控");
//【1】更新轴号 //【1】更新轴号
short axisNo = SlvAddr; short axisNo = SlvAddr;
if (axisNo < 0) if (axisNo < 0)
...@@ -397,7 +406,7 @@ namespace DeviceLibrary ...@@ -397,7 +406,7 @@ namespace DeviceLibrary
lbl.BackColor = Color.Red ; lbl.BackColor = Color.Red ;
lblAlarmcode.Visible = true; lblAlarmcode.Visible = true;
lblAlarmcode.ForeColor = Color.Red; lblAlarmcode.ForeColor = Color.Red;
lblAlarmcode.Text = "错误码:" + HCBoardManager.GetAxErrCode(SlvAddr); lblAlarmcode.Text = crc.GetString("Res0201","错误码:") + HCBoardManager.GetAxErrCode(SlvAddr);
} }
else else
{ {
...@@ -421,5 +430,10 @@ namespace DeviceLibrary ...@@ -421,5 +430,10 @@ namespace DeviceLibrary
{ {
this.timer1.Stop(); this.timer1.Stop();
} }
private void AxisMoveControl_Load(object sender, EventArgs e)
{
crc.LanguageProcess(this);
}
} }
} }
\ No newline at end of file \ No newline at end of file
using DeviceLibrary; using OnlineStore;
using DeviceLibrary;
using HuichuanLibrary; using HuichuanLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using System; using System;
...@@ -65,11 +66,11 @@ public partial class AxisTipControl : Form ...@@ -65,11 +66,11 @@ public partial class AxisTipControl : Form
AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr); AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr);
if (sts.ServoOn < 0) if (sts.ServoOn < 0)
{ {
showToolTip("伺服尚未使能"); showToolTip(crc.GetString("Res0202","伺服尚未使能"));
return; return;
} }
if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0) { if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0) {
showToolTip("伺服警报状态中"); showToolTip(crc.GetString("Res0203","伺服警报状态中"));
return; return;
} }
readPosition(); readPosition();
...@@ -78,7 +79,7 @@ public partial class AxisTipControl : Form ...@@ -78,7 +79,7 @@ public partial class AxisTipControl : Form
void showToolTip(string txt) { void showToolTip(string txt) {
var m_ToolTip = new ToolTip(); var m_ToolTip = new ToolTip();
m_ToolTip.ToolTipIcon = ToolTipIcon.Warning; m_ToolTip.ToolTipIcon = ToolTipIcon.Warning;
m_ToolTip.ToolTipTitle = "无法操作"; m_ToolTip.ToolTipTitle = crc.GetString("Res0204","无法操作");
m_ToolTip.AutoPopDelay = 0; m_ToolTip.AutoPopDelay = 0;
m_ToolTip.AutomaticDelay = 0; m_ToolTip.AutomaticDelay = 0;
m_ToolTip.InitialDelay = 0; m_ToolTip.InitialDelay = 0;
...@@ -108,7 +109,7 @@ public partial class AxisTipControl : Form ...@@ -108,7 +109,7 @@ public partial class AxisTipControl : Form
int speed = Convert.ToInt32(comjSpeed.Text); int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0) if (speed <= 0)
{ {
MessageBox.Show("提示", "请先输入正确的速度"); MessageBox.Show(crc.GetString("Res0198","提示"), crc.GetString("Res0199","请先输入正确的速度"));
return; return;
} }
btnAddMove.BackColor = Color.Green; btnAddMove.BackColor = Color.Green;
...@@ -141,7 +142,7 @@ public partial class AxisTipControl : Form ...@@ -141,7 +142,7 @@ public partial class AxisTipControl : Form
int speed = Convert.ToInt32(comjSpeed.Text); int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0) if (speed <= 0)
{ {
MessageBox.Show("提示", "请先输入正确的速度"); MessageBox.Show(crc.GetString("Res0198","提示"), crc.GetString("Res0199","请先输入正确的速度"));
return; return;
} }
btnDelMove.BackColor = Color.Green; btnDelMove.BackColor = Color.Green;
...@@ -163,12 +164,12 @@ public partial class AxisTipControl : Form ...@@ -163,12 +164,12 @@ public partial class AxisTipControl : Form
AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr); AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr);
if (sts.ServoOn < 0) if (sts.ServoOn < 0)
{ {
showToolTip("伺服尚未使能"); showToolTip(crc.GetString("Res0202","伺服尚未使能"));
return false; return false;
} }
if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0) if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0)
{ {
showToolTip("伺服警报状态中"); showToolTip(crc.GetString("Res0203","伺服警报状态中"));
return false; return false;
} }
return true; return true;
...@@ -188,4 +189,3 @@ public partial class AxisTipControl : Form ...@@ -188,4 +189,3 @@ public partial class AxisTipControl : Form
this.Close(); this.Close();
} }
} }
此文件类型无法预览
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!