Commit 30868c01 刘韬

启用调试需要密码Config_AdminPwd

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