Commit 0818bd99 刘韬

启用调试需要密码Config_AdminPwd

1 个父辈 265d3dda
......@@ -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,10 @@ 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;
this.Close();
......@@ -38,6 +44,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";
......
......@@ -939,7 +939,11 @@ namespace OnlineStore.ACSingleStore
{
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
{
......@@ -1175,6 +1179,7 @@ namespace OnlineStore.ACSingleStore
if (this.WindowState == FormWindowState.Minimized)
{
needpwd = true;
DebugStatus(false);
return;
}
if (!needpwd)
......
......@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 026fb23c8d6a3c677432a5f7ceefa5e2aa659fde")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 265d3ddac1ce7d5cc5deb01dc23b0a8c1768a1f2")]
[assembly: AssemblyCopyright("Copyright ? 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......
......@@ -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>
......
......@@ -2245,6 +2245,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!