Commit cce296ab LN

20190920修改:

1.密码默认值改为配置值。
2.相机名称 未配置时可以自动默认配置。
1 个父辈 907df38e
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<add key="SinglePosId" value="1#AC2_1_1_6" /> <add key="SinglePosId" value="1#AC2_1_1_6" />
<!--配置文件的表头格式,0=中文,1=英文--> <!--配置文件的表头格式,0=中文,1=英文-->
<add key ="LibNameType" value ="0"/> <add key ="LibNameType" value ="0"/>
<add key="DefaultPWD" value ="123456"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
...@@ -26,6 +26,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -26,6 +26,7 @@ namespace OnlineStore.AutoInOutStore
private void FrmPwd_Load(object sender, EventArgs e) private void FrmPwd_Load(object sender, EventArgs e)
{ {
this.DialogResult = DialogResult.None; this.DialogResult = DialogResult.None;
txtPwd.Text = ConfigAppSettings.GetValue(Setting_Init.DefaultPWD);
} }
private void btnNext_Click(object sender, EventArgs e) private void btnNext_Click(object sender, EventArgs e)
......
...@@ -1658,7 +1658,7 @@ ...@@ -1658,7 +1658,7 @@
// //
this.btnInStore.Enabled = false; this.btnInStore.Enabled = false;
this.btnInStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnInStore.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInStore.Location = new System.Drawing.Point(183, 388); this.btnInStore.Location = new System.Drawing.Point(252, 304);
this.btnInStore.Name = "btnInStore"; this.btnInStore.Name = "btnInStore";
this.btnInStore.Size = new System.Drawing.Size(105, 38); this.btnInStore.Size = new System.Drawing.Size(105, 38);
this.btnInStore.TabIndex = 102; this.btnInStore.TabIndex = 102;
......
...@@ -207,9 +207,6 @@ IO模块读取时间改为可配置。 ...@@ -207,9 +207,6 @@ IO模块读取时间改为可配置。
20190613 20190613
报警消息WarnMsg 改为WarnIfo对象。 报警消息WarnMsg 改为WarnIfo对象。
后面自动上下料 RC1252 修改。 后面自动上下料 RC1252 修改。
DI9 不要,只判断DI10 DI9 不要,只判断DI10
...@@ -224,3 +221,9 @@ IO配置修改,改为新的IO配置。 ...@@ -224,3 +221,9 @@ IO配置修改,改为新的IO配置。
linePositions可以中英文切换(默认中文) linePositions可以中英文切换(默认中文)
位置,优先级,高度,宽度,料仓ID,支持批量操作,中轴位置P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3,进出轴仓门出料点P4,进出轴吸盘取料点P2 位置,优先级,高度,宽度,料仓ID,支持批量操作,中轴位置P2,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4,进出轴库位点取料点P3,压紧轴压紧点P2,压紧轴压紧前点P3,进出轴仓门出料点P4,进出轴吸盘取料点P2
PositionNum,Priority,Height,Width,StoreID,SupportBatch,MiddleAxis_Position_P2,UpDownAxis_OHPosition_P5,UpDownAxis_OLPosition_P6,UpDownAxis_IHPosition_P3,UpDownAxis_ILPosition_P4,InOutAxis_Position_P3,CompressAxis_Position_P2,CompressAxis_CPosition_P3,InOutAxis_DoorOutPosition_P4,InOutAxis_Batch_P2 PositionNum,Priority,Height,Width,StoreID,SupportBatch,MiddleAxis_Position_P2,UpDownAxis_OHPosition_P5,UpDownAxis_OLPosition_P6,UpDownAxis_IHPosition_P3,UpDownAxis_ILPosition_P4,InOutAxis_Position_P3,CompressAxis_Position_P2,CompressAxis_CPosition_P3,InOutAxis_DoorOutPosition_P4,InOutAxis_Batch_P2
20190920修改:
1.密码默认值改为配置值。
2.相机名称 未配置时可以自动默认配置。
...@@ -97,5 +97,6 @@ namespace OnlineStore.Common ...@@ -97,5 +97,6 @@ namespace OnlineStore.Common
public static string DeCodeType = "DeCodeType"; public static string DeCodeType = "DeCodeType";
public static string LibNameType = "LibNameType"; public static string LibNameType = "LibNameType";
public static string DefaultPWD = "DefaultPWD";
} }
} }
...@@ -25,10 +25,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -25,10 +25,10 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 初始化摄像机名称和二维码类型 /// 初始化摄像机名称和二维码类型
/// </summary> /// </summary>
/// <param name="nameStr">摄像机名称,多个用#分割</param> public static void LoadConfig( )
/// <param name="codeStr">二维码类型,多个用#分割</param>
public static void LoadConfig(string nameStr, string codeStr)
{ {
string nameStr = ConfigAppSettings.GetValue(Setting_Init.CameraName);
string codeStr = ConfigAppSettings.GetValue(Setting_Init.CodeType);
cameraNameList = new List<string>(); cameraNameList = new List<string>();
codeTypeList = new List<string>(); codeTypeList = new List<string>();
HDLogUtil.LogName = "RollingLogFileAppender"; HDLogUtil.LogName = "RollingLogFileAppender";
...@@ -37,12 +37,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -37,12 +37,20 @@ namespace OnlineStore.DeviceLibrary
string[] nameArray = nameStr.Split(spiltChar); string[] nameArray = nameStr.Split(spiltChar);
foreach (string str in nameArray) foreach (string str in nameArray)
{ {
LogUtil.info("加载到配置摄像机名称:" + str.Trim()); if (str.Trim().Equals(""))
{
continue;
}
//LogUtil.info("加载到配置摄像机名称:" + str.Trim());
cameraNameList.Add(str.Trim()); cameraNameList.Add(str.Trim());
} }
string[] codeArray = codeStr.Split(spiltChar); string[] codeArray = codeStr.Split(spiltChar);
foreach (string str in codeArray) foreach (string str in codeArray)
{ {
if (str.Trim().Equals(""))
{
continue;
}
LogUtil.info("加载到配置二维码类型:" + str.Trim()); LogUtil.info("加载到配置二维码类型:" + str.Trim());
codeTypeList.Add(str.Trim()); codeTypeList.Add(str.Trim());
} }
...@@ -50,6 +58,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -50,6 +58,19 @@ namespace OnlineStore.DeviceLibrary
LoadCamera(false); LoadCamera(false);
CodeLibrary.HDCodeLearnHelper.LoadConfig(nameStr, codeStr); CodeLibrary.HDCodeLearnHelper.LoadConfig(nameStr, codeStr);
//如果未加载到配置相机,自动配置
if(cameraNameList.Count<=0&& hikNameList.Count > 0)
{
cameraNameList = new List<string>(hikNameList);
string cameraStr = "";
foreach(string name in hikNameList)
{
cameraStr += name + spiltChar;
}
cameraStr = cameraStr.Substring(0, cameraStr.Length - 1);
ConfigAppSettings.SaveValue(Setting_Init.CameraName, cameraStr);
LogUtil.info("未配置扫码相机,默认【"+ Setting_Init.CameraName + "】=【"+ cameraStr + "】");
}
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -70,9 +70,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -70,9 +70,8 @@ namespace OnlineStore.DeviceLibrary
} }
//初始化摄像机配置 //初始化摄像机配置
string nameStr = ConfigAppSettings.GetValue(Setting_Init.CameraName);
string codeStr = ConfigAppSettings.GetValue(Setting_Init.CodeType); CodeManager.LoadConfig( );
CodeManager.LoadConfig(nameStr, codeStr);
AutomaticBaiting.Init(); AutomaticBaiting.Init();
IOManager.Init(); IOManager.Init();
//初始化 //连接设备 //初始化 //连接设备
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!