Commit 1243deb9 刘韬

1

1 个父辈 1c4b053f
...@@ -49,6 +49,17 @@ namespace OnlineStore.Common ...@@ -49,6 +49,17 @@ namespace OnlineStore.Common
public static MyConfig<bool> Device_SingleInSingleOut = false; public static MyConfig<bool> Device_SingleInSingleOut = false;
[MyConfigComment("允许单料口单盘入库")] [MyConfigComment("允许单料口单盘入库")]
public static MyConfig<bool> Device_Allow_SingleIn = false; public static MyConfig<bool> Device_Allow_SingleIn = false;
[MyConfigComment("扫码时关闭设备照明")]
public static MyConfig<bool> Device_CloseDeviceLightWhenScan = false;
[MyConfigComment("屏蔽料叉检测barcode字符清单")]
public static MyConfig<string[]> Device_Ignore_FixtureCheck = new string[] { };
[MyConfigComment("屏蔽出入库时料叉检测")]
public static MyConfig<bool> Device_Disable_INOUT_FixtureCheck = false;
[MyConfigComment("管理员密码")]
public static MyConfig<string> User_AdminPassword = "123456";
[MyConfigComment("启用管理员密码")]
public static MyConfig<bool> User_Enable = false;
[MyConfigComment("是否启用socket扫码")] [MyConfigComment("是否启用socket扫码")]
public static MyConfig<bool> SocketScanner_enable = false; public static MyConfig<bool> SocketScanner_enable = false;
......
...@@ -545,8 +545,10 @@ namespace DeviceLibrary ...@@ -545,8 +545,10 @@ namespace DeviceLibrary
string plateWStr = data[ParamDefine.plateW]; string plateWStr = data[ParamDefine.plateW];
string plateHStr = data[ParamDefine.plateH]; string plateHStr = data[ParamDefine.plateH];
string singleOut = data[ParamDefine.singleOut]; string singleOut = data[ParamDefine.singleOut];
string code = "";
LogUtil.info("收到服务器出库消息:poaIs=" + posIdStr + ",platew=" + plateWStr + ",plateh=" + plateHStr + ",singleOut=" + singleOut); if (!data.TryGetValue("code", out code))
data.TryGetValue(ParamDefine.barcode, out code);
LogUtil.info("收到服务器出库消息:poaIs=" + posIdStr + ",platew=" + plateWStr + ",plateh=" + plateHStr + ",singleOut=" + singleOut + ",code=" + code);
char splitChar = '|'; char splitChar = '|';
string[] posIdArray = posIdStr.Split(splitChar); string[] posIdArray = posIdStr.Split(splitChar);
string[] plateWArray = plateWStr.Split(splitChar); string[] plateWArray = plateWStr.Split(splitChar);
...@@ -572,9 +574,9 @@ namespace DeviceLibrary ...@@ -572,9 +574,9 @@ namespace DeviceLibrary
else else
{ {
if (isSingleOut) if (isSingleOut)
RobotManage.mainMachine.AddSingleStoreTask(posId,plateW,plateH); RobotManage.mainMachine.AddSingleStoreTask(code, posId, plateW, plateH);
else else
RobotManage.mainMachine.AddOutStoreTask(posId, plateW, plateH); RobotManage.mainMachine.AddOutStoreTask(code, posId, plateW, plateH);
} }
} }
TimeSpan span = DateTime.Now - time; TimeSpan span = DateTime.Now - time;
......
...@@ -57,13 +57,14 @@ namespace DeviceLibrary ...@@ -57,13 +57,14 @@ namespace DeviceLibrary
string WareCode=""; string WareCode="";
int plateH = 0; int plateH = 0;
bool PreMove = false; bool PreMove = false;
bool ignoreFixtureCheck = false;
public bool Start(BoxStorePosition from, BoxStorePosition to, StoreMoveType _storeMoveType, bool premove=false) public bool Start(BoxStorePosition from, BoxStorePosition to, StoreMoveType _storeMoveType, bool premove=false)
{ {
if (MoveInfo.MoveStep != MoveStep.Wait) if (MoveInfo.MoveStep != MoveStep.Wait)
return false; return false;
ignoreFixtureCheck = false;
storeMoveType = _storeMoveType; storeMoveType = _storeMoveType;
PreMove = premove; PreMove = premove;
if (from == null) if (from == null)
...@@ -81,9 +82,9 @@ namespace DeviceLibrary ...@@ -81,9 +82,9 @@ namespace DeviceLibrary
plateH = from.Reel.PlateH; plateH = from.Reel.PlateH;
From = from.clone(); From = from.clone();
To = to.clone(); To = to.clone();
ignoreFixtureCheck = Common.IsNeedIgnoreFixtureCheck(WareCode);
MoveInfo.NewMove(MoveStep.StoreTS01); MoveInfo.NewMove(MoveStep.StoreTS01);
MoveInfo.log($"{storeMoveType}:开始运输料盘,从:{from.posid},到:{to.posid}"); MoveInfo.log($"{storeMoveType}:开始运输料盘,从:{from.posid},到:{to.posid},WareCode:{WareCode},ignoreFixtureCheck:{ignoreFixtureCheck}");
MoveInfo.MoveParam.PosID = $"{From.posid}=>{To.posid}"; MoveInfo.MoveParam.PosID = $"{From.posid}=>{To.posid}";
MoveInfo.MoveParam.ReelOnFixture = From.Reel.ReelOnFixture; MoveInfo.MoveParam.ReelOnFixture = From.Reel.ReelOnFixture;
} }
...@@ -116,7 +117,7 @@ namespace DeviceLibrary ...@@ -116,7 +117,7 @@ namespace DeviceLibrary
case MoveStep.Wait: case MoveStep.Wait:
break; break;
case MoveStep.StoreTS01: case MoveStep.StoreTS01:
if (!IgnoreX09 && !MoveInfo.MoveParam.ReelOnFixture && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (!ignoreFixtureCheck && !IgnoreX09 && !MoveInfo.MoveParam.ReelOnFixture && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
if (!IgnoreX09 && IOMonitor.IODebound(IO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 5000)) if (!IgnoreX09 && IOMonitor.IODebound(IO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 5000))
Msg.add(crc.GetString(L.out_store_detect_material, "出库时料叉X23检测到有物料无法继续,请检查."), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect); Msg.add(crc.GetString(L.out_store_detect_material, "出库时料叉X23检测到有物料无法继续,请检查."), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
...@@ -194,7 +195,7 @@ namespace DeviceLibrary ...@@ -194,7 +195,7 @@ namespace DeviceLibrary
break; break;
case MoveStep.StoreTS09: case MoveStep.StoreTS09:
RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(From.posid, WareCode, storeMoveType, FixtureState.FromOut)); RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(From.posid, WareCode, storeMoveType, FixtureState.FromOut));
if (!IgnoreX09 && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW)) if (!ignoreFixtureCheck && !IgnoreX09 && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{ {
Msg.add(crc.GetString(L.out_store_not_detect_material, "出库时料叉X30没有检测到有物料无法继续,请检查."), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect); Msg.add(crc.GetString(L.out_store_not_detect_material, "出库时料叉X30没有检测到有物料无法继续,请检查."), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
//RobotManage.UserPause("出库时料叉X30没有检测到有物料无法继续,请检查"); //RobotManage.UserPause("出库时料叉X30没有检测到有物料无法继续,请检查");
...@@ -296,13 +297,13 @@ namespace DeviceLibrary ...@@ -296,13 +297,13 @@ namespace DeviceLibrary
break; break;
case MoveStep.StoreTS15: case MoveStep.StoreTS15:
RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(To.posid, WareCode, storeMoveType, FixtureState.ToOut)); RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(To.posid, WareCode, storeMoveType, FixtureState.ToOut));
var isToString = To.posid == BoxStorePosition.strings; //var isToString = To.posid == BoxStorePosition.strings;
if (!isToString && !IgnoreX09 && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) //if (!isToString && !IgnoreX09 && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ //{
Msg.add(crc.GetString(L.in_store_detect_material,"入库后料叉X30上任然检测到物料,请检查."), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect); // Msg.add(crc.GetString(L.in_store_detect_material,"入库后料叉X30上任然检测到物料,请检查."), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
//RobotManage.UserPause("入库后料叉X30上任然检测到物料,请检查"); // //RobotManage.UserPause("入库后料叉X30上任然检测到物料,请检查");
} //}
else //else
{ {
Msg.add("", MsgLevel.info, ErrInfo.X09_Clear); Msg.add("", MsgLevel.info, ErrInfo.X09_Clear);
IgnoreX09 = false; IgnoreX09 = false;
...@@ -325,9 +326,12 @@ namespace DeviceLibrary ...@@ -325,9 +326,12 @@ namespace DeviceLibrary
// UpDown_Axis.AbsMove(MoveInfo, Config.UpDown_P5, Config.UpDown_P1_speed); // UpDown_Axis.AbsMove(MoveInfo, Config.UpDown_P5, Config.UpDown_P1_speed);
//else //else
// UpDown_Axis.AbsMove(MoveInfo, Config.UpDown_P2, Config.UpDown_P1_speed); // UpDown_Axis.AbsMove(MoveInfo, Config.UpDown_P2, Config.UpDown_P1_speed);
UpDown_Axis.AbsMove(MoveInfo, Config.UpDown_P1, Config.UpDown_P1_speed); if (!RobotManage.mainMachine.HasJob) {
Middle_Axis.AbsMove(MoveInfo, Config.Middle_P1, Config.Middle_P1_speed); UpDown_Axis.AbsMove(MoveInfo, Config.UpDown_P1, Config.UpDown_P1_speed);
MoveInfo.log($"{storeMoveType}:上下轴,旋转返回待机点P1"); Middle_Axis.AbsMove(MoveInfo, Config.Middle_P1, Config.Middle_P1_speed);
MoveInfo.log($"{storeMoveType}:上下轴,旋转返回待机点P1");
}else
MoveInfo.log($"{storeMoveType}:后续还有任务不返回待机点");
ErrMsgTxt = ""; ErrMsgTxt = "";
break; break;
case MoveStep.StoreTS17: case MoveStep.StoreTS17:
......
...@@ -15,6 +15,24 @@ namespace DeviceLibrary ...@@ -15,6 +15,24 @@ namespace DeviceLibrary
{ {
public class Common public class Common
{ {
public static bool IsNeedIgnoreFixtureCheck(string code)
{
if (Setting_Init.Device_Disable_INOUT_FixtureCheck) {
return true;
}
if (string.IsNullOrEmpty(code))
return false;
var li = Setting_Init.Device_Ignore_FixtureCheck.Val;
var c= li.Sum(x=>code.IndexOf(x)>=0?1:0);
LogUtil.info($"code:{code},li:{string.Join(",", li)}");
return c > 0;
}
/**获取角度*/ /**获取角度*/
// 求3点形成的夹角 // 求3点形成的夹角
public static float getAngle2(Point pt1, Point pt2, Point pt0) public static float getAngle2(Point pt1, Point pt2, Point pt0)
......
...@@ -324,10 +324,21 @@ namespace DeviceLibrary ...@@ -324,10 +324,21 @@ namespace DeviceLibrary
Middle_Axis.AbsMove(ResetMoveInfo, Config.Middle_P1, Config.Middle_P1_speed); Middle_Axis.AbsMove(ResetMoveInfo, Config.Middle_P1, Config.Middle_P1_speed);
UpDown_Axis.AbsMove(ResetMoveInfo, Config.UpDown_P1, Config.UpDown_P1_speed); UpDown_Axis.AbsMove(ResetMoveInfo, Config.UpDown_P1, Config.UpDown_P1_speed);
break; break;
case MoveStep.H06_HomeReset: case MoveStep.H06_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H07_HomeReset);
ResetMoveInfo.log("压紧轴回原"); ResetMoveInfo.log("压紧轴回原");
Comp_Axis.HomeMove(ResetMoveInfo, forceHome); if (AxisManager.GetAlarmStatus(Comp_Axis.Config.DeviceName, Comp_Axis.Config.GetAxisValue()) == 1)
{
AxisManager.AlarmClear(Comp_Axis.Config.DeviceName, Comp_Axis.Config.GetAxisValue());
Msg.add("压紧轴报警无法回原,请手动取出取料叉上的物料", MsgLevel.alarm);
SingleDoor.ToHigh(null);
Thread.Sleep(2000);
RobotManage.UserPause("压紧轴报警", true);
}
else
{
ResetMoveInfo.NextMoveStep(MoveStep.H07_HomeReset);
Comp_Axis.HomeMove(ResetMoveInfo, forceHome);
}
break; break;
case MoveStep.H07_HomeReset: case MoveStep.H07_HomeReset:
if (IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) { if (IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) {
...@@ -380,8 +391,8 @@ namespace DeviceLibrary ...@@ -380,8 +391,8 @@ namespace DeviceLibrary
ResetMoveInfo.NextMoveStep(MoveStep.H14_HomeReset); ResetMoveInfo.NextMoveStep(MoveStep.H14_HomeReset);
if (!NGDoor_Tray_Test_Reel) if (!NGDoor_Tray_Test_Reel)
{ {
Msg.add(crc.GetString(L.x29_low_no_reel, "传感器X29未检测到单料口料盘."), MsgLevel.alarm); Msg.add(crc.GetString(L.x29_low_no_reel, "传感器X23未检测到单料口料盘."), MsgLevel.alarm);
RobotManage.UserPause("传感器X29未检测到单料口料盘."); RobotManage.UserPause("传感器X23未检测到单料口料盘.");
} }
//CylinderMove(ResetMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH); //CylinderMove(ResetMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH);
SingleDoor.ToHigh(ResetMoveInfo); SingleDoor.ToHigh(ResetMoveInfo);
...@@ -568,8 +579,25 @@ namespace DeviceLibrary ...@@ -568,8 +579,25 @@ namespace DeviceLibrary
{ {
if (AxisManager.GetAlarmStatus(configMoveAxis.DeviceName, configMoveAxis.GetAxisValue()) == 1) if (AxisManager.GetAlarmStatus(configMoveAxis.DeviceName, configMoveAxis.GetAxisValue()) == 1)
{ {
Msg.add(crc.GetString(configMoveAxis.ProName, configMoveAxis.Explain) + $"[{configMoveAxis.GetAxisValue()}]:" if (configMoveAxis.DeviceName == "Comp_Axis")
{
if (runStatus == RunStatus.Running || ResetMoveInfo.IsStep(MoveStep.H06_HomeReset))
{
Msg.add(crc.GetString(configMoveAxis.ProName, configMoveAxis.Explain) + $"[{configMoveAxis.GetAxisValue()}]:"
+ crc.GetString(L.motion_alarm, "运动报警"), MsgLevel.alarm);
RobotManage.UserPause("压紧轴报警", true);
AxisManager.AlarmClear(configMoveAxis.DeviceName, configMoveAxis.GetAxisValue());
Thread.Sleep(2000);
SingleDoor.ToHigh(null);
}
}
else
{
Msg.add(crc.GetString(configMoveAxis.ProName, configMoveAxis.Explain) + $"[{configMoveAxis.GetAxisValue()}]:"
+ crc.GetString(L.motion_alarm, "运动报警"), MsgLevel.alarm, ErrInfo.SuddenStop); + crc.GetString(L.motion_alarm, "运动报警"), MsgLevel.alarm, ErrInfo.SuddenStop);
}
ok = false; ok = false;
} }
} }
......
...@@ -359,7 +359,8 @@ namespace DeviceLibrary ...@@ -359,7 +359,8 @@ namespace DeviceLibrary
{ {
get get
{ {
return IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH); //return IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH);
return IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.HIGH);
} }
} }
private int GetWidth() private int GetWidth()
...@@ -429,9 +430,11 @@ namespace DeviceLibrary ...@@ -429,9 +430,11 @@ namespace DeviceLibrary
} }
else else
{ {
IOMove(IO_Type.Device_Led, IO_VALUE.LOW); if (Setting_Init.Device_CloseDeviceLightWhenScan)
IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
LastCodeList = CodeManager.CameraScan(CodeManager.hikNameList); LastCodeList = CodeManager.CameraScan(CodeManager.hikNameList);
IOMove(IO_Type.Device_Led, IO_VALUE.HIGH); if (Setting_Init.Device_CloseDeviceLightWhenScan)
IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
} }
......
...@@ -15,15 +15,15 @@ namespace DeviceLibrary ...@@ -15,15 +15,15 @@ namespace DeviceLibrary
{ {
StoreJobList OutStoreJobList = new StoreJobList("批量"); StoreJobList OutStoreJobList = new StoreJobList("批量");
StoreJobList OutSingleJobList = new StoreJobList("单盘"); StoreJobList OutSingleJobList = new StoreJobList("单盘");
public bool HasJob { get => OutStoreJobList.Count > 0 || OutSingleJobList.Count>0; }
public void AddOutStoreTask(string posId,int plateW,int plateH) { public void AddOutStoreTask(string warecode, string posId,int plateW,int plateH) {
JobInfo jobInfo = new JobInfo("", posId,plateW,plateH); JobInfo jobInfo = new JobInfo(warecode, posId,plateW,plateH);
OutStoreJobList.Enqueue(jobInfo); OutStoreJobList.Enqueue(jobInfo);
LogUtil.info($"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}"); LogUtil.info($"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}");
} }
public void AddSingleStoreTask(string posId, int plateW, int plateH) public void AddSingleStoreTask(string warecode,string posId, int plateW, int plateH)
{ {
JobInfo jobInfo = new JobInfo("", posId, plateW, plateH); JobInfo jobInfo = new JobInfo(warecode, posId, plateW, plateH);
OutSingleJobList.Enqueue(jobInfo); OutSingleJobList.Enqueue(jobInfo);
LogUtil.info($"添加单盘出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}"); LogUtil.info($"添加单盘出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}");
} }
...@@ -61,7 +61,6 @@ namespace DeviceLibrary ...@@ -61,7 +61,6 @@ namespace DeviceLibrary
{ {
if (!boxTransport.IgnoreX09 && IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (!boxTransport.IgnoreX09 && IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
if (!boxTransport.IgnoreX09 && IOMonitor.IODebound(IO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 5000)) if (!boxTransport.IgnoreX09 && IOMonitor.IODebound(IO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 5000))
{ {
Msg.add("收到出库任务,但料叉上有料,无法启动,请检查", MsgLevel.alarm, ErrInfo.X09_BoxNotDetect); Msg.add("收到出库任务,但料叉上有料,无法启动,请检查", MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
...@@ -77,6 +76,7 @@ namespace DeviceLibrary ...@@ -77,6 +76,7 @@ namespace DeviceLibrary
{ {
StoreMoveInfo.NewMove(MoveStep.StoreOut10); StoreMoveInfo.NewMove(MoveStep.StoreOut10);
StoreMoveInfo.MoveParam.PosID = jobInfo.PosId; StoreMoveInfo.MoveParam.PosID = jobInfo.PosId;
StoreMoveInfo.MoveParam.WareCode = jobInfo.WareNum;
StoreMoveInfo.MoveParam.PlateH = jobInfo.plateH; StoreMoveInfo.MoveParam.PlateH = jobInfo.plateH;
StoreMoveInfo.MoveParam.PlateW = jobInfo.plateW; StoreMoveInfo.MoveParam.PlateW = jobInfo.plateW;
StoreMoveInfo.MoveParam.IsNg = true; StoreMoveInfo.MoveParam.IsNg = true;
...@@ -109,6 +109,7 @@ namespace DeviceLibrary ...@@ -109,6 +109,7 @@ namespace DeviceLibrary
{ {
StoreMoveInfo.NewMove(MoveStep.StoreOut10); StoreMoveInfo.NewMove(MoveStep.StoreOut10);
StoreMoveInfo.MoveParam.PosID = jobInfo.PosId; StoreMoveInfo.MoveParam.PosID = jobInfo.PosId;
StoreMoveInfo.MoveParam.WareCode = jobInfo.WareNum;
StoreMoveInfo.MoveParam.PlateH = jobInfo.plateH; StoreMoveInfo.MoveParam.PlateH = jobInfo.plateH;
StoreMoveInfo.MoveParam.PlateW = jobInfo.plateW; StoreMoveInfo.MoveParam.PlateW = jobInfo.plateW;
StoreMoveInfo.log($"开始出库任务:" + jobInfo.ToStr()); StoreMoveInfo.log($"开始出库任务:" + jobInfo.ToStr());
......
using OnlineStore; using OnlineStore;
using OnlineStore.Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -131,6 +132,7 @@ namespace TheMachine ...@@ -131,6 +132,7 @@ namespace TheMachine
private void labelVersion_Click(object sender, EventArgs e) private void labelVersion_Click(object sender, EventArgs e)
{ {
ConfigHelper.AdvanceConfigForm.ShowEditDialog(this); ConfigHelper.AdvanceConfigForm.ShowEditDialog(this);
LogUtil.info("用户点击隐藏配置");
} }
} }
} }
...@@ -239,6 +239,7 @@ namespace TheMachine ...@@ -239,6 +239,7 @@ namespace TheMachine
this.cb_IgnoreSafecheck.TabIndex = 2; this.cb_IgnoreSafecheck.TabIndex = 2;
this.cb_IgnoreSafecheck.Text = "忽略安全检查(含安全光栅)"; this.cb_IgnoreSafecheck.Text = "忽略安全检查(含安全光栅)";
this.cb_IgnoreSafecheck.UseVisualStyleBackColor = true; this.cb_IgnoreSafecheck.UseVisualStyleBackColor = true;
this.cb_IgnoreSafecheck.Visible = false;
this.cb_IgnoreSafecheck.CheckedChanged += new System.EventHandler(this.cb_IgnoreSafecheck_CheckedChanged); this.cb_IgnoreSafecheck.CheckedChanged += new System.EventHandler(this.cb_IgnoreSafecheck_CheckedChanged);
// //
// pictureBox2 // pictureBox2
...@@ -263,6 +264,7 @@ namespace TheMachine ...@@ -263,6 +264,7 @@ namespace TheMachine
this.cb_IgnoreGratingSignal.TabIndex = 2; this.cb_IgnoreGratingSignal.TabIndex = 2;
this.cb_IgnoreGratingSignal.Text = "忽略安全光栅"; this.cb_IgnoreGratingSignal.Text = "忽略安全光栅";
this.cb_IgnoreGratingSignal.UseVisualStyleBackColor = true; this.cb_IgnoreGratingSignal.UseVisualStyleBackColor = true;
this.cb_IgnoreGratingSignal.Visible = false;
this.cb_IgnoreGratingSignal.CheckedChanged += new System.EventHandler(this.cb_IgnoreGratingSignal_CheckedChanged); this.cb_IgnoreGratingSignal.CheckedChanged += new System.EventHandler(this.cb_IgnoreGratingSignal_CheckedChanged);
// //
// pictureBox1 // pictureBox1
......
...@@ -240,6 +240,10 @@ namespace TheMachine ...@@ -240,6 +240,10 @@ namespace TheMachine
private void 启用调试模式ToolStripMenuItem_Click(object sender, EventArgs e) private void 启用调试模式ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if (!RobotManage.IsConfigMode && !FrmPassCheck.CheckPassword())
return;
RobotManage.IsConfigMode = RobotManage.IsConfigMode ? false : true; RobotManage.IsConfigMode = RobotManage.IsConfigMode ? false : true;
(sender as ToolStripMenuItem).Text = !RobotManage.IsConfigMode ? crc.GetString(L.enable_config_mode,"启用配置模式") : crc.GetString(L.disable_config_mode, "停用配置模式"); (sender as ToolStripMenuItem).Text = !RobotManage.IsConfigMode ? crc.GetString(L.enable_config_mode,"启用配置模式") : crc.GetString(L.disable_config_mode, "停用配置模式");
...@@ -250,9 +254,15 @@ namespace TheMachine ...@@ -250,9 +254,15 @@ namespace TheMachine
//RobotManage.Config = (Robot_Config)CSVConfigReader.LoadConfig(RobotManage.Config); //RobotManage.Config = (Robot_Config)CSVConfigReader.LoadConfig(RobotManage.Config);
addTablePage(); addTablePage();
RobotManage.LoadDebug(); RobotManage.LoadDebug();
cb_IgnoreGratingSignal.Visible = true;
cb_IgnoreSafecheck.Visible = true;
} }
else else
{ {
cb_IgnoreGratingSignal.Checked = false;
cb_IgnoreGratingSignal.Visible = false;
cb_IgnoreSafecheck.Checked = false;
cb_IgnoreSafecheck.Visible = false;
var tc = tabc.TabPages.Count; var tc = tabc.TabPages.Count;
for (int i = 1; i <=tabpagecount; i++) for (int i = 1; i <=tabpagecount; i++)
{ {
......
...@@ -44,6 +44,7 @@ namespace TheMachine ...@@ -44,6 +44,7 @@ namespace TheMachine
this.tabPage_ledtower = new System.Windows.Forms.TabPage(); this.tabPage_ledtower = new System.Windows.Forms.TabPage();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.fixtureSizeConfigControl1 = new DeviceLibrary.FixtureSizeConfigControl(); this.fixtureSizeConfigControl1 = new DeviceLibrary.FixtureSizeConfigControl();
this.uC_SetUserPassword1 = new TheMachine.UC_SetUserPassword();
this.tp.SuspendLayout(); this.tp.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage_set.SuspendLayout(); this.tabPage_set.SuspendLayout();
...@@ -179,6 +180,7 @@ namespace TheMachine ...@@ -179,6 +180,7 @@ namespace TheMachine
// //
// tabPage_set // tabPage_set
// //
this.tabPage_set.Controls.Add(this.uC_SetUserPassword1);
this.tabPage_set.Controls.Add(this.tp); this.tabPage_set.Controls.Add(this.tp);
this.tabPage_set.Location = new System.Drawing.Point(4, 22); this.tabPage_set.Location = new System.Drawing.Point(4, 22);
this.tabPage_set.Name = "tabPage_set"; this.tabPage_set.Name = "tabPage_set";
...@@ -218,6 +220,15 @@ namespace TheMachine ...@@ -218,6 +220,15 @@ namespace TheMachine
this.fixtureSizeConfigControl1.Size = new System.Drawing.Size(1010, 708); this.fixtureSizeConfigControl1.Size = new System.Drawing.Size(1010, 708);
this.fixtureSizeConfigControl1.TabIndex = 0; this.fixtureSizeConfigControl1.TabIndex = 0;
// //
// uC_SetUserPassword1
//
this.uC_SetUserPassword1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uC_SetUserPassword1.Location = new System.Drawing.Point(335, 8);
this.uC_SetUserPassword1.Margin = new System.Windows.Forms.Padding(5);
this.uC_SetUserPassword1.Name = "uC_SetUserPassword1";
this.uC_SetUserPassword1.Size = new System.Drawing.Size(533, 596);
this.uC_SetUserPassword1.TabIndex = 7;
//
// SettingControl // SettingControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -251,5 +262,6 @@ namespace TheMachine ...@@ -251,5 +262,6 @@ namespace TheMachine
private System.Windows.Forms.TabPage tabPage_ledtower; private System.Windows.Forms.TabPage tabPage_ledtower;
private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage1;
private DeviceLibrary.FixtureSizeConfigControl fixtureSizeConfigControl1; private DeviceLibrary.FixtureSizeConfigControl fixtureSizeConfigControl1;
private UC_SetUserPassword uC_SetUserPassword1;
} }
} }
...@@ -119,6 +119,12 @@ ...@@ -119,6 +119,12 @@
<Compile Include="SettingControl.Designer.cs"> <Compile Include="SettingControl.Designer.cs">
<DependentUpon>SettingControl.cs</DependentUpon> <DependentUpon>SettingControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UC\FrmPassCheck.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UC\FrmPassCheck.Designer.cs">
<DependentUpon>FrmPassCheck.cs</DependentUpon>
</Compile>
<Compile Include="UC\StorePosControl.cs"> <Compile Include="UC\StorePosControl.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
...@@ -152,6 +158,12 @@ ...@@ -152,6 +158,12 @@
<Compile Include="UC\UC_LedConfig.Designer.cs"> <Compile Include="UC\UC_LedConfig.Designer.cs">
<DependentUpon>UC_LedConfig.cs</DependentUpon> <DependentUpon>UC_LedConfig.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UC\UC_SetUserPassword.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\UC_SetUserPassword.Designer.cs">
<DependentUpon>UC_SetUserPassword.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="AboutBox1.resx"> <EmbeddedResource Include="AboutBox1.resx">
<DependentUpon>AboutBox1.cs</DependentUpon> <DependentUpon>AboutBox1.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -184,6 +196,9 @@ ...@@ -184,6 +196,9 @@
<EmbeddedResource Include="SettingControl.resx"> <EmbeddedResource Include="SettingControl.resx">
<DependentUpon>SettingControl.cs</DependentUpon> <DependentUpon>SettingControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UC\FrmPassCheck.resx">
<DependentUpon>FrmPassCheck.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UC\StorePosControl.resx"> <EmbeddedResource Include="UC\StorePosControl.resx">
<DependentUpon>StorePosControl.cs</DependentUpon> <DependentUpon>StorePosControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -199,6 +214,9 @@ ...@@ -199,6 +214,9 @@
<EmbeddedResource Include="UC\UC_LedConfig.resx"> <EmbeddedResource Include="UC\UC_LedConfig.resx">
<DependentUpon>UC_LedConfig.cs</DependentUpon> <DependentUpon>UC_LedConfig.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UC\UC_SetUserPassword.resx">
<DependentUpon>UC_SetUserPassword.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" /> <None Include="app.manifest" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
......

namespace TheMachine
{
partial class FrmPassCheck
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.btn_ok = new System.Windows.Forms.Button();
this.btn_cancel = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox1.Location = new System.Drawing.Point(114, 88);
this.textBox1.Name = "textBox1";
this.textBox1.PasswordChar = '*';
this.textBox1.Size = new System.Drawing.Size(318, 29);
this.textBox1.TabIndex = 0;
//
// btn_ok
//
this.btn_ok.Location = new System.Drawing.Point(352, 189);
this.btn_ok.Name = "btn_ok";
this.btn_ok.Size = new System.Drawing.Size(129, 49);
this.btn_ok.TabIndex = 1;
this.btn_ok.Text = "确定";
this.btn_ok.UseVisualStyleBackColor = true;
this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
//
// btn_cancel
//
this.btn_cancel.Location = new System.Drawing.Point(40, 189);
this.btn_cancel.Name = "btn_cancel";
this.btn_cancel.Size = new System.Drawing.Size(129, 49);
this.btn_cancel.TabIndex = 1;
this.btn_cancel.Text = "取消";
this.btn_cancel.UseVisualStyleBackColor = true;
this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);
//
// FrmPassCheck
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(548, 275);
this.Controls.Add(this.btn_cancel);
this.Controls.Add(this.btn_ok);
this.Controls.Add(this.textBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmPassCheck";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "请输入密码";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button btn_ok;
private System.Windows.Forms.Button btn_cancel;
}
}
\ No newline at end of file \ No newline at end of file
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TheMachine
{
public partial class FrmPassCheck : Form
{
public FrmPassCheck()
{
InitializeComponent();
}
public static bool CheckPassword() {
if (!Setting_Init.User_Enable)
return true;
FrmPassCheck frmPassCheck = new FrmPassCheck();
var result = frmPassCheck.ShowDialog();
return (result == DialogResult.OK);
}
private void btn_cancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
this.Close();
}
private void btn_ok_Click(object sender, EventArgs e)
{
if (textBox1.Text.Trim() == Setting_Init.User_AdminPassword.Val.Trim())
{
DialogResult = DialogResult.OK;
this.Close();
}
else
MessageBox.Show("密码不正确请重新输入!");
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file

namespace TheMachine
{
partial class UC_SetUserPassword
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button_ok = new System.Windows.Forms.Button();
this.label_newpwd2 = new System.Windows.Forms.Label();
this.label_newpwd = new System.Windows.Forms.Label();
this.label_oldpwd = new System.Windows.Forms.Label();
this.textBox_newpwd2 = new System.Windows.Forms.TextBox();
this.textBox_newpwd = new System.Windows.Forms.TextBox();
this.textBox_oldpwd = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.button_ok);
this.groupBox1.Controls.Add(this.label_newpwd2);
this.groupBox1.Controls.Add(this.label_newpwd);
this.groupBox1.Controls.Add(this.label_oldpwd);
this.groupBox1.Controls.Add(this.textBox_newpwd2);
this.groupBox1.Controls.Add(this.textBox_newpwd);
this.groupBox1.Controls.Add(this.textBox_oldpwd);
this.groupBox1.Location = new System.Drawing.Point(5, 5);
this.groupBox1.Margin = new System.Windows.Forms.Padding(5);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(5);
this.groupBox1.Size = new System.Drawing.Size(388, 258);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "管理密码设置";
//
// button_ok
//
this.button_ok.Location = new System.Drawing.Point(201, 188);
this.button_ok.Name = "button_ok";
this.button_ok.Size = new System.Drawing.Size(119, 33);
this.button_ok.TabIndex = 2;
this.button_ok.Text = "确认修改";
this.button_ok.UseVisualStyleBackColor = true;
this.button_ok.Click += new System.EventHandler(this.button_ok_Click);
//
// label_newpwd2
//
this.label_newpwd2.Location = new System.Drawing.Point(11, 134);
this.label_newpwd2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label_newpwd2.Name = "label_newpwd2";
this.label_newpwd2.Size = new System.Drawing.Size(134, 23);
this.label_newpwd2.TabIndex = 1;
this.label_newpwd2.Text = "重复新密码:";
this.label_newpwd2.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// label_newpwd
//
this.label_newpwd.Location = new System.Drawing.Point(11, 88);
this.label_newpwd.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label_newpwd.Name = "label_newpwd";
this.label_newpwd.Size = new System.Drawing.Size(134, 23);
this.label_newpwd.TabIndex = 1;
this.label_newpwd.Text = "新密码:";
this.label_newpwd.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// label_oldpwd
//
this.label_oldpwd.Location = new System.Drawing.Point(11, 43);
this.label_oldpwd.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label_oldpwd.Name = "label_oldpwd";
this.label_oldpwd.Size = new System.Drawing.Size(134, 23);
this.label_oldpwd.TabIndex = 1;
this.label_oldpwd.Text = "旧密码:";
this.label_oldpwd.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// textBox_newpwd2
//
this.textBox_newpwd2.Location = new System.Drawing.Point(155, 131);
this.textBox_newpwd2.Margin = new System.Windows.Forms.Padding(5);
this.textBox_newpwd2.Name = "textBox_newpwd2";
this.textBox_newpwd2.PasswordChar = '*';
this.textBox_newpwd2.Size = new System.Drawing.Size(165, 26);
this.textBox_newpwd2.TabIndex = 0;
//
// textBox_newpwd
//
this.textBox_newpwd.Location = new System.Drawing.Point(155, 85);
this.textBox_newpwd.Margin = new System.Windows.Forms.Padding(5);
this.textBox_newpwd.Name = "textBox_newpwd";
this.textBox_newpwd.PasswordChar = '*';
this.textBox_newpwd.Size = new System.Drawing.Size(165, 26);
this.textBox_newpwd.TabIndex = 0;
//
// textBox_oldpwd
//
this.textBox_oldpwd.Location = new System.Drawing.Point(155, 40);
this.textBox_oldpwd.Margin = new System.Windows.Forms.Padding(5);
this.textBox_oldpwd.Name = "textBox_oldpwd";
this.textBox_oldpwd.PasswordChar = '*';
this.textBox_oldpwd.Size = new System.Drawing.Size(165, 26);
this.textBox_oldpwd.TabIndex = 0;
//
// UC_SetUserPassword
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.groupBox1);
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(5);
this.Name = "UC_SetUserPassword";
this.Size = new System.Drawing.Size(405, 272);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label_newpwd2;
private System.Windows.Forms.Label label_newpwd;
private System.Windows.Forms.Label label_oldpwd;
private System.Windows.Forms.TextBox textBox_newpwd2;
private System.Windows.Forms.TextBox textBox_newpwd;
private System.Windows.Forms.TextBox textBox_oldpwd;
private System.Windows.Forms.Button button_ok;
}
}
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TheMachine
{
public partial class UC_SetUserPassword : UserControl
{
public UC_SetUserPassword()
{
InitializeComponent();
}
private void button_ok_Click(object sender, EventArgs e)
{
if (textBox_oldpwd.Text != Setting_Init.User_AdminPassword)
{
MessageBox.Show("旧密码不正确!");
textBox_oldpwd.Text = "";
return;
}
if (textBox_newpwd.Text != textBox_newpwd2.Text) {
MessageBox.Show("两次输入的新密码不一致,请确认!");
//textBox_oldpwd.Text = "";
return;
}
if (string.IsNullOrWhiteSpace(textBox_newpwd.Text))
{
MessageBox.Show("新密码不能为空!");
return;
}
Setting_Init.User_AdminPassword = textBox_newpwd.Text.Trim();
textBox_oldpwd.Text = "";
textBox_newpwd.Text = "";
textBox_newpwd2.Text = "";
MessageBox.Show("密码修改成功!");
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -353,7 +353,7 @@ namespace TheMachine ...@@ -353,7 +353,7 @@ namespace TheMachine
ACStorePosition position = CSVPositionReader<ACStorePosition>.GetPositon(selectPositionNum); ACStorePosition position = CSVPositionReader<ACStorePosition>.GetPositon(selectPositionNum);
if (RobotManage.mainMachine.boxTransportIsFree) { if (RobotManage.mainMachine.boxTransportIsFree) {
LogUtil.info($"手动出库:{selectPositionNum}"); LogUtil.info($"手动出库:{selectPositionNum}");
RobotManage.mainMachine.AddSingleStoreTask(selectPositionNum, position.BagWidth, position.BagHigh); RobotManage.mainMachine.AddSingleStoreTask("",selectPositionNum, position.BagWidth, position.BagHigh);
} }
else else
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!