Commit 6a65fcff 刘韬

稳定版

1 个父辈 52ae7858

using OnlineStore;
using log4net;
using System;
using System.Collections.Generic;
......@@ -38,7 +39,7 @@ namespace OnlineStore.Common
{
Release();
}
LogName = "温湿度传感器[" + port + "]";
LogName = crc.GetString("Res0001","温湿度传感器[") + port + "]";
if (sb == null)
{
......@@ -325,4 +326,4 @@ namespace OnlineStore.Common
}
}
}
}
\ No newline at end of file
using System;
using OnlineStore;
using System;
using System.Text;
using System.Windows.Forms;
......@@ -33,7 +34,7 @@ namespace OnlineStore.Common
private void logLocalIp()
{
string[] addresses = GetLocalAddresses();
string iplist = "本机IP:[";
string iplist = crc.GetString("Res0002","本机IP:[");
if (addresses.Length > 0)
{
for (int i = 0; i < addresses.Length; i++)
......@@ -263,4 +264,4 @@ namespace OnlineStore.Common
}
}
}
}
\ No newline at end of file

using OnlineStore;
using System;
using System.Collections.Generic;
using System.Linq;
......@@ -26,7 +27,7 @@ namespace OnlineStore.Common
private void logLocalIp()
{
string[] addresses = GetLocalAddresses();
string iplist = "本机IP:[";
string iplist = crc.GetString("Res0002","本机IP:[");
if (addresses.Length > 0)
{
for (int i = 0; i < addresses.Length; i++)
......@@ -156,4 +157,4 @@ namespace OnlineStore.Common
return retval;
}
}
}
}
\ No newline at end of file
using OnlineStore.Common;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
......@@ -52,7 +53,7 @@ namespace DeviceLibrary
{
if (moveInfo == null)
moveInfo = new MoveInfo("界面", false);
moveInfo = new MoveInfo(crc.GetString("Res0003","界面"), false);
if (IOManager.IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
{
moveInfo.log($"急停未解除");
......@@ -127,7 +128,7 @@ namespace DeviceLibrary
public void LiftDown(MoveInfo moveInfo)
{
if (moveInfo == null)
moveInfo = new MoveInfo("界面", false);
moveInfo = new MoveInfo(crc.GetString("Res0003","界面"), false);
if (IOManager.IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
{
moveInfo.log($"急停未解除");
......@@ -217,4 +218,4 @@ namespace DeviceLibrary
//throw new NotImplementedException();
}
}
}
}
\ No newline at end of file
using OnlineStore;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
......@@ -218,7 +218,7 @@ namespace DeviceLibrary
sendmsg = string.Join(",", new string[] { WarnMsg });
}
else if (!RobotManage.isRunning){
sendmsg = "设备未启动";
sendmsg = crc.GetString("Res0004","设备未启动");
}
lineOperation.msg = sendmsg;
......@@ -648,4 +648,4 @@ namespace DeviceLibrary
InStoreError = 14,
}
}
}
\ No newline at end of file
......@@ -49,6 +49,26 @@ namespace DeviceLibrary
public void ClearLastPosid(string posid) {
if (lastoutpos == posid)
lastoutpos = "";
lock (jobInfos)
{
List<JobInfo> tempList = new List<JobInfo>();
JobInfo item;
while (jobInfos.TryDequeue(out item))
{
if (item.PosId != posid)
{
tempList.Add(item);
}
}
// 重新将剩余的元素加入队列中
foreach (JobInfo i in tempList)
{
jobInfos.Enqueue(i);
}
}
}
}
......
......@@ -40,6 +40,24 @@ namespace DeviceLibrary
RobotManage.UserPause("Reset_BTN", false);
}
}
void HomeReset_BTN()
{
if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH))
{
Msg.add(crc.GetString(L.reset_press, "按下复位按钮."), MsgLevel.info, ErrInfo.ResetBtn);
}
else
{
Msg.add(crc.GetString(L.reset_press_with_sudden, "急停未解除,按下复位按钮尝试复位安全继电器."), MsgLevel.info, ErrInfo.SuddenStop);
}
if (mstart)
{
LogUtil.info("长按下复位按钮,系统正在运行,开始复位");
BeginHomeReset();
}
ProcessMsgEvent?.Invoke(Msg.get());
}
void Run_BTN() {
if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH))
{
......
......@@ -16,8 +16,36 @@ namespace DeviceLibrary
{
void ioMonitor()
{
airprocess();
}
DateTime LastHumiCheckTime = DateTime.Now.AddHours(2);
void airprocess()
{
//var temp = HumitureController.QueryData();
var temp = HumitureController.LastData;
var Current_Humidity = temp.Humidity;
var Current_Temperate = temp.Temperate;
//var tempIsOK = Current_Temperate < ServerCM.Max_Temperature;
var humiNeedStart = Current_Humidity > ServerCM.Max_Humidity - Setting_Init.Device_HumidityStartOffser;
var humiNeedStop = Current_Humidity < ServerCM.Max_Humidity - Setting_Init.Device_HumidityEndOffser;
if (Current_Humidity <= ServerCM.Max_Humidity)
LastHumiCheckTime = DateTime.Now;
//else if ((DateTime.Now - LastHumiCheckTime).TotalSeconds > 30)
//{
// Msg.add("温湿度超限", MsgLevel.alarm);
//}
if (humiNeedStart && IOValue(IO_Type.StartOrStopBlow).Equals(IO_VALUE.LOW))
{
IOMove(IO_Type.StartOrStopBlow, IO_VALUE.HIGH);
LogUtil.info($"开始吹气,当前最大湿度:{Current_Humidity} > {ServerCM.Max_Humidity}-{Setting_Init.Device_HumidityStartOffser}.");
}
else if (humiNeedStop && IOValue(IO_Type.StartOrStopBlow).Equals(IO_VALUE.HIGH))
{
IOMove(IO_Type.StartOrStopBlow, IO_VALUE.LOW);
LogUtil.info($"关闭吹气,当前最大湿度:{Current_Humidity} < {ServerCM.Max_Humidity}-{Setting_Init.Device_HumidityEndOffser}.");
}
}
}
}
using CodeLibrary;
using OnlineStore;
using CodeLibrary;
using Newtonsoft.Json;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
......@@ -67,22 +68,25 @@ namespace DeviceLibrary
{
MachineLedState.Clear();
//系统报警并停止,红亮
MachineLedStateName[MachineLedStateE.AlarmStop] = "停机报警";
MachineLedStateName[MachineLedStateE.AlarmStop] = crc.GetString("Res0005","停机报警");
MachineLedState.Add(MachineLedStateE.AlarmStop, nls(LedState.on, LedState.off, LedState.off));
//系统运行时报警, 绿亮,红闪
MachineLedStateName[MachineLedStateE.Alarm] = "报警";
MachineLedStateName[MachineLedStateE.Alarm] = crc.GetString("Res0006","报警");
MachineLedState.Add(MachineLedStateE.Alarm, nls(LedState.blink, LedState.off, LedState.on));
//系统复位中 绿闪
MachineLedStateName[MachineLedStateE.HomeReset] = "复位";
MachineLedStateName[MachineLedStateE.HomeReset] = crc.GetString("Res0007","复位");
MachineLedState.Add(MachineLedStateE.HomeReset, nls(LedState.off, LedState.off, LedState.blink));
//系统正常运行
MachineLedStateName[MachineLedStateE.Running] = "运行";
MachineLedStateName[MachineLedStateE.Running] = crc.GetString("Res0008","运行");
MachineLedState.Add(MachineLedStateE.Running, nls(LedState.none, LedState.none, LedState.on));
//系统暂停, 绿闪,红闪
MachineLedStateName[MachineLedStateE.SystemPause] = "暂停";
MachineLedStateName[MachineLedStateE.SystemPause] = crc.GetString("Res0009","暂停");
MachineLedState.Add(MachineLedStateE.SystemPause, nls(LedState.blink, LedState.off, LedState.blink));
//温湿度超限 绿闪黄闪
//MachineLedStateName[MachineLedStateE.THoutRangeOver30m] = "温湿度超限";
//MachineLedState.Add(MachineLedStateE.THoutRangeOver30m, nls(LedState.none, LedState.blink, LedState.blink));
//进出库, 绿亮,黄闪
MachineLedStateName[MachineLedStateE.InOut] = "出入库中";
MachineLedStateName[MachineLedStateE.InOut] = crc.GetString("Res0010","出入库中");
MachineLedState.Add(MachineLedStateE.InOut, nls(LedState.none, LedState.blink, LedState.on));
}
Dictionary<LedColor, LedState> nls(LedState AlarmLedstate, LedState StandbyLedstate, LedState RunningLedstate) {
......@@ -139,6 +143,10 @@ namespace DeviceLibrary
//AlarmLed.LedState = LedState.blink;
ProcessLefCfg(MachineLedStateE.SystemPause);
}
if((DateTime.Now - LastHumiCheckTime).TotalSeconds > 30)
{
//ProcessLefCfg(MachineLedStateE.THoutRangeOver30m);
}
}
else if (runStatus == RunStatus.Stop)
{
......@@ -223,8 +231,8 @@ namespace DeviceLibrary
HomeReset,
Running,
SystemPause,
THoutRangeOver30m,
THoutRange,
//THoutRangeOver30m,
//THoutRange,
InOut,
}
}
}
\ No newline at end of file
using OnlineStore;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary;
......@@ -73,10 +73,10 @@ namespace DeviceLibrary
public MainMachine(Robot_Config _config) {
Config = _config;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
StoreMoveInfo = new MoveInfo("进出库调度");
StoreMoveInfo = new MoveInfo(crc.GetString("Res0011","进出库调度"));
StoreMoveInfo.SetStateDelegate(StoreState);
ResetMoveInfo = new MoveInfo("重置");
AIOTMoveInfo = new MoveInfo("出入库测试");
ResetMoveInfo = new MoveInfo(crc.GetString("Res0012","重置"));
AIOTMoveInfo = new MoveInfo(crc.GetString("Res0013","出入库测试"));
Remote = new RemoteClient(CID, Setting_Init.Device_MT_Server);
Remote.AddAction("DoorRelease", (requestLoadInfo) =>
......@@ -119,7 +119,7 @@ namespace DeviceLibrary
AlarmBuzzer.SetOnOffAction(() =>{ IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.HIGH); }, () => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW); });
IOMonitor.RegisterIO(IO_Type.Reset_BTN, Config, IO_VALUE.HIGH, Reset_BTN, 2500,100);
//IOMonitor.RegisterIO(IO_Type., Config, IO_VALUE.HIGH, Run_BTN, 2500,100);
IOMonitor.RegisterIO(IO_Type.Reset_BTN, Config, IO_VALUE.HIGH, HomeReset_BTN, 2500, 3000);
LedProcessInit();
}
......@@ -201,7 +201,7 @@ namespace DeviceLibrary
var isupdownindoor = UpDown_Axis.IsInPosition(Config.UpDown_P1) || UpDown_Axis.IsInPosition(Config.UpDown_P2) || UpDown_Axis.IsInPosition(Config.UpDown_P3);
if (!isupdownindoor) {
return (true, "升降轴不在单料口,进出轴不可运动");
return (true, crc.GetString("Res0014","升降轴不在单料口,进出轴不可运动"));
}
return (false, "");
......@@ -489,7 +489,7 @@ namespace DeviceLibrary
ok = false;
DeviceSuddenStop();
}
Msg.add("后侧防护门没有关闭" + (ok ? ignorestring : ""), MsgLevel.warning);
Msg.add(crc.GetString("Res0015","后侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning);
}
if (!lastSafeCheckStatus && ok)
{
......@@ -532,7 +532,8 @@ namespace DeviceLibrary
else if (isInSuddenDown)
{
//Alarm(AlarmType.SuddenStop);
Msg.add(crc.GetString(L.in_suddenstop, "急停中"), MsgLevel.alarm);
Msg.add(crc.GetString(L.in_suddenstop, "急停中"), MsgLevel.alarm, ErrInfo.SuddenStop);
ButtenEvent?.Invoke(null, ErrInfo.SuddenStop);
lastSafeCheckStatus = false;
ok = false;
}
......@@ -574,7 +575,7 @@ namespace DeviceLibrary
{
Msg.add(crc.GetString(configMoveAxis.ProName, configMoveAxis.Explain) + $"[{configMoveAxis.GetAxisValue()}]:"
+ crc.GetString(L.motion_alarm, "运动报警"), MsgLevel.alarm);
RobotManage.UserPause("压紧轴报警", true);
RobotManage.UserPause(crc.GetString("Res0016","压紧轴报警"), true);
AxisManager.AlarmClear(configMoveAxis.DeviceName, configMoveAxis.GetAxisValue());
Thread.Sleep(2000);
SingleDoor.LiftUp(null);
......@@ -601,4 +602,4 @@ namespace DeviceLibrary
LogUtil.info("按下X09忽略");
}
}
}
}
\ No newline at end of file
using CodeLibrary;
using CodeLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
......@@ -123,7 +123,7 @@ namespace DeviceLibrary
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_08);
SingleDoor.ToHigh(ClampMoveInfo);
Msg.add(ClampMoveInfo.MoveParam.NgMsg, MsgLevel.alarm);
RobotManage.UserPause("未检测到盘", true);
RobotManage.UserPause(crc.GetString("Res0017","未检测到盘"), true);
}
else
{
......@@ -468,4 +468,4 @@ namespace DeviceLibrary
}
}
}
\ No newline at end of file
using CodeLibrary;
using CodeLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using RemoteSheardObject;
using System;
using System.Collections.Generic;
using System.Drawing;
......@@ -57,6 +58,7 @@ namespace DeviceLibrary
if (s.Equals(IO_VALUE.LOW))
{
StoreMoveInfo.NextMoveStep(MoveStep.WaitInStore);
StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
LogUtil.info("锁定料仓等待入库");
return true;
}
......@@ -85,6 +87,17 @@ namespace DeviceLibrary
//常规上料扫码流程
switch (StoreMoveInfo.MoveStep)
{
case MoveStep.WaitInStore:
StoreMoveInfo.NextMoveStep(MoveStep.WaitInStore);
StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (IsLineFree() == RemoteResult.True)
{
StoreMoveInfo.log($"MT已经不在入库模式");
StoreMoveInfo.EndMove();
}
else
Msg.add(crc.GetString("Res0072","等待入库物料"), MsgLevel.info);
break;
case MoveStep.Wait:
//判断有没有出库任务, 需要入库空闲, 出口空闲
......@@ -132,7 +145,7 @@ namespace DeviceLibrary
{
StoreMoveInfo.log("入口料盘,获取库位失败");
StoreMoveInfo.MoveParam.IsNg = true;
StoreMoveInfo.MoveParam.NgMsg = $"[{CID}]" + "无信息物料";
StoreMoveInfo.MoveParam.NgMsg = $"[{CID}]" + crc.GetString("Res0018","无信息物料");
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut_WaitMT);
}
break;
......@@ -142,7 +155,7 @@ namespace DeviceLibrary
Msg.add(crc.GetString("Res0156", "服务器连接异常"), MsgLevel.warning);
return;
}
SRec.info(CID, "", "开始入库", StoreMoveInfo.MoveParam.PosID);
SRec.info(CID, "", crc.GetString("Res0019","开始入库"), StoreMoveInfo.MoveParam.PosID);
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn02);
break;
......@@ -186,7 +199,7 @@ namespace DeviceLibrary
case MoveStep.StoreIn05:
if (boxTransport.IsComplateOrFree)
{
SRec.info(CID, "", "完成入库", StoreMoveInfo.MoveParam.PosID);
SRec.info(CID, "", crc.GetString("Res0020","完成入库"), StoreMoveInfo.MoveParam.PosID);
StoreMoveInfo.log($"料盘已到达目的地");
StoreMoveInfo.EndMove();
......@@ -204,7 +217,7 @@ namespace DeviceLibrary
BoxStorePosition outTo = new BoxStorePosition(Config, StoreSide.NGDoor, StoreMoveInfo.MoveParam);
boxTransport.Start(outFrom == null ? null : new BoxStorePosition(Config, outFrom, StoreMoveInfo.MoveParam), outTo, StoreMoveType.OutStore);
StoreMoveInfo.log($"开始转运料盘");
SRec.info(CID, "", "开始出库", StoreMoveInfo.MoveParam.PosID);
SRec.info(CID, "", crc.GetString("Res0021","开始出库"), StoreMoveInfo.MoveParam.PosID);
break;
case MoveStep.StoreOut11:
......@@ -241,6 +254,7 @@ namespace DeviceLibrary
}
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut_WaitMT);
StoreMoveInfo.log($"料盘已到达目的地");
TheLine.UpdateLocInfo("", StoreMoveInfo.MoveParam.WareCode, TheLine.LineStatusE.BOXDOOR, CID);
OutStoreJobList.ClearLastPosid(StoreMoveInfo.MoveParam.PosID);
}
break;
......@@ -248,18 +262,18 @@ namespace DeviceLibrary
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut_WaitMT);
if (SendTrayRequest("MTP2", StoreMoveInfo.MoveParam) > RemoteResult.Timeout)
{
SRec.info(CID, "", "完成出库", StoreMoveInfo.MoveParam.PosID);
SRec.info(CID, "", crc.GetString("Res0022","完成出库"), StoreMoveInfo.MoveParam.PosID);
StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0161", "等待单料门料盘被取走"), MsgLevel.warning));
}
else
{
StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg("请求环形线空托盘失败", MsgLevel.warning));
StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0023","请求环形线空托盘失败"), MsgLevel.warning));
}
StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(10000));
break;
case MoveStep.StoreOut14:
Msg.add("等待环形线取走料盘", MsgLevel.warning);
Msg.add(crc.GetString("Res0024","等待环形线取走料盘"), MsgLevel.warning);
if (IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{
if (IsLineFree() == RemoteResult.True)
......@@ -277,7 +291,11 @@ namespace DeviceLibrary
string StoreState()
{
string state = crc.GetString("Res0162", "空闲中");
if (StoreMoveInfo.MoveStep >= MoveStep.StoreOut10)
if (StoreMoveInfo.MoveStep == MoveStep.WaitInStore)
{
state = crc.GetString("Res0072","等待入库物料") + ":" + StoreMoveInfo.MoveParam.PosID;
}
else if (StoreMoveInfo.MoveStep >= MoveStep.StoreOut10)
{
state = crc.GetString("Res0163", "出库中") + ":" + StoreMoveInfo.MoveParam.PosID;
}
......@@ -298,4 +316,4 @@ namespace DeviceLibrary
return Remote.SendAndWait(remoteLoad);
}
}
}
}
\ No newline at end of file
using CodeLibrary;
using CodeLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
......@@ -90,9 +90,9 @@ namespace DeviceLibrary
CylinderMove(StringMoveInfo, IO_Type.BatchDoor_Close, IO_Type.BatchDoor_Open, IO_VALUE.LOW);
StringMoveInfo.log($"开始批量入库");
StringState = StringStateE.InStore;
return "开始批量入库";
return crc.GetString("Res0025","开始批量入库");
}
return "系统忙碌,无法批量入库";
return crc.GetString("Res0026","系统忙碌,无法批量入库");
}
bool IsBatchDoorClosed => IOValue(IO_Type.DoorClose_LoadMaterial).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.BatchDoor_Close).Equals(IO_VALUE.HIGH);
//StringStateE LastStringState { get => ConfigHelper.Config.Get("Status_LastStringState", StringStateE.None); set => ConfigHelper.Config.Set("Status_LastStringState", value); }
......@@ -173,7 +173,7 @@ namespace DeviceLibrary
else {
TestHeightTask = TestReelHeight();
}
StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg("料串正在上升",MsgLevel.warning));
StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0027","料串正在上升"),MsgLevel.warning));
break;
case MoveStep.StringLoad_04:
if (oldtestheight)
......@@ -218,7 +218,7 @@ namespace DeviceLibrary
}
}
else
Msg.add("扫码等待夹爪空闲", MsgLevel.info);
Msg.add(crc.GetString("Res0028","扫码等待夹爪空闲"), MsgLevel.info);
}
else if (StringState == StringStateE.OutStore)
{
......@@ -365,8 +365,8 @@ namespace DeviceLibrary
var heightcheck = (LastOutDownPosition - Batch_Axis.GetAclPosition()) / Config.Batch_PoToMM;
StringMoveInfo.log($"LastOutDownPosition={LastOutDownPosition},CurrentPosition={Batch_Axis.GetAclPosition()},heightcheck={heightcheck}");
if (heightcheck <= 5) {
Msg.add("出库时料盘未成功放入料串,请检查", MsgLevel.alarm);
RobotManage.UserPause("出库时料盘未成功放入料串,请检查");
Msg.add(crc.GetString("Res0029","出库时料盘未成功放入料串,请检查"), MsgLevel.alarm);
RobotManage.UserPause(crc.GetString("Res0029","出库时料盘未成功放入料串,请检查"));
}
break;
case MoveStep.StringReelPut_04:
......@@ -391,7 +391,7 @@ namespace DeviceLibrary
StringMoveInfo.NextMoveStep(MoveStep.StringOut_Released);
StringMoveInfo.log($"料串下降到P1点");
Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed);
StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg("料串正在下降", MsgLevel.warning));
StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0030","料串正在下降"), MsgLevel.warning));
break;
case MoveStep.StringOut_02:
StringMoveInfo.NextMoveStep(MoveStep.StringOut_Released);
......@@ -578,9 +578,9 @@ namespace DeviceLibrary
}
if (LastHeight <= 8) { LastHeight = 8; }
//string code = CodeManager.ProcessCode(LastCodeList);
string msg = Name + " 计算盘高:上升前 [" + StartMovePosition + "]实时[ " + EndMovePosition + "]差值[" + (EndMovePosition - StartMovePosition) + "]系数[" + AxisChangeValue + "] 计算后" + buchongStr + "[" + height + "]" + ",归类为【" + LastHeight + "mm】条码【" + LastCode + "】";
string msg = Name + crc.GetString("Res0031"," 计算盘高:上升前 [") + StartMovePosition + crc.GetString("Res0032","]实时[ ") + EndMovePosition + crc.GetString("Res0033","]差值[") + (EndMovePosition - StartMovePosition) + crc.GetString("Res0034","]系数[") + AxisChangeValue + crc.GetString("Res0035","] 计算后") + buchongStr + "[" + height + "]" + ",归类为【" + LastHeight + "mm】条码【" + LastCode + "】";
LogUtil.info(msg);
return LastHeight;
}
}
}
}
\ No newline at end of file
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
......@@ -53,7 +53,7 @@ namespace DeviceLibrary
currentAxis = axisList[0];
PortName = axisList[0].Config.DeviceName;
SlvAddr = axisList[0].Config.GetAxisValue();
txtAxisDeviceName.Text = PortName;
//txtAxisDeviceName.Text = PortName;
txtAxisValue.Text = SlvAddr.ToString();
}
btnAddMove.BackColor = Color.White;
......@@ -78,7 +78,7 @@ namespace DeviceLibrary
{
if (axis == null)
{
MessageBox.Show("请先选择运动轴", "警告 ", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show(crc.GetString("Res0036","请先选择运动轴"), crc.GetString("Res0037","警告 "), MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
......@@ -224,7 +224,7 @@ namespace DeviceLibrary
axis = axisList[cmbAxis.SelectedIndex].Config;
PortName = axis.DeviceName;
SlvAddr = axis.GetAxisValue();
txtAxisDeviceName.Text = PortName;
//txtAxisDeviceName.Text = PortName;
txtAxisValue.Text = SlvAddr.ToString();
Color color = Color.Black;
......@@ -291,7 +291,7 @@ namespace DeviceLibrary
int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
MessageBox.Show(crc.GetString("Res0038","提示"), crc.GetString("Res0039","请先输入正确的速度"));
return;
}
btnAddMove.BackColor = Color.Green;
......@@ -320,7 +320,7 @@ namespace DeviceLibrary
int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
MessageBox.Show(crc.GetString("Res0038","提示"), crc.GetString("Res0039","请先输入正确的速度"));
return;
}
btnDelMove.BackColor = Color.Green;
......@@ -393,9 +393,9 @@ namespace DeviceLibrary
{
return;
}
ShowlbSts(lblPEL, sts.PEL); //正限位信号
//ShowlbSts(lblPEL, sts.PEL); //正限位信号
ShowlbSts(lblORG, sts.ORG); //原点信号
ShowlbSts(lblNEL, sts.NEL); //负限位信号
//ShowlbSts(lblNEL, sts.NEL); //负限位信号
//label59.Text = ConvertDecimalToBinary(nTimerAxSts[0]); //轴状态是按bit进行解读,因此这里将AxSts转换为二进制bit进行显示
lblAxPrfPos.Text = HCBoardManager.GetAxisPrfPos(axisNo).ToString();
......@@ -424,7 +424,7 @@ namespace DeviceLibrary
lbl.BackColor = Color.Red ;
lblAlarmcode.Visible = true;
lblAlarmcode.ForeColor = Color.Red;
lblAlarmcode.Text = "错误码:" + HCBoardManager.GetAxErrCode(SlvAddr);
lblAlarmcode.Text = crc.GetString("Res0040","错误码:") + HCBoardManager.GetAxErrCode(SlvAddr);
}
else
{
......@@ -445,4 +445,4 @@ namespace DeviceLibrary
}
}
}
}
}
\ No newline at end of file
using DeviceLibrary;
using DeviceLibrary;
using HuichuanLibrary;
using OnlineStore;
using OnlineStore.Common;
......@@ -75,11 +75,11 @@ public partial class AxisTipControl : Form
AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr);
if (sts.ServoOn < 0)
{
showToolTip("伺服尚未使能",c);
showToolTip(crc.GetString("Res0041","伺服尚未使能"),c);
return;
}
if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0) {
showToolTip("伺服警报状态中",c);
showToolTip(crc.GetString("Res0042","伺服警报状态中"),c);
return;
}
readPosition();
......@@ -137,7 +137,7 @@ public partial class AxisTipControl : Form
void showToolTip(string txt,Control control) {
var m_ToolTip = new ToolTip();
m_ToolTip.ToolTipIcon = ToolTipIcon.Warning;
m_ToolTip.ToolTipTitle = "无法操作";
m_ToolTip.ToolTipTitle = crc.GetString("Res0043","无法操作");
m_ToolTip.AutoPopDelay = 0;
m_ToolTip.AutomaticDelay = 0;
m_ToolTip.InitialDelay = 0;
......@@ -167,7 +167,7 @@ public partial class AxisTipControl : Form
int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
MessageBox.Show(crc.GetString("Res0038","提示"), crc.GetString("Res0039","请先输入正确的速度"));
return;
}
btnAddMove.BackColor = Color.Green;
......@@ -200,7 +200,7 @@ public partial class AxisTipControl : Form
int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
MessageBox.Show(crc.GetString("Res0038","提示"), crc.GetString("Res0039","请先输入正确的速度"));
return;
}
btnDelMove.BackColor = Color.Green;
......@@ -222,12 +222,12 @@ public partial class AxisTipControl : Form
AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr);
if (sts.ServoOn < 0)
{
showToolTip("伺服尚未使能", (Control)sender);
showToolTip(crc.GetString("Res0041","伺服尚未使能"), (Control)sender);
return false;
}
if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0)
{
showToolTip("伺服警报状态中", (Control)sender);
showToolTip(crc.GetString("Res0042","伺服警报状态中"), (Control)sender);
return false;
}
return true;
......@@ -257,4 +257,3 @@ public partial class AxisTipControl : Form
SetRelList((int)comjSpeed.SelectedItem);
}
}
using Newtonsoft.Json;
using OnlineStore;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
......@@ -37,7 +38,7 @@ namespace DeviceLibrary
if (string.IsNullOrWhiteSpace(textBox_startcode.Text))
{
MessageBox.Show("条码首字母不能为空");
MessageBox.Show(crc.GetString("Res0044","条码首字母不能为空"));
return;
}
FixtureConfig fixtureConfig = new FixtureConfig();
......@@ -94,7 +95,7 @@ namespace DeviceLibrary
public override string ToString()
{
return $"[{StartCode}]={Width}x{Height}"+ (UseActualHeight?$", "+"物理厚度"+$":{ActualHeight}":"") + (AbandonCode? ", "+"自动弃用" : "");
return $"[{StartCode}]={Width}x{Height}"+ (UseActualHeight?$", "+crc.GetString("Res0045","物理厚度")+$":{ActualHeight}":"") + (AbandonCode? ", "+crc.GetString("Res0046","自动弃用") : "");
}
public static bool GetCodeSize(string code, out int FixtureHeight, out int FixtureWidth, out bool isAbandonCode)
{
......@@ -157,4 +158,4 @@ namespace DeviceLibrary
}
}
}
}
\ No newline at end of file
using CodeLibrary;
using CodeLibrary;
using ConfigHelper;
using DeviceLibrary;
using OnlineStore;
......@@ -57,7 +57,14 @@ namespace TheMachine
{
e.Cancel = true;
this.WindowState = FormWindowState.Minimized;
return;
}
LogUtil.info("系统强制退出应用 step1");
btn_stop_Click(sender, EventArgs.Empty);
Thread.Sleep(2000);
LogUtil.info("系统强制退出应用 step2");
Application.Exit();
LogUtil.info("系统强制退出应用 step3");
}
LogControl lc = new LogControl();
......@@ -90,10 +97,10 @@ namespace TheMachine
emptycol.Text = "";
emptycol.Width = 0;
ColumnHeader msgcol = new ColumnHeader();
msgcol.Text = "信息";
msgcol.Text = crc.GetString("Res0047","信息");
msgcol.Width = 530;
ColumnHeader timecol = new ColumnHeader();
timecol.Text = "时间";
timecol.Text = crc.GetString("Res0048","时间");
timecol.Width = 150;
listView1.Columns.Add(emptycol);
listView1.Columns.Add(timecol);
......@@ -107,14 +114,14 @@ namespace TheMachine
c1.Text = "";
c1.Width = 0;
ColumnHeader c2 = new ColumnHeader();
c2.Text = "模块";
c2.Width = 120;
c2.Text = crc.GetString("Res0049","模块");
c2.Width = 200;
ColumnHeader c3 = new ColumnHeader();
c3.Text = "步骤";
c3.Width = 120;
c3.Text = crc.GetString("Res0050","步骤");
c3.Width = 200;
ColumnHeader c4 = new ColumnHeader();
c4.Text = "信息";
c4.Width = 370;
c4.Text = crc.GetString("Res0047","信息");
c4.Width = 500;
stateView.Columns.Add(c1);
stateView.Columns.Add(c2);
......@@ -124,7 +131,6 @@ namespace TheMachine
#endregion
LogUtil.info("开始初始化");
cb_EnableBuzzer.Checked = Setting_Init.Device_EnableBuzzer;
AlarmBuzzer.BuzzerStateChange += AlarmBuzzer_BuzzerStateChange;
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
if (!Setting_Init.Device_DisableLogWindow)
......@@ -210,7 +216,7 @@ namespace TheMachine
}
var stateinfo = moveInfo.GetStateStr();
if (!RobotManage.isRunning)
stateinfo = "未启动";
stateinfo = crc.GetString("Res0051","未启动");
ListViewItem lvi = new ListViewItem(new string[] { "", moveInfo.Name, moveInfo.MoveStep.ToString(), stateinfo });
stateView.Items.Add(lvi);
}
......@@ -491,18 +497,12 @@ namespace TheMachine
{
RobotManage.IgnoreGratingSignal((sender as CheckBox).Checked);
}
private void 关于ToolStripMenuItem_Click(object sender, EventArgs e)
private void 关于ToolStripMenuItem_Click(object sender, EventArgs e)
{
AboutBox1 aboutBox1 = new AboutBox1();
aboutBox1.ShowDialog();
}
private void cb_EnableBuzzer_CheckedChanged(object sender, EventArgs e)
{
Setting_Init.Device_EnableBuzzer= cb_EnableBuzzer.Checked;
AlarmBuzzer.Enable = cb_EnableBuzzer.Checked;
}
private void btn_PauseBuzzer_Click(object sender, EventArgs e)
{
AlarmBuzzer.MuteOnce();
......@@ -613,12 +613,12 @@ namespace TheMachine
AlarmBuzzer.Enable = !AlarmBuzzer.Enable;
if (AlarmBuzzer.Enable)
{
禁用蜂鸣器ToolStripMenuItem.Text = "禁用蜂鸣器";
禁用蜂鸣器ToolStripMenuItem.Text = crc.GetString("Res0052","禁用蜂鸣器");
}
else
禁用蜂鸣器ToolStripMenuItem.Text = "起用蜂鸣器";
禁用蜂鸣器ToolStripMenuItem.Text = crc.GetString("Res0053","起用蜂鸣器");
Setting_Init.Device_EnableBuzzer = AlarmBuzzer.Enable;
}
}
}
}
\ No newline at end of file
using ConfigHelper;
using log4net.Config;
using Microsoft.Win32.TaskScheduler;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
......@@ -47,9 +48,7 @@ namespace TheMachine
}
}
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true).SetValue(Application.ProductName, Application.ExecutablePath);
AddOrUpdateStartupTask();
Config.LoadMyConfig(new Setting_Init().GetType());
Application.ThreadException += Application_ThreadException;
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
......@@ -105,6 +104,43 @@ namespace TheMachine
public const int SW_RESTORE = 9;
#endregion
public static void AddOrUpdateStartupTask()
{
// 获取当前程序的路径和名称
string appPath = Process.GetCurrentProcess().MainModule.FileName;
string TaskName = "AutoStartup_" + Process.GetCurrentProcess().MainModule.ModuleName;
// 创建或更新计划任务
using (TaskService taskService = new TaskService())
{
// 获取任务定义,如果不存在则创建新的任务定义
TaskDefinition taskDefinition;
if (taskService.GetTask(TaskName) != null)
{
taskDefinition = taskService.GetTask(TaskName).Definition;
}
else
{
taskDefinition = taskService.NewTask();
taskDefinition.RegistrationInfo.Description = TaskName;
}
if (taskDefinition.Triggers.Count == 0 || taskDefinition.Triggers[0].TriggerType != TaskTriggerType.Logon)
{
// 设置触发器为用户登录后启动
LogonTrigger logonTrigger = (LogonTrigger)taskDefinition.Triggers.Add(new LogonTrigger());
logonTrigger.Delay = TimeSpan.FromSeconds(5);
}
// 设置操作为启动应用程序
taskDefinition.Actions.Clear();
taskDefinition.Actions.Add(new ExecAction(appPath, null, System.IO.Path.GetDirectoryName(appPath)));
// 设置任务的运行权限为管理员权限
taskDefinition.Principal.RunLevel = TaskRunLevel.Highest;
// 保存任务
taskService.RootFolder.RegisterTaskDefinition(TaskName, taskDefinition, TaskCreation.CreateOrUpdate, null, null, TaskLogonType.InteractiveToken, null);
}
}
}
}
......@@ -37,18 +37,12 @@ namespace TheMachine
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.tp = new System.Windows.Forms.TableLayoutPanel();
this.cb_usefixpos = new System.Windows.Forms.CheckBox();
this.uC_LedConfig1 = new TheMachine.UC.UC_LedConfig();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage_set = new System.Windows.Forms.TabPage();
this.uC_SetUserPassword1 = new TheMachine.UC_SetUserPassword();
this.tabPage_ledtower = new System.Windows.Forms.TabPage();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.fixtureSizeConfigControl1 = new DeviceLibrary.FixtureSizeConfigControl();
this.tp.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage_set.SuspendLayout();
this.tabPage_ledtower.SuspendLayout();
this.tabPage1.SuspendLayout();
this.SuspendLayout();
//
// cb_tempsensorport
......@@ -142,21 +136,9 @@ namespace TheMachine
this.cb_usefixpos.Text = "启用校准库位";
this.cb_usefixpos.UseVisualStyleBackColor = true;
//
// uC_LedConfig1
//
this.uC_LedConfig1.Config = null;
this.uC_LedConfig1.Dock = System.Windows.Forms.DockStyle.Fill;
this.uC_LedConfig1.Location = new System.Drawing.Point(3, 3);
this.uC_LedConfig1.Name = "uC_LedConfig1";
this.uC_LedConfig1.Size = new System.Drawing.Size(1010, 708);
this.uC_LedConfig1.TabIndex = 7;
this.uC_LedConfig1.Tag = "not";
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage_set);
this.tabControl1.Controls.Add(this.tabPage_ledtower);
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
......@@ -185,36 +167,6 @@ namespace TheMachine
this.uC_SetUserPassword1.Size = new System.Drawing.Size(533, 596);
this.uC_SetUserPassword1.TabIndex = 7;
//
// tabPage_ledtower
//
this.tabPage_ledtower.Controls.Add(this.uC_LedConfig1);
this.tabPage_ledtower.Location = new System.Drawing.Point(4, 22);
this.tabPage_ledtower.Name = "tabPage_ledtower";
this.tabPage_ledtower.Padding = new System.Windows.Forms.Padding(3);
this.tabPage_ledtower.Size = new System.Drawing.Size(1016, 714);
this.tabPage_ledtower.TabIndex = 1;
this.tabPage_ledtower.Text = "灯塔设置";
this.tabPage_ledtower.UseVisualStyleBackColor = true;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.fixtureSizeConfigControl1);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1016, 714);
this.tabPage1.TabIndex = 2;
this.tabPage1.Text = "治具设置";
this.tabPage1.UseVisualStyleBackColor = true;
//
// fixtureSizeConfigControl1
//
this.fixtureSizeConfigControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.fixtureSizeConfigControl1.Location = new System.Drawing.Point(3, 3);
this.fixtureSizeConfigControl1.Name = "fixtureSizeConfigControl1";
this.fixtureSizeConfigControl1.Size = new System.Drawing.Size(1010, 708);
this.fixtureSizeConfigControl1.TabIndex = 0;
//
// SettingControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -227,8 +179,6 @@ namespace TheMachine
this.tabControl1.ResumeLayout(false);
this.tabPage_set.ResumeLayout(false);
this.tabPage_set.PerformLayout();
this.tabPage_ledtower.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.ResumeLayout(false);
}
......@@ -241,12 +191,8 @@ namespace TheMachine
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.TableLayoutPanel tp;
private System.Windows.Forms.CheckBox cb_usefixpos;
private UC.UC_LedConfig uC_LedConfig1;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage_set;
private System.Windows.Forms.TabPage tabPage_ledtower;
private System.Windows.Forms.TabPage tabPage1;
private DeviceLibrary.FixtureSizeConfigControl fixtureSizeConfigControl1;
private UC_SetUserPassword uC_SetUserPassword1;
}
}
......@@ -40,7 +40,7 @@ namespace TheMachine
if (!RobotManage.haveFixpos)
cb_usefixpos.Visible = false;
uC_LedConfig1.Config = RobotManage.Config;
//uC_LedConfig1.Config = RobotManage.Config;
}
......
......@@ -56,11 +56,15 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Win32.TaskScheduler, Version=2.10.1.0, Culture=neutral, PublicKeyToken=e25603a88b3aa7da, processorArchitecture=MSIL">
<HintPath>..\packages\TaskScheduler.2.10.1\lib\net452\Microsoft.Win32.TaskScheduler.dll</HintPath>
</Reference>
<Reference Include="Neotel.Rmaxis">
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\Neotel.Rmaxis.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
......@@ -218,6 +222,7 @@
<DependentUpon>UC_SetUserPassword.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
......
using OnlineStore.Common;
using OnlineStore;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
......@@ -44,7 +45,7 @@ namespace TheMachine
this.Close();
}
else
MessageBox.Show("密码不正确请重新输入!");
MessageBox.Show(crc.GetString("Res0057","密码不正确请重新输入!"));
}
}
}
}
\ No newline at end of file
......@@ -104,7 +104,7 @@ namespace TheMachine
//if (ioValue.SubType.Equals(0))
{
this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 26));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + crc.GetString(ioValue.ProName, ioValue.Explain), ioValue.ProName);
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + crc.GetString(ioValue.ProType + "_" + ioValue.ProName, ioValue.Explain), ioValue.ProName);
this.tableLayoutPanel1.Controls.Add(control, 0, roleindex);
roleindex++;
......@@ -120,7 +120,7 @@ namespace TheMachine
//if (ioValue.SubType.Equals(0))
{
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + crc.GetString(ioValue.ProName, ioValue.Explain), ioValue.ProName);
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + crc.GetString(ioValue.ProType + "_" + ioValue.ProName, ioValue.Explain), ioValue.ProName);
control.Click += Control_Click;
this.tableLayoutPanel2.Controls.Add(control, 0, roleindex);
roleindex++;
......
using DeviceLibrary;
using OnlineStore;
using DeviceLibrary;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
......@@ -71,28 +72,28 @@ namespace TheMachine.UC
Label label_s = new Label()
{
Size = new Size(200, 34),
Text = "状态,优先级从大到小",
Text = crc.GetString("Res0058","状态,优先级从大到小"),
TextAlign = ContentAlignment.MiddleLeft
};
tableLayoutPanel1.Controls.Add(label_s, 0, 0);
Label label_g = new Label()
{
Size = new Size(120, 34),
Text = "绿灯",
Text = crc.GetString("Res0059","绿灯"),
TextAlign = ContentAlignment.MiddleCenter
};
tableLayoutPanel1.Controls.Add(label_g, 1, 0);
Label label_y = new Label()
{
Size = new Size(120, 34),
Text = "黄灯",
Text = crc.GetString("Res0060","黄灯"),
TextAlign = ContentAlignment.MiddleCenter
};
tableLayoutPanel1.Controls.Add(label_y, 2, 0);
Label label_r = new Label()
{
Size = new Size(120, 34),
Text = "红灯",
Text = crc.GetString("Res0061","红灯"),
TextAlign = ContentAlignment.MiddleCenter
};
tableLayoutPanel1.Controls.Add(label_r, 3, 0);
......@@ -114,10 +115,10 @@ namespace TheMachine.UC
foreach (var led in Led.LedColors.Keys)
{
List<lightitem> lightitems = new List<lightitem>();
lightitems.Add(new lightitem("无动作", LedState.none));
lightitems.Add(new lightitem("关", LedState.off));
lightitems.Add(new lightitem("开", LedState.on));
lightitems.Add(new lightitem("闪烁", LedState.blink));
lightitems.Add(new lightitem(crc.GetString("Res0062","无动作"), LedState.none));
lightitems.Add(new lightitem(crc.GetString("Res0063","关"), LedState.off));
lightitems.Add(new lightitem(crc.GetString("Res0064","开"), LedState.on));
lightitems.Add(new lightitem(crc.GetString("Res0065","闪烁"), LedState.blink));
var selit = lightitems.FindIndex(x => x.value == RobotManage.mainMachine.MachineLedState[key][led]);
ComboBox comboBox = new ComboBox();
......@@ -171,9 +172,9 @@ namespace TheMachine.UC
}
if (RobotManage.mainMachine.SaveLedCfg())
MessageBox.Show("保存成功!");
MessageBox.Show(crc.GetString("Res0066","保存成功!"));
else
MessageBox.Show("保存失败!");
MessageBox.Show(crc.GetString("Res0067","保存失败!"));
}
}
}
}
\ No newline at end of file
using OnlineStore.Common;
using OnlineStore;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
......@@ -22,20 +23,20 @@ namespace TheMachine
{
if (textBox_oldpwd.Text != Setting_Init.User_AdminPassword)
{
MessageBox.Show("旧密码不正确!");
MessageBox.Show(crc.GetString("Res0068","旧密码不正确!"));
textBox_oldpwd.Text = "";
return;
}
if (textBox_newpwd.Text != textBox_newpwd2.Text) {
MessageBox.Show("两次输入的新密码不一致,请确认!");
MessageBox.Show(crc.GetString("Res0069","两次输入的新密码不一致,请确认!"));
//textBox_oldpwd.Text = "";
return;
}
if (string.IsNullOrWhiteSpace(textBox_newpwd.Text))
{
MessageBox.Show("新密码不能为空!");
MessageBox.Show(crc.GetString("Res0070","新密码不能为空!"));
return;
}
......@@ -43,7 +44,7 @@ namespace TheMachine
textBox_oldpwd.Text = "";
textBox_newpwd.Text = "";
textBox_newpwd2.Text = "";
MessageBox.Show("密码修改成功!");
MessageBox.Show(crc.GetString("Res0071","密码修改成功!"));
}
}
}
}
\ No newline at end of file
using DeviceLibrary;
using DeviceLibrary;
using log4net;
using OnlineStore;
using OnlineStore.Common;
......@@ -443,7 +443,7 @@ namespace TheMachine
if (!RobotManage.mainMachine.IsInStoreReady)
{
MessageBox.Show("入库料盘没有准备好,请先点击[上料准备],无法启动");
MessageBox.Show(crc.GetString("Res0217","入库料盘没有准备好,请先点击[上料准备],无法启动"));
return;
}
......@@ -482,4 +482,4 @@ namespace TheMachine
RobotManage.mainMachine.StartBatchIn();
}
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="TaskScheduler" version="2.10.1" targetFramework="net461" />
</packages>
\ No newline at end of file
using DeviceLibrary;
using OnlineStore;
using DeviceLibrary;
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary;
......@@ -19,7 +20,7 @@ namespace OnlineStore.ACSingleStore
{
public partial class FrmPositionTool : Form
{
private string LogName = "升降轴位置调试:";
private string LogName = crc.GetString("Res0054","升降轴位置调试:");
AxisBean UpDown_Axis;
string iotype="";
......@@ -148,7 +149,7 @@ namespace OnlineStore.ACSingleStore
if (speed <= (0))
{
MessageBox.Show("请输入正确的速度");
MessageBox.Show(crc.GetString("Res0055","请输入正确的速度"));
txtSpeed.Focus();
return;
}
......@@ -262,7 +263,7 @@ namespace OnlineStore.ACSingleStore
}
LogUtil.info(LogName + "伺服已停止运动,停止定时器,记录数据");
List<string> strList = new List<string>();
strList.Add("编号,标准位置,升降轴库位入料高点P3,升降轴库位入料低点P4");
strList.Add(crc.GetString("Res0056","编号,标准位置,升降轴库位入料高点P3,升降轴库位入料低点P4"));
int index = 1;
foreach (int p in PositionList)
{
......@@ -332,4 +333,4 @@ namespace OnlineStore.ACSingleStore
}
}
}
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!