Commit 30868c01 刘韬

启用调试需要密码Config_AdminPwd

1 个父辈 e5b824af
...@@ -17,8 +17,10 @@ namespace OnlineStore.ACSingleStore ...@@ -17,8 +17,10 @@ namespace OnlineStore.ACSingleStore
public delegate void PwdOK(int type); public delegate void PwdOK(int type);
public event PwdOK PwdOKFun; public event PwdOK PwdOKFun;
private int OpenType = 0; private int OpenType = 0;
public FrmPwd(int type) bool needadmin;
public FrmPwd(int type, bool _needadmin = false)
{ {
needadmin = _needadmin;
OpenType = type; OpenType = type;
InitializeComponent(); InitializeComponent();
} }
...@@ -28,6 +30,8 @@ namespace OnlineStore.ACSingleStore ...@@ -28,6 +30,8 @@ namespace OnlineStore.ACSingleStore
this.DialogResult = DialogResult.None; this.DialogResult = DialogResult.None;
//txtPwd.Text = ConfigAppSettings.GetValue(Setting_Init.DefaultPWD); //txtPwd.Text = ConfigAppSettings.GetValue(Setting_Init.DefaultPWD);
string configPwd = ConfigAppSettings.GetValue(Setting_Init.Config_Pwd); string configPwd = ConfigAppSettings.GetValue(Setting_Init.Config_Pwd);
if (needadmin)
configPwd = ConfigAppSettings.GetValue(Setting_Init.Config_AdminPwd);
if (string.IsNullOrEmpty(configPwd)) if (string.IsNullOrEmpty(configPwd))
{ {
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
...@@ -39,6 +43,8 @@ namespace OnlineStore.ACSingleStore ...@@ -39,6 +43,8 @@ namespace OnlineStore.ACSingleStore
{ {
string pwd = txtPwd.Text; string pwd = txtPwd.Text;
string configPwd = ConfigAppSettings.GetValue(Setting_Init.Config_Pwd); string configPwd = ConfigAppSettings.GetValue(Setting_Init.Config_Pwd);
if (needadmin)
configPwd = ConfigAppSettings.GetValue(Setting_Init.Config_AdminPwd);
//if (configPwd.Equals("")) //if (configPwd.Equals(""))
//{ //{
// configPwd = "123456"; // configPwd = "123456";
......
...@@ -1059,7 +1059,11 @@ namespace OnlineStore.ACSingleStore ...@@ -1059,7 +1059,11 @@ namespace OnlineStore.ACSingleStore
{ {
if (btnDebug.Text.Equals(ResourceCulture.GetString("启用调试"))) if (btnDebug.Text.Equals(ResourceCulture.GetString("启用调试")))
{ {
DebugStatus(true); FrmPwd fw = new FrmPwd(10, true);
DialogResult result = fw.ShowDialog(this);
if (result.Equals(DialogResult.OK))
DebugStatus(true);
} }
else else
{ {
...@@ -1355,6 +1359,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1355,6 +1359,7 @@ namespace OnlineStore.ACSingleStore
if (this.WindowState == FormWindowState.Minimized) if (this.WindowState == FormWindowState.Minimized)
{ {
needpwd = true; needpwd = true;
DebugStatus(false);
return; return;
} }
if (!needpwd) if (!needpwd)
......
...@@ -68,6 +68,7 @@ namespace OnlineStore.Common ...@@ -68,6 +68,7 @@ namespace OnlineStore.Common
public static string InOutDefaultPosition = "InOutDefaultPosition"; public static string InOutDefaultPosition = "InOutDefaultPosition";
public static string Config_Pwd = "Config_Pwd"; public static string Config_Pwd = "Config_Pwd";
public static string Config_AdminPwd = "Config_AdminPwd";
/// <summary> /// <summary>
/// 出库等待料盘拿走的时间,秒 /// 出库等待料盘拿走的时间,秒
/// </summary> /// </summary>
......
...@@ -1980,6 +1980,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -1980,6 +1980,10 @@ namespace OnlineStore.DeviceLibrary
{ {
boxStatus.status = (int)StoreStatus.InStoreError; boxStatus.status = (int)StoreStatus.InStoreError;
} }
if (!alarmType.Equals(StoreAlarmType.None))
{
boxStatus.status = (int)StoreStatus.InTrouble;
}
} }
//温湿度 //温湿度
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!