Commit 0818bd99 刘韬

启用调试需要密码Config_AdminPwd

1 个父辈 265d3dda
...@@ -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,10 @@ namespace OnlineStore.ACSingleStore ...@@ -28,6 +30,10 @@ 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;
this.Close(); this.Close();
...@@ -38,6 +44,8 @@ namespace OnlineStore.ACSingleStore ...@@ -38,6 +44,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";
......
...@@ -939,6 +939,10 @@ namespace OnlineStore.ACSingleStore ...@@ -939,6 +939,10 @@ namespace OnlineStore.ACSingleStore
{ {
if (btnDebug.Text.Equals(ResourceCulture.GetString("启用调试"))) if (btnDebug.Text.Equals(ResourceCulture.GetString("启用调试")))
{ {
FrmPwd fw = new FrmPwd(10,true);
DialogResult result = fw.ShowDialog(this);
if (result.Equals(DialogResult.OK))
DebugStatus(true); DebugStatus(true);
} }
else else
...@@ -1175,6 +1179,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1175,6 +1179,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)
......
...@@ -9,7 +9,7 @@ using System.Runtime.InteropServices; ...@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 026fb23c8d6a3c677432a5f7ceefa5e2aa659fde")] [assembly: AssemblyProduct("SO951-HC-ACSingleStore 265d3ddac1ce7d5cc5deb01dc23b0a8c1768a1f2")]
[assembly: AssemblyCopyright("Copyright ? 2017")] [assembly: AssemblyCopyright("Copyright ? 2017")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
......
...@@ -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>
......
...@@ -2245,6 +2245,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -2245,6 +2245,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!