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
......@@ -38,9 +38,7 @@
this.lblAxEncAcc = new System.Windows.Forms.Label();
this.lblINP = new System.Windows.Forms.Label();
this.lblBUSY = new System.Windows.Forms.Label();
this.lblNEL = new System.Windows.Forms.Label();
this.lblORG = new System.Windows.Forms.Label();
this.lblPEL = new System.Windows.Forms.Label();
this.lblSvOn = new System.Windows.Forms.Label();
this.lblEMG = new System.Windows.Forms.Label();
this.lblWARN = new System.Windows.Forms.Label();
......@@ -94,9 +92,7 @@
this.txtAPosition = new System.Windows.Forms.TextBox();
this.label46 = new System.Windows.Forms.Label();
this.label48 = new System.Windows.Forms.Label();
this.label45 = new System.Windows.Forms.Label();
this.txtAxisValue = new System.Windows.Forms.TextBox();
this.txtAxisDeviceName = new System.Windows.Forms.TextBox();
this.lblServerOn = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupAxis.SuspendLayout();
......@@ -132,9 +128,7 @@
this.groupBox2.Controls.Add(this.lblAxEncAcc);
this.groupBox2.Controls.Add(this.lblINP);
this.groupBox2.Controls.Add(this.lblBUSY);
this.groupBox2.Controls.Add(this.lblNEL);
this.groupBox2.Controls.Add(this.lblORG);
this.groupBox2.Controls.Add(this.lblPEL);
this.groupBox2.Controls.Add(this.lblSvOn);
this.groupBox2.Controls.Add(this.lblEMG);
this.groupBox2.Controls.Add(this.lblWARN);
......@@ -217,9 +211,9 @@
// lblINP
//
this.lblINP.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblINP.Location = new System.Drawing.Point(414, 24);
this.lblINP.Location = new System.Drawing.Point(388, 24);
this.lblINP.Name = "lblINP";
this.lblINP.Size = new System.Drawing.Size(56, 30);
this.lblINP.Size = new System.Drawing.Size(70, 30);
this.lblINP.TabIndex = 10;
this.lblINP.Text = "到位";
this.lblINP.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -227,49 +221,29 @@
// lblBUSY
//
this.lblBUSY.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblBUSY.Location = new System.Drawing.Point(356, 24);
this.lblBUSY.Location = new System.Drawing.Point(312, 24);
this.lblBUSY.Name = "lblBUSY";
this.lblBUSY.Size = new System.Drawing.Size(56, 30);
this.lblBUSY.Size = new System.Drawing.Size(70, 30);
this.lblBUSY.TabIndex = 9;
this.lblBUSY.Text = "忙碌";
this.lblBUSY.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblNEL
//
this.lblNEL.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblNEL.Location = new System.Drawing.Point(298, 24);
this.lblNEL.Name = "lblNEL";
this.lblNEL.Size = new System.Drawing.Size(56, 30);
this.lblNEL.TabIndex = 8;
this.lblNEL.Text = "负极限";
this.lblNEL.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblORG
//
this.lblORG.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblORG.Location = new System.Drawing.Point(240, 24);
this.lblORG.Location = new System.Drawing.Point(236, 24);
this.lblORG.Name = "lblORG";
this.lblORG.Size = new System.Drawing.Size(56, 30);
this.lblORG.Size = new System.Drawing.Size(70, 30);
this.lblORG.TabIndex = 7;
this.lblORG.Text = "原点";
this.lblORG.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblPEL
//
this.lblPEL.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblPEL.Location = new System.Drawing.Point(182, 24);
this.lblPEL.Name = "lblPEL";
this.lblPEL.Size = new System.Drawing.Size(56, 30);
this.lblPEL.TabIndex = 6;
this.lblPEL.Text = "正极限";
this.lblPEL.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblSvOn
//
this.lblSvOn.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblSvOn.Location = new System.Drawing.Point(8, 24);
this.lblSvOn.Name = "lblSvOn";
this.lblSvOn.Size = new System.Drawing.Size(56, 30);
this.lblSvOn.Size = new System.Drawing.Size(70, 30);
this.lblSvOn.TabIndex = 5;
this.lblSvOn.Text = "伺服";
this.lblSvOn.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -277,9 +251,9 @@
// lblEMG
//
this.lblEMG.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblEMG.Location = new System.Drawing.Point(124, 24);
this.lblEMG.Location = new System.Drawing.Point(160, 24);
this.lblEMG.Name = "lblEMG";
this.lblEMG.Size = new System.Drawing.Size(56, 30);
this.lblEMG.Size = new System.Drawing.Size(70, 30);
this.lblEMG.TabIndex = 4;
this.lblEMG.Text = "急停";
this.lblEMG.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -287,9 +261,9 @@
// lblWARN
//
this.lblWARN.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblWARN.Location = new System.Drawing.Point(472, 24);
this.lblWARN.Location = new System.Drawing.Point(464, 24);
this.lblWARN.Name = "lblWARN";
this.lblWARN.Size = new System.Drawing.Size(56, 30);
this.lblWARN.Size = new System.Drawing.Size(70, 30);
this.lblWARN.TabIndex = 3;
this.lblWARN.Text = "警告";
this.lblWARN.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -297,9 +271,9 @@
// lblALM
//
this.lblALM.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lblALM.Location = new System.Drawing.Point(66, 24);
this.lblALM.Location = new System.Drawing.Point(84, 24);
this.lblALM.Name = "lblALM";
this.lblALM.Size = new System.Drawing.Size(56, 30);
this.lblALM.Size = new System.Drawing.Size(70, 30);
this.lblALM.TabIndex = 2;
this.lblALM.Text = "报警";
this.lblALM.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
......@@ -591,9 +565,7 @@
this.panel1.Controls.Add(this.txtAPosition);
this.panel1.Controls.Add(this.label46);
this.panel1.Controls.Add(this.label48);
this.panel1.Controls.Add(this.label45);
this.panel1.Controls.Add(this.txtAxisValue);
this.panel1.Controls.Add(this.txtAxisDeviceName);
this.panel1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.panel1.Location = new System.Drawing.Point(7, 17);
this.panel1.Name = "panel1";
......@@ -874,7 +846,7 @@
//
this.label46.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label46.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label46.Location = new System.Drawing.Point(6, 93);
this.label46.Location = new System.Drawing.Point(4, 54);
this.label46.Name = "label46";
this.label46.Size = new System.Drawing.Size(71, 17);
this.label46.TabIndex = 239;
......@@ -895,21 +867,10 @@
this.label48.Text = "目标位置:";
this.label48.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label45
//
this.label45.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label45.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label45.Location = new System.Drawing.Point(8, 53);
this.label45.Name = "label45";
this.label45.Size = new System.Drawing.Size(69, 20);
this.label45.TabIndex = 240;
this.label45.Text = "端口号:";
this.label45.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// txtAxisValue
//
this.txtAxisValue.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAxisValue.Location = new System.Drawing.Point(83, 87);
this.txtAxisValue.Location = new System.Drawing.Point(81, 48);
this.txtAxisValue.MaxLength = 10;
this.txtAxisValue.Name = "txtAxisValue";
this.txtAxisValue.ReadOnly = true;
......@@ -918,18 +879,6 @@
this.txtAxisValue.Tag = "not";
this.txtAxisValue.Text = "0";
//
// txtAxisDeviceName
//
this.txtAxisDeviceName.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAxisDeviceName.Location = new System.Drawing.Point(83, 48);
this.txtAxisDeviceName.MaxLength = 10;
this.txtAxisDeviceName.Name = "txtAxisDeviceName";
this.txtAxisDeviceName.ReadOnly = true;
this.txtAxisDeviceName.Size = new System.Drawing.Size(50, 26);
this.txtAxisDeviceName.TabIndex = 241;
this.txtAxisDeviceName.Tag = "not";
this.txtAxisDeviceName.Text = "0";
//
// lblServerOn
//
this.lblServerOn.AutoSize = true;
......@@ -994,8 +943,6 @@
internal System.Windows.Forms.Label label48;
internal System.Windows.Forms.Button btnAxisStop;
private System.Windows.Forms.TextBox txtAxisValue;
private System.Windows.Forms.TextBox txtAxisDeviceName;
private System.Windows.Forms.Label label45;
private System.Windows.Forms.Label label46;
private System.Windows.Forms.Label label49;
private System.Windows.Forms.Label label24;
......@@ -1018,9 +965,7 @@
private System.Windows.Forms.Label lblAxEncAcc;
private System.Windows.Forms.Label lblINP;
private System.Windows.Forms.Label lblBUSY;
private System.Windows.Forms.Label lblNEL;
private System.Windows.Forms.Label lblORG;
private System.Windows.Forms.Label lblPEL;
private System.Windows.Forms.Label lblSvOn;
private System.Windows.Forms.Label lblEMG;
private System.Windows.Forms.Label lblWARN;
......
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
......@@ -31,12 +31,17 @@ namespace TheMachine
{
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.设备操作ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.btn_run = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.btn_stop = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.启用调试模式ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.禁用蜂鸣器ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.退出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.语言toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.简体中文ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.日本语ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.englishToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.关于ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tabc = new System.Windows.Forms.TabControl();
......@@ -46,16 +51,9 @@ namespace TheMachine
this.stateView = new System.Windows.Forms.ListView();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.cb_EnableBuzzer = new System.Windows.Forms.CheckBox();
this.btn_IgnoreX09 = new System.Windows.Forms.Button();
this.btn_PauseBuzzer = new System.Windows.Forms.Button();
this.listView1 = new System.Windows.Forms.ListView();
this.禁用蜂鸣器ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.btn_run = new System.Windows.Forms.ToolStripMenuItem();
this.btn_stop = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.menuStrip1.SuspendLayout();
this.tabc.SuspendLayout();
this.tabP1.SuspendLayout();
......@@ -96,11 +94,35 @@ namespace TheMachine
this.设备操作ToolStripMenuItem.Size = new System.Drawing.Size(86, 25);
this.设备操作ToolStripMenuItem.Text = "设备操作";
//
// btn_run
//
this.btn_run.Name = "btn_run";
this.btn_run.Size = new System.Drawing.Size(176, 26);
this.btn_run.Text = "启动";
this.btn_run.Click += new System.EventHandler(this.btn_run_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(173, 6);
//
// btn_stop
//
this.btn_stop.Name = "btn_stop";
this.btn_stop.Size = new System.Drawing.Size(176, 26);
this.btn_stop.Text = "停止";
this.btn_stop.Click += new System.EventHandler(this.btn_stop_Click);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(173, 6);
//
// 启用调试模式ToolStripMenuItem
//
this.启用调试模式ToolStripMenuItem.Enabled = false;
this.启用调试模式ToolStripMenuItem.Name = "启用调试模式ToolStripMenuItem";
this.启用调试模式ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.启用调试模式ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.启用调试模式ToolStripMenuItem.Tag = "not";
this.启用调试模式ToolStripMenuItem.Text = "启用配置模式";
this.启用调试模式ToolStripMenuItem.Click += new System.EventHandler(this.启用调试模式ToolStripMenuItem_Click);
......@@ -108,12 +130,24 @@ namespace TheMachine
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator4.Size = new System.Drawing.Size(173, 6);
//
// 禁用蜂鸣器ToolStripMenuItem
//
this.禁用蜂鸣器ToolStripMenuItem.Name = "禁用蜂鸣器ToolStripMenuItem";
this.禁用蜂鸣器ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.禁用蜂鸣器ToolStripMenuItem.Text = "禁用蜂鸣器";
this.禁用蜂鸣器ToolStripMenuItem.Click += new System.EventHandler(this.禁用蜂鸣器ToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(173, 6);
//
// 退出ToolStripMenuItem
//
this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem";
this.退出ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.退出ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.退出ToolStripMenuItem.Text = "退出";
this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click);
//
......@@ -121,7 +155,6 @@ namespace TheMachine
//
this.语言toolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.简体中文ToolStripMenuItem,
this.日本语ToolStripMenuItem,
this.englishToolStripMenuItem});
this.语言toolStripMenuItem.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
this.语言toolStripMenuItem.Name = "语言toolStripMenuItem";
......@@ -131,23 +164,15 @@ namespace TheMachine
// 简体中文ToolStripMenuItem
//
this.简体中文ToolStripMenuItem.Name = "简体中文ToolStripMenuItem";
this.简体中文ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.简体中文ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.简体中文ToolStripMenuItem.Tag = "not";
this.简体中文ToolStripMenuItem.Text = "简体中文";
this.简体中文ToolStripMenuItem.Click += new System.EventHandler(this.简体中文ToolStripMenuItem_Click);
//
// 日本语ToolStripMenuItem
//
this.日本语ToolStripMenuItem.Name = "日本语ToolStripMenuItem";
this.日本语ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.日本语ToolStripMenuItem.Tag = "not";
this.日本语ToolStripMenuItem.Text = "日本語";
this.日本语ToolStripMenuItem.Click += new System.EventHandler(this.日本语ToolStripMenuItem_Click);
//
// englishToolStripMenuItem
//
this.englishToolStripMenuItem.Name = "englishToolStripMenuItem";
this.englishToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.englishToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.englishToolStripMenuItem.Tag = "not";
this.englishToolStripMenuItem.Text = "English";
this.englishToolStripMenuItem.Click += new System.EventHandler(this.englishToolStripMenuItem_Click);
......@@ -188,7 +213,6 @@ namespace TheMachine
this.pnl.Controls.Add(this.groupBox1);
this.pnl.Controls.Add(this.pictureBox2);
this.pnl.Controls.Add(this.pictureBox1);
this.pnl.Controls.Add(this.cb_EnableBuzzer);
this.pnl.Controls.Add(this.btn_IgnoreX09);
this.pnl.Controls.Add(this.btn_PauseBuzzer);
this.pnl.Dock = System.Windows.Forms.DockStyle.Fill;
......@@ -202,7 +226,7 @@ namespace TheMachine
this.groupBox1.Controls.Add(this.stateView);
this.groupBox1.Location = new System.Drawing.Point(3, 4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(598, 244);
this.groupBox1.Size = new System.Drawing.Size(989, 244);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "运行状态";
......@@ -216,16 +240,16 @@ namespace TheMachine
this.stateView.Location = new System.Drawing.Point(3, 25);
this.stateView.MultiSelect = false;
this.stateView.Name = "stateView";
this.stateView.Size = new System.Drawing.Size(592, 216);
this.stateView.Size = new System.Drawing.Size(983, 216);
this.stateView.TabIndex = 0;
this.stateView.UseCompatibleStateImageBehavior = false;
//
// pictureBox2
//
this.pictureBox2.BackColor = System.Drawing.Color.Gainsboro;
this.pictureBox2.Location = new System.Drawing.Point(472, 254);
this.pictureBox2.Location = new System.Drawing.Point(472, 321);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(436, 271);
this.pictureBox2.Size = new System.Drawing.Size(436, 204);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox2.TabIndex = 270;
this.pictureBox2.TabStop = false;
......@@ -236,9 +260,9 @@ namespace TheMachine
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Gainsboro;
this.pictureBox1.Location = new System.Drawing.Point(3, 254);
this.pictureBox1.Location = new System.Drawing.Point(3, 321);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(451, 271);
this.pictureBox1.Size = new System.Drawing.Size(451, 204);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 271;
this.pictureBox1.TabStop = false;
......@@ -246,21 +270,10 @@ namespace TheMachine
this.pictureBox1.DoubleClick += new System.EventHandler(this.pictureBox1_DoubleClick);
this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
//
// cb_EnableBuzzer
//
this.cb_EnableBuzzer.AutoSize = true;
this.cb_EnableBuzzer.Location = new System.Drawing.Point(607, 16);
this.cb_EnableBuzzer.Name = "cb_EnableBuzzer";
this.cb_EnableBuzzer.Size = new System.Drawing.Size(109, 25);
this.cb_EnableBuzzer.TabIndex = 5;
this.cb_EnableBuzzer.Text = "使用蜂鸣器";
this.cb_EnableBuzzer.UseVisualStyleBackColor = true;
this.cb_EnableBuzzer.CheckedChanged += new System.EventHandler(this.cb_EnableBuzzer_CheckedChanged);
//
// btn_IgnoreX09
//
this.btn_IgnoreX09.BackColor = System.Drawing.Color.OrangeRed;
this.btn_IgnoreX09.Location = new System.Drawing.Point(607, 155);
this.btn_IgnoreX09.Location = new System.Drawing.Point(310, 254);
this.btn_IgnoreX09.Name = "btn_IgnoreX09";
this.btn_IgnoreX09.Size = new System.Drawing.Size(301, 40);
this.btn_IgnoreX09.TabIndex = 6;
......@@ -272,7 +285,7 @@ namespace TheMachine
// btn_PauseBuzzer
//
this.btn_PauseBuzzer.BackColor = System.Drawing.Color.OrangeRed;
this.btn_PauseBuzzer.Location = new System.Drawing.Point(607, 109);
this.btn_PauseBuzzer.Location = new System.Drawing.Point(3, 254);
this.btn_PauseBuzzer.Name = "btn_PauseBuzzer";
this.btn_PauseBuzzer.Size = new System.Drawing.Size(301, 40);
this.btn_PauseBuzzer.TabIndex = 6;
......@@ -296,42 +309,6 @@ namespace TheMachine
this.listView1.TabIndex = 2;
this.listView1.UseCompatibleStateImageBehavior = false;
//
// 禁用蜂鸣器ToolStripMenuItem
//
this.禁用蜂鸣器ToolStripMenuItem.Name = "禁用蜂鸣器ToolStripMenuItem";
this.禁用蜂鸣器ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.禁用蜂鸣器ToolStripMenuItem.Text = "禁用蜂鸣器";
this.禁用蜂鸣器ToolStripMenuItem.Click += new System.EventHandler(this.禁用蜂鸣器ToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6);
//
// btn_run
//
this.btn_run.Name = "btn_run";
this.btn_run.Size = new System.Drawing.Size(180, 26);
this.btn_run.Text = "启动";
this.btn_run.Click += new System.EventHandler(this.btn_run_Click);
//
// btn_stop
//
this.btn_stop.Name = "btn_stop";
this.btn_stop.Size = new System.Drawing.Size(180, 26);
this.btn_stop.Text = "停止";
this.btn_stop.Click += new System.EventHandler(this.btn_stop_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(177, 6);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6);
//
// Form1
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -352,7 +329,6 @@ namespace TheMachine
this.tabc.ResumeLayout(false);
this.tabP1.ResumeLayout(false);
this.pnl.ResumeLayout(false);
this.pnl.PerformLayout();
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
......@@ -374,7 +350,6 @@ namespace TheMachine
private System.Windows.Forms.ListView stateView;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ToolStripMenuItem 关于ToolStripMenuItem;
private System.Windows.Forms.CheckBox cb_EnableBuzzer;
private System.Windows.Forms.Button btn_PauseBuzzer;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
......@@ -382,7 +357,6 @@ namespace TheMachine
private System.Windows.Forms.Panel pnl;
private System.Windows.Forms.ToolStripMenuItem 语言toolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 简体中文ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 日本语ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem englishToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 禁用蜂鸣器ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
......
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!