Commit ab493891 刘韬

密码覆盖整个软件

1 个父辈 026fb23c
......@@ -41,6 +41,7 @@
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(306, 25);
this.label1.TabIndex = 0;
this.label1.Tag = "请输入密码:";
this.label1.Text = "请输入密码:";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
......@@ -53,6 +54,7 @@
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(120, 45);
this.btnNext.TabIndex = 275;
this.btnNext.Tag = "确定";
this.btnNext.Text = "确定";
this.btnNext.UseVisualStyleBackColor = false;
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
......@@ -66,6 +68,7 @@
this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(120, 45);
this.btnBack.TabIndex = 274;
this.btnBack.Tag = "返回";
this.btnBack.Text = "返回";
this.btnBack.UseVisualStyleBackColor = false;
this.btnBack.Click += new System.EventHandler(this.btnBack_Click);
......@@ -78,7 +81,6 @@
this.txtPwd.PasswordChar = '*';
this.txtPwd.Size = new System.Drawing.Size(215, 33);
this.txtPwd.TabIndex = 276;
this.txtPwd.Text = "123456";
this.txtPwd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtPwd_KeyDown);
//
// FrmPwd
......
......@@ -26,18 +26,23 @@ namespace OnlineStore.ACSingleStore
private void FrmPwd_Load(object sender, EventArgs e)
{
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);
if (string.IsNullOrEmpty(configPwd)) {
this.DialogResult = DialogResult.OK;
this.Close();
}
}
private void btnNext_Click(object sender, EventArgs e)
{
string pwd = txtPwd.Text;
string configPwd = ConfigAppSettings.GetValue(Setting_Init.Config_Pwd);
if (configPwd.Equals(""))
{
configPwd = "123456";
ConfigAppSettings.SaveValue(Setting_Init.Config_Pwd,configPwd);
}
//if (configPwd.Equals(""))
//{
// configPwd = "123456";
// ConfigAppSettings.SaveValue(Setting_Init.Config_Pwd,configPwd);
//}
if (pwd.Equals(configPwd))
{
this.DialogResult = DialogResult.OK;
......
......@@ -1640,6 +1640,7 @@ namespace OnlineStore.ACSingleStore
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmStoreBox_FormClosed);
this.Load += new System.EventHandler(this.FrmTest_Load);
this.Shown += new System.EventHandler(this.FrmStoreBox_Shown);
this.Resize += new System.EventHandler(this.FrmStoreBox_Resize);
this.contextMenuStrip1.ResumeLayout(false);
this.tabControl2.ResumeLayout(false);
this.tabPage4.ResumeLayout(false);
......
......@@ -83,7 +83,7 @@ namespace OnlineStore.ACSingleStore
formhwnd = FindWindow(null, formTitle);
// 重新显示该窗体并切换到带入到前台
ShowWindow(formhwnd, SW_RESTORE);
SwitchToThisWindow(formhwnd, true);
//SwitchToThisWindow(formhwnd, true);
isShow = true;
break;
}
......
......@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 4908122be5f3e7e6f5e9f44a28ab562549b45d2c")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore 026fb23c8d6a3c677432a5f7ceefa5e2aa659fde")]
[assembly: AssemblyCopyright("Copyright ? 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......
......@@ -2,6 +2,7 @@
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics.Eventing.Reader;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
......@@ -49,7 +50,9 @@ namespace OnlineStore.DeviceLibrary
if (Ultrasonic1 != null)
{
lock (Ultrasonic1) {
var xx = Math.Abs(Ultrasonic1.Distance - Config.AIDI1_DefaultPosition);
double xx = 0;
if (Ultrasonic1.Distance < Config.AIDI1_DefaultPosition)
xx = Math.Abs(Ultrasonic1.Distance - Config.AIDI1_DefaultPosition);
var vv = xx >= 4 ? IO_VALUE.HIGH : IO_VALUE.LOW;
var Filter = vv;
if (vv != Last_TrayCheck_Door)
......@@ -63,7 +66,9 @@ namespace OnlineStore.DeviceLibrary
if (Ultrasonic2 != null)
{
var x2 = Math.Abs(Ultrasonic2.Distance - Config.AIDI2_DefaultPosition);
double x2 = 0;
if (Ultrasonic2.Distance< Config.AIDI2_DefaultPosition)
x2 = Math.Abs(Ultrasonic2.Distance - Config.AIDI2_DefaultPosition);
var v2 = x2 >= 4 ? IO_VALUE.HIGH : IO_VALUE.LOW;
if (v2 == IO_VALUE.HIGH)
Filter = IO_VALUE.HIGH;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!