Commit a3879b52 刘韬

修正翻译

1 个父辈 4dc34120
using HuichuanLibrary;
using HuichuanLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
......@@ -53,7 +53,7 @@ namespace DeviceLibrary
if (AxisManager.GetAlarmStatus(portName, slvAddr) != 0)
{
AxisManager.AlarmClear(portName, slvAddr);
Msg += "...尝试清除报警第" + j + "次";
Msg += crc.GetString("Res0006.5b851e06","...尝试清除报警第") + j + crc.GetString("Res0007.7229ecc6","次");
Thread.Sleep(500);
continue;
}
......@@ -63,11 +63,11 @@ namespace DeviceLibrary
Thread.Sleep(50);
if (AxisManager.IsServeoOn(portName, slvAddr))
{
Msg += "...尝试使能成功";
Msg += crc.GetString("Res0018.975ecef5","...尝试使能成功");
return true;
}
else
Msg += "...尝试使能失败";
Msg += crc.GetString("Res0019.ebec6459","...尝试使能失败");
Thread.Sleep(2000);
Msg += "\r\n";
......@@ -104,7 +104,7 @@ namespace DeviceLibrary
else
{
AxisManager.ServoOff(portName, slvAddr);
msg = "打开轴" + Config.Explain + "失败 ";
msg = crc.GetString("Res0021.2bf5c941","打开轴") + Config.Explain + crc.GetString("Res0022.33d2a704","失败 ");
LogUtil.info(AxisName + msg);
return false;
}
......@@ -214,7 +214,7 @@ namespace DeviceLibrary
int isAlarm = AxisManager.GetAlarmStatus(deviceName, axisNo);
if (isAlarm.Equals(1))
{
clearMsg = "清理报警,";
clearMsg = crc.GetString("Res0023.cbd5d752","清理报警,");
AxisManager.AlarmClear(deviceName, axisNo);
Thread.Sleep(200);
AxisManager.ServoOn(deviceName, axisNo);
......@@ -551,4 +551,4 @@ namespace DeviceLibrary
}
}
}
\ No newline at end of file
using OnlineStore.Common;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
......@@ -29,7 +30,7 @@ namespace DeviceLibrary
MoveInfo moveInfo1;
bool paused = false;
private bool needPlaySound = false;
public LiftMonitor(string _up, string _down, string _saftylight, string _break, AxisBean _axisBean, int _StrokeLength, int _upspeed, int _downspeed = 0,string name= "升降机构",bool needSound=false )
public LiftMonitor(string _up, string _down, string _saftylight, string _break, AxisBean _axisBean, int _StrokeLength, int _upspeed, int _downspeed,string name,bool needSound=false )
{
moveInfo1 = new MoveInfo(name, false);
up = _up;
......@@ -355,4 +356,4 @@ namespace DeviceLibrary
catch { }
}
}
}
}
\ No newline at end of file
......@@ -865,7 +865,7 @@ namespace DeviceLibrary
if (data == null)
{
msg = deviceName + " getNetPos 没有收到服务器反馈";
msg = deviceName + $" getNetPos 没有收到服务器反馈";
}
else if (data.code.Equals(0).Equals(false))
{
......
using log4net;
using log4net;
using OnlineStore.Common;
using OnlineStore;
using System;
......@@ -205,7 +205,7 @@ namespace DeviceLibrary
{
if (!OpenPort(comPortName, out string errmsg))
{
log("未初始化,或已断开连接:" + errmsg);
log($"未初始化,或已断开连接:" + errmsg);
return restr;
}
}
......@@ -421,4 +421,4 @@ DD 55 EE 00 00 00 01 00 99 01 00 00 00 5A 00 01 1B 09 6C 1B 09 6C 1B 09 6C 1B 09
_serialPort?.Close();
}
}
}
}
\ No newline at end of file
using log4net;
using log4net;
using OnlineStore;
using OnlineStore.Common;
using System;
......@@ -92,7 +92,7 @@ namespace DeviceLibrary
{
msg += crc.GetString("comOpenFail", "串口{0}打开失败", PortName);
//msg = "端口连接失败:" + PortName;
log("串口打开失败:" + PortName.ToString());
log(crc.GetString("Res0024.6c83a184","串口打开失败:") + PortName.ToString());
return false;
}
else
......@@ -116,7 +116,7 @@ namespace DeviceLibrary
{
msg = crc.GetString("comOpenFail", "串口{0}打开失败", PortName);
//msg =e.ToString();
log("串口"+PortName+"打开失败:"+e.ToString());
log($"串口"+PortName+$"打开失败:"+e.ToString());
return false;
}
}
......@@ -171,7 +171,7 @@ namespace DeviceLibrary
}
catch (Exception ex)
{
error("read 出错::" + ex.ToString());
error($"read 出错::" + ex.ToString());
}
return new byte[0];
}
......@@ -229,7 +229,7 @@ namespace DeviceLibrary
{
if (!Open(PortName, out string msg))
{
log(PortName + "未初始化,或已断开连接");
log(PortName + $"未初始化,或已断开连接");
return restr;
}
}
......@@ -424,17 +424,17 @@ namespace DeviceLibrary
}
void error(string msg)
{
loge.Error("x光高压:" + msg);
loge.Error($"x光高压:" + msg);
Console.WriteLine(msg);
}
void log(string msg)
{
loge.Info("x光高压:" + msg);
loge.Info($"x光高压:" + msg);
Console.WriteLine(msg);
}
void debuglog(string msg)
{
loge.Debug("x光高压:" + msg);
loge.Debug($"x光高压:" + msg);
Console.WriteLine(msg);
}
}
......@@ -468,4 +468,4 @@ namespace DeviceLibrary
}
}
}
}
\ No newline at end of file
using CodeLibrary;
using CodeLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
......@@ -34,7 +34,7 @@ namespace DeviceLibrary
lastSuddenStop = false;
ProcessMsgEvent?.Invoke(Msg.get());
StringStartOut("按下复位按钮");
StringStartOut(crc.GetString("Res0033.009d536f","按下复位按钮"));
}
void Run_BTN()
{
......@@ -64,4 +64,4 @@ namespace DeviceLibrary
RobotManage.Stop();
}
}
}
}
\ No newline at end of file
......@@ -139,8 +139,8 @@ namespace DeviceLibrary
{
RobotManage.Config.DOList.Remove(IO_Type.ReelFlipDoor_Work);
RobotManage.Config.DOList.Remove(IO_Type.ReelFlipDoor_Home);
MotorFlipDoorB = new LiftMonitor(IO_Type.ReelFlipDoor_L_Home, IO_Type.ReelFlipDoor_L_Work, IO_Type.SafetyLightCurtains, null, new AxisBean(Config.FlipDoor_L_Axis, Name), Config.FlipDoorLength, Config.FlipDoorLength_speed, 0, "B翻转门");
MotorFlipDoorA = new LiftMonitor(IO_Type.ReelFlipDoor_R_Home, IO_Type.ReelFlipDoor_R_Work, IO_Type.SafetyLightCurtains, null, new AxisBean(Config.FlipDoor_R_Axis, Name), Config.FlipDoorLength, Config.FlipDoorLength_speed, 0, "A翻转门");
MotorFlipDoorB = new LiftMonitor(IO_Type.ReelFlipDoor_L_Home, IO_Type.ReelFlipDoor_L_Work, IO_Type.SafetyLightCurtains, null, new AxisBean(Config.FlipDoor_L_Axis, Name), Config.FlipDoorLength, Config.FlipDoorLength_speed, 0, $"B翻转门");
MotorFlipDoorA = new LiftMonitor(IO_Type.ReelFlipDoor_R_Home, IO_Type.ReelFlipDoor_R_Work, IO_Type.SafetyLightCurtains, null, new AxisBean(Config.FlipDoor_R_Axis, Name), Config.FlipDoorLength, Config.FlipDoorLength_speed, 0, $"A翻转门");
MotorFlipDoorB.SlowAftPause = true;
MotorFlipDoorB.SlowAftPause = true;
LogUtil.info("加载翻板门类型为:步进");
......@@ -158,7 +158,7 @@ namespace DeviceLibrary
var sf = "";
if (Setting_Init.StringDoor_X08IsStringDoor_SafetyLightCurtains)
sf = IO_Type.AGV_OnPosition;
StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, sf, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed, 0, "折叠门", true);
StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, sf, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed, 0, crc.GetString("Res0036.da7a921f","折叠门"), true);
StringDoor.DownOverTimeMS = Setting_Init.StringDoor_DownOverTimeMS;
StringDoor.UpOverTimeMS = Setting_Init.StringDoor_UpOverTimeMS;
StringDoor.ResumeWaitTimeSec = 5;
......
using CodeLibrary;
using CodeLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
......@@ -66,7 +66,7 @@ namespace DeviceLibrary
}
else
{
RobotManage.UserPause("单口料盘已取走", false);
RobotManage.UserPause(crc.GetString("Res0037.53a1c193","单口料盘已取走"), false);
}
}
LogUtil.info($"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}");
......@@ -108,4 +108,4 @@ namespace DeviceLibrary
return crc.GetString(L.begin_close_string_door, "开始关闭料串门");
}
}
}
}
\ No newline at end of file
......@@ -794,7 +794,7 @@ namespace DeviceLibrary
}
if (LastHeight <= 8) { LastHeight = 8; }
//string code = CodeManager.ProcessCode(LastCodeList);
string msg = Name + prefix + "上升前 [" + StartMovePosition + "]实时[ " + EndMovePosition + "]差值[" + (EndMovePosition - StartMovePosition) + "]系数[" + AxisChangeValue + "] 计算后" + "[" + height + "]," + buchongStr + ",归类为【" + LastHeight + "mm】条码【" + LastCode + "】";
string msg = Name + prefix + $"上升前 [" + StartMovePosition + $"]实时[ " + EndMovePosition + $"]差值[" + (EndMovePosition - StartMovePosition) + $"]系数[" + AxisChangeValue + $"] 计算后" + "[" + height + "]," + buchongStr + $",归类为【" + LastHeight + $"mm】条码【" + LastCode + "】";
LogUtil.info(msg);
return LastHeight;
}
......
using OnlineStore.Common;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
......@@ -265,11 +266,11 @@ namespace DeviceLibrary
}
else if (WaitType.Equals(WaitEnum.W008_BatchAxis))
{
return "批量轴上升到上料点";
return crc.GetString("Res0043.84e7c741","批量轴上升到上料点");
}
else if (WaitType.Equals(WaitEnum.W009_ScanCode))
{
return "扫码完成";
return crc.GetString("Res0044.ed4de1c6","扫码完成");
}
else if (WaitType.Equals(WaitEnum.W013_Action))
{
......@@ -412,4 +413,4 @@ namespace DeviceLibrary
///// </summary>
//CheckFixture=6,
}
}
}
\ No newline at end of file
using Newtonsoft.Json;
using OnlineStore;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
......@@ -131,12 +132,12 @@ namespace ImgCheckReel
}
catch (AccessViolationException e)
{
MessageBox.Show(" 扫码出现AccessViolationException异常:" + e.ToString());
MessageBox.Show(crc.GetString("Res0045.83e7b221"," 扫码出现AccessViolationException异常:") + e.ToString());
return null;
}
catch (Exception ex)
{
MessageBox.Show(" 扫码出错:" + ex.ToString());
MessageBox.Show(crc.GetString("Res0046.f220fc88"," 扫码出错:") + ex.ToString());
return null;
}
finally
......@@ -153,7 +154,7 @@ namespace ImgCheckReel
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = "c:\\";//注意这里写路径时要用c:\\而不是c:\
openFileDialog.Filter = "图片|*.*";
openFileDialog.Filter = crc.GetString("Res0047.9ba9fd98","图片|*.*");
openFileDialog.RestoreDirectory = true;
openFileDialog.FilterIndex = 1;
if (openFileDialog.ShowDialog() == DialogResult.OK)
......@@ -559,4 +560,4 @@ namespace ImgCheckReel
}
}
}
}
}
\ No newline at end of file
......@@ -89,5 +89,11 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
<Project>{43CDD09E-FCF3-4960-A01D-3BBFE9933122}</Project>
<Name>Common</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using CodeLibrary;
using CodeLibrary;
using Common;
using ConfigHelper;
using DeviceLibrary;
......@@ -584,11 +584,11 @@ namespace TheMachine
}
else if (!RobotManage.IsUserPause)
{
RobotManage.UserPause("用户按下启动按钮", true);
RobotManage.UserPause(crc.GetString("Res0048.aff4439b","用户按下启动按钮"), true);
}
else if (RobotManage.IsUserPause)
{
RobotManage.UserPause("用户按下启动按钮", false);
RobotManage.UserPause(crc.GetString("Res0048.aff4439b","用户按下启动按钮"), false);
}
}
private void RobotManage_UserPauseSet(object sender, bool e)
......@@ -929,4 +929,4 @@ namespace TheMachine
//}
}
}
}
}
\ No newline at end of file
using CodeLibrary;
using CodeLibrary;
using Common;
using ConfigHelper;
using DeviceLibrary;
......@@ -587,11 +587,11 @@ namespace TheMachineNView
}
else if (!RobotManage.IsUserPause)
{
RobotManage.UserPause("用户按下启动按钮", true);
RobotManage.UserPause(crc.GetString("Res0048.aff4439b","用户按下启动按钮"), true);
}
else if (RobotManage.IsUserPause)
{
RobotManage.UserPause("用户按下启动按钮", false);
RobotManage.UserPause(crc.GetString("Res0048.aff4439b","用户按下启动按钮"), false);
}
}
private void RobotManage_UserPauseSet(object sender, bool e)
......@@ -694,7 +694,7 @@ namespace TheMachineNView
CodeLibrary.CodeResourceControl.GetLanguageEvent += Crc_GetLanguageEvent;
CodeLibrary.FrmCodeDecodeNW frm = new CodeLibrary.FrmCodeDecodeNW();
frm.CurrLanguage = Crc_GetLanguageEvent();
crc.LanguageProcess(frm);
frm.chbZxing.Checked = false;
try
{
......@@ -933,4 +933,4 @@ namespace TheMachineNView
//}
}
}
}
}
\ No newline at end of file
......@@ -237,7 +237,7 @@ namespace TheMachineNView
this.uC_LedConfig1.Name = "uC_LedConfig1";
this.uC_LedConfig1.Size = new System.Drawing.Size(693, 427);
this.uC_LedConfig1.TabIndex = 9;
this.uC_LedConfig1.Tag = "not";
this.uC_LedConfig1.Tag = "";
//
// uC_SetUserPassword1
//
......
......@@ -87,8 +87,9 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="UserFromControl">
<HintPath>C:\Users\HY\Desktop\UserFromControl.dll</HintPath>
<Reference Include="UserFromControl, Version=1.0.7440.17371, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>bin\Debug\UserFromControl.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
......
......@@ -53,6 +53,7 @@ namespace TheMachineNView
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(601, 363);
this.tableLayoutPanel1.TabIndex = 0;
this.tableLayoutPanel1.Tag = "not";
//
// button_reset
//
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!