Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ab493891
由
刘韬
编写于
2024-04-26 11:13:36 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
密码覆盖整个软件
1 个父辈
026fb23c
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
85 行增加
和
51 行删除
source/ACSingleStore/FrmPwd.Designer.cs
source/ACSingleStore/FrmPwd.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/Program.cs
source/ACSingleStore/Properties/AssemblyInfo.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_ADIO.cs
source/ACSingleStore/FrmPwd.Designer.cs
查看文件 @
ab49389
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
306
,
25
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
306
,
25
);
this
.
label1
.
TabIndex
=
0
;
this
.
label1
.
TabIndex
=
0
;
this
.
label1
.
Tag
=
"请输入密码:"
;
this
.
label1
.
Text
=
"请输入密码:"
;
this
.
label1
.
Text
=
"请输入密码:"
;
this
.
label1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopCenter
;
this
.
label1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopCenter
;
//
//
...
@@ -53,6 +54,7 @@
...
@@ -53,6 +54,7 @@
this
.
btnNext
.
Name
=
"btnNext"
;
this
.
btnNext
.
Name
=
"btnNext"
;
this
.
btnNext
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
45
);
this
.
btnNext
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
45
);
this
.
btnNext
.
TabIndex
=
275
;
this
.
btnNext
.
TabIndex
=
275
;
this
.
btnNext
.
Tag
=
"确定"
;
this
.
btnNext
.
Text
=
"确定"
;
this
.
btnNext
.
Text
=
"确定"
;
this
.
btnNext
.
UseVisualStyleBackColor
=
false
;
this
.
btnNext
.
UseVisualStyleBackColor
=
false
;
this
.
btnNext
.
Click
+=
new
System
.
EventHandler
(
this
.
btnNext_Click
);
this
.
btnNext
.
Click
+=
new
System
.
EventHandler
(
this
.
btnNext_Click
);
...
@@ -66,6 +68,7 @@
...
@@ -66,6 +68,7 @@
this
.
btnBack
.
Name
=
"btnBack"
;
this
.
btnBack
.
Name
=
"btnBack"
;
this
.
btnBack
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
45
);
this
.
btnBack
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
45
);
this
.
btnBack
.
TabIndex
=
274
;
this
.
btnBack
.
TabIndex
=
274
;
this
.
btnBack
.
Tag
=
"返回"
;
this
.
btnBack
.
Text
=
"返回"
;
this
.
btnBack
.
Text
=
"返回"
;
this
.
btnBack
.
UseVisualStyleBackColor
=
false
;
this
.
btnBack
.
UseVisualStyleBackColor
=
false
;
this
.
btnBack
.
Click
+=
new
System
.
EventHandler
(
this
.
btnBack_Click
);
this
.
btnBack
.
Click
+=
new
System
.
EventHandler
(
this
.
btnBack_Click
);
...
@@ -78,7 +81,6 @@
...
@@ -78,7 +81,6 @@
this
.
txtPwd
.
PasswordChar
=
'*'
;
this
.
txtPwd
.
PasswordChar
=
'*'
;
this
.
txtPwd
.
Size
=
new
System
.
Drawing
.
Size
(
215
,
33
);
this
.
txtPwd
.
Size
=
new
System
.
Drawing
.
Size
(
215
,
33
);
this
.
txtPwd
.
TabIndex
=
276
;
this
.
txtPwd
.
TabIndex
=
276
;
this
.
txtPwd
.
Text
=
"123456"
;
this
.
txtPwd
.
KeyDown
+=
new
System
.
Windows
.
Forms
.
KeyEventHandler
(
this
.
txtPwd_KeyDown
);
this
.
txtPwd
.
KeyDown
+=
new
System
.
Windows
.
Forms
.
KeyEventHandler
(
this
.
txtPwd_KeyDown
);
//
//
// FrmPwd
// FrmPwd
...
...
source/ACSingleStore/FrmPwd.cs
查看文件 @
ab49389
...
@@ -26,18 +26,23 @@ namespace OnlineStore.ACSingleStore
...
@@ -26,18 +26,23 @@ namespace OnlineStore.ACSingleStore
private
void
FrmPwd_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmPwd_Load
(
object
sender
,
EventArgs
e
)
{
{
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
);
if
(
string
.
IsNullOrEmpty
(
configPwd
))
{
this
.
DialogResult
=
DialogResult
.
OK
;
this
.
Close
();
}
}
}
private
void
btnNext_Click
(
object
sender
,
EventArgs
e
)
private
void
btnNext_Click
(
object
sender
,
EventArgs
e
)
{
{
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
(
configPwd
.
Equals
(
""
))
//
if (configPwd.Equals(""))
{
//
{
configPwd
=
"123456"
;
//
configPwd = "123456";
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
Config_Pwd
,
configPwd
);
//
ConfigAppSettings.SaveValue(Setting_Init.Config_Pwd,configPwd);
}
//
}
if
(
pwd
.
Equals
(
configPwd
))
if
(
pwd
.
Equals
(
configPwd
))
{
{
this
.
DialogResult
=
DialogResult
.
OK
;
this
.
DialogResult
=
DialogResult
.
OK
;
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
ab49389
...
@@ -1640,6 +1640,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -1640,6 +1640,7 @@ namespace OnlineStore.ACSingleStore
this
.
FormClosed
+=
new
System
.
Windows
.
Forms
.
FormClosedEventHandler
(
this
.
FrmStoreBox_FormClosed
);
this
.
FormClosed
+=
new
System
.
Windows
.
Forms
.
FormClosedEventHandler
(
this
.
FrmStoreBox_FormClosed
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmTest_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmTest_Load
);
this
.
Shown
+=
new
System
.
EventHandler
(
this
.
FrmStoreBox_Shown
);
this
.
Shown
+=
new
System
.
EventHandler
(
this
.
FrmStoreBox_Shown
);
this
.
Resize
+=
new
System
.
EventHandler
(
this
.
FrmStoreBox_Resize
);
this
.
contextMenuStrip1
.
ResumeLayout
(
false
);
this
.
contextMenuStrip1
.
ResumeLayout
(
false
);
this
.
tabControl2
.
ResumeLayout
(
false
);
this
.
tabControl2
.
ResumeLayout
(
false
);
this
.
tabPage4
.
ResumeLayout
(
false
);
this
.
tabPage4
.
ResumeLayout
(
false
);
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
ab49389
using
System
;
using
CodeLibrary
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Runtime.CompilerServices
;
using
System.Threading
;
using
System.IO
;
using
System.Runtime.InteropServices
;
using
OnlineStore.Common
;
using
System.Reflection
;
using
log4net
;
using
log4net
;
using
OnlineStore.Common
;
using
OnlineStore.DeviceLibrary
;
using
OnlineStore.DeviceLibrary
;
using
System.IO.Ports
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
CodeLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.Reflection
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
OnlineStore.ACSingleStore
namespace
OnlineStore.ACSingleStore
{
{
...
@@ -33,7 +24,8 @@ namespace OnlineStore.ACSingleStore
...
@@ -33,7 +24,8 @@ namespace OnlineStore.ACSingleStore
InitializeComponent
();
InitializeComponent
();
chbAuto
.
Checked
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
).
Equals
(
1
);
chbAuto
.
Checked
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
App_AutoRun
).
Equals
(
1
);
if
(
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
UseAirBlow
).
Equals
(-
1
))
{
if
(
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
UseAirBlow
).
Equals
(-
1
))
{
chbTH
.
Enabled
=
false
;
chbTH
.
Enabled
=
false
;
chbTH
.
Visible
=
false
;
chbTH
.
Visible
=
false
;
}
}
...
@@ -54,15 +46,17 @@ namespace OnlineStore.ACSingleStore
...
@@ -54,15 +46,17 @@ namespace OnlineStore.ACSingleStore
private
void
CodeManager_camera_event
(
object
sender
,
Bitmap
e
)
private
void
CodeManager_camera_event
(
object
sender
,
Bitmap
e
)
{
{
this
.
Invoke
((
EventHandler
<
Bitmap
>)
delegate
{
this
.
Invoke
((
EventHandler
<
Bitmap
>)
delegate
{
pictureBox2
.
Visible
=
true
;
pictureBox2
.
Visible
=
true
;
pictureBox2
.
Image
=
e
;
pictureBox2
.
Image
=
e
;
},
sender
,
e
);
},
sender
,
e
);
}
}
private
void
Camera_camera_event
(
object
sender
,
Bitmap
e
)
private
void
Camera_camera_event
(
object
sender
,
Bitmap
e
)
{
{
this
.
Invoke
((
EventHandler
<
Bitmap
>)
delegate
{
this
.
Invoke
((
EventHandler
<
Bitmap
>)
delegate
{
pictureBox1
.
Visible
=
true
;
pictureBox1
.
Visible
=
true
;
pictureBox1
.
Image
=
e
;
pictureBox1
.
Image
=
e
;
},
sender
,
e
);
},
sender
,
e
);
...
@@ -118,8 +112,9 @@ namespace OnlineStore.ACSingleStore
...
@@ -118,8 +112,9 @@ namespace OnlineStore.ACSingleStore
setAxisPopup
(
txtInOutP1
,
btnInOutP1
,
store
.
Config
.
InOut_Axis
);
setAxisPopup
(
txtInOutP1
,
btnInOutP1
,
store
.
Config
.
InOut_Axis
);
setAxisPopup
(
txtComP1
,
btnComP1
,
store
.
Config
.
Comp_Axis
);
setAxisPopup
(
txtComP1
,
btnComP1
,
store
.
Config
.
Comp_Axis
);
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
LogUtil
.
error
(
LOGGER
,
"加载界面出错"
+
ex
.
ToString
());
{
LogUtil
.
error
(
LOGGER
,
"加载界面出错"
+
ex
.
ToString
());
}
}
}
}
#
endregion
#
endregion
...
@@ -216,7 +211,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -216,7 +211,7 @@ namespace OnlineStore.ACSingleStore
LanguageProcess
();
LanguageProcess
();
LanguagePro
();
LanguagePro
();
bool
showLog
=
false
;
bool
showLog
=
false
;
if
(
showLog
)
if
(
showLog
)
{
{
richTextBox1
.
Visible
=
true
;
richTextBox1
.
Visible
=
true
;
...
@@ -225,7 +220,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -225,7 +220,7 @@ namespace OnlineStore.ACSingleStore
else
else
{
{
chbIsDebug
.
Checked
=
false
;
chbIsDebug
.
Checked
=
false
;
richTextBox1
.
Visible
=
false
;
richTextBox1
.
Visible
=
false
;
tabControl1
.
TabPages
.
Remove
(
tabPage3
);
tabControl1
.
TabPages
.
Remove
(
tabPage3
);
}
}
label_currentinfo
.
Visible
=
false
;
label_currentinfo
.
Visible
=
false
;
...
@@ -244,14 +239,16 @@ namespace OnlineStore.ACSingleStore
...
@@ -244,14 +239,16 @@ namespace OnlineStore.ACSingleStore
private
void
Store_plateinfochange
(
object
sender
,
string
e
)
private
void
Store_plateinfochange
(
object
sender
,
string
e
)
{
{
this
.
Invoke
((
EventHandler
<
string
>)
delegate
(
object
o
,
string
ee
)
{
this
.
Invoke
((
EventHandler
<
string
>)
delegate
(
object
o
,
string
ee
)
{
label_currentinfo
.
Text
=
ee
;
label_currentinfo
.
Text
=
ee
;
},
null
,
e
);
},
null
,
e
);
}
}
private
void
ResourceCulture_LanguageReload
(
object
sender
,
EventArgs
e
)
private
void
ResourceCulture_LanguageReload
(
object
sender
,
EventArgs
e
)
{
{
this
.
Invoke
((
EventHandler
)
delegate
{
this
.
Invoke
((
EventHandler
)
delegate
{
this
.
LanguageProcess
();
this
.
LanguageProcess
();
LanguagePro
();
LanguagePro
();
});
});
...
@@ -383,12 +380,13 @@ namespace OnlineStore.ACSingleStore
...
@@ -383,12 +380,13 @@ namespace OnlineStore.ACSingleStore
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
" "
+
rdooropen
;
lblWarnMsg
.
Text
=
lblWarnMsg
.
Text
+
" "
+
rdooropen
;
StoreManager
.
Store
.
SetWarnMsg
(
"右侧门未关"
,
"右侧门未关"
);
StoreManager
.
Store
.
SetWarnMsg
(
"右侧门未关"
,
"右侧门未关"
);
}
}
else
{
else
{
if
(
StoreManager
.
Store
.
WarnObj
.
MsgCode
.
IndexOf
(
"前门未关"
)
>=
0
)
if
(
StoreManager
.
Store
.
WarnObj
.
MsgCode
.
IndexOf
(
"前门未关"
)
>=
0
)
StoreManager
.
Store
.
SetWarnMsg
(
""
);
StoreManager
.
Store
.
SetWarnMsg
(
""
);
if
(
lblWarnMsg
.
Text
.
IndexOf
(
"前门未关"
)
>=
0
)
if
(
lblWarnMsg
.
Text
.
IndexOf
(
"前门未关"
)
>=
0
)
lblWarnMsg
.
Text
=
""
;
lblWarnMsg
.
Text
=
""
;
}
}
}
}
//如果不在出入库中,且叉子上有信号,需要提示检查叉子
//如果不在出入库中,且叉子上有信号,需要提示检查叉子
...
@@ -571,7 +569,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -571,7 +569,7 @@ namespace OnlineStore.ACSingleStore
private
void
btnOpenAutoInOut_Click
(
object
sender
,
EventArgs
e
)
private
void
btnOpenAutoInOut_Click
(
object
sender
,
EventArgs
e
)
{
{
FrmInOutStore
frmInOutStore
=
new
FrmInOutStore
(
store
);
FrmInOutStore
frmInOutStore
=
new
FrmInOutStore
(
store
);
if
(
frmInOutStore
.
ShowDialog
()
==
DialogResult
.
Yes
)
if
(
frmInOutStore
.
ShowDialog
()
==
DialogResult
.
Yes
)
{
{
frmInOutStore
=
null
;
frmInOutStore
=
null
;
}
}
...
@@ -611,7 +609,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -611,7 +609,7 @@ namespace OnlineStore.ACSingleStore
if
(
LogUtil
.
debug_opened
==
false
)
if
(
LogUtil
.
debug_opened
==
false
)
{
{
开启
DEBUGToolStripMenuItem
.
Text
=
ResourceCulture
.
GetString
(
"关闭DEBUG"
);
开启
DEBUGToolStripMenuItem
.
Text
=
ResourceCulture
.
GetString
(
"关闭DEBUG"
);
btnLogDebug
.
Text
=
ResourceCulture
.
GetString
(
"关闭DEBUG"
);
btnLogDebug
.
Text
=
ResourceCulture
.
GetString
(
"关闭DEBUG"
);
LogUtil
.
debug_opened
=
true
;
LogUtil
.
debug_opened
=
true
;
}
}
else
else
...
@@ -637,7 +635,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -637,7 +635,7 @@ namespace OnlineStore.ACSingleStore
private
void
扫码测试
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
private
void
扫码测试
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
{
IOManager
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
Camera_Led
,
IO_VALUE
.
HIGH
);
LogUtil
.
info
(
"isScannerRun:"
+
store
.
dlScanSocket
.
isScannerRun
);
LogUtil
.
info
(
"isScannerRun:"
+
store
.
dlScanSocket
.
isScannerRun
);
if
(
store
.
dlScanSocket
.
isScannerRun
)
if
(
store
.
dlScanSocket
.
isScannerRun
)
{
{
store
.
dlScanSocket
.
StartConnect
();
store
.
dlScanSocket
.
StartConnect
();
...
@@ -652,7 +650,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -652,7 +650,7 @@ namespace OnlineStore.ACSingleStore
}
}
//CodeResourceControl.OpenResourceLog = true;
//CodeResourceControl.OpenResourceLog = true;
CodeResourceControl
.
GetLanguageEvent
+=
()
=>
{
return
ResourceCulture
.
CurrLanguage
;
};
CodeResourceControl
.
GetLanguageEvent
+=
()
=>
{
return
ResourceCulture
.
CurrLanguage
;
};
CodeResourceControl
.
CurrLanguage
=
ResourceCulture
.
CurrLanguage
;
CodeResourceControl
.
CurrLanguage
=
ResourceCulture
.
CurrLanguage
;
CodeLibrary
.
FrmCodeDecode
frm
=
new
CodeLibrary
.
FrmCodeDecode
();
CodeLibrary
.
FrmCodeDecode
frm
=
new
CodeLibrary
.
FrmCodeDecode
();
frm
.
CurrLanguage
=
ResourceCulture
.
CurrLanguage
;
frm
.
CurrLanguage
=
ResourceCulture
.
CurrLanguage
;
frm
.
LanguageProcess
();
frm
.
LanguageProcess
();
...
@@ -778,13 +776,20 @@ namespace OnlineStore.ACSingleStore
...
@@ -778,13 +776,20 @@ namespace OnlineStore.ACSingleStore
{
{
try
try
{
{
FrmPwd
fw
=
new
FrmPwd
(
10
);
FrmPwd
fw
=
new
FrmPwd
(
10
);
DialogResult
result
=
fw
.
ShowDialog
();
DialogResult
result
=
fw
.
ShowDialog
(
this
);
if
(!
result
.
Equals
(
DialogResult
.
OK
))
if
(!
result
.
Equals
(
DialogResult
.
OK
))
{
{
this
.
WindowState
=
FormWindowState
.
Minimized
;
this
.
notifyIcon1
.
Visible
=
true
;
this
.
ShowInTaskbar
=
false
;
LogUtil
.
info
(
"切换界面显示时,没有正确输入密码"
);
LogUtil
.
info
(
"切换界面显示时,没有正确输入密码"
);
return
;
return
;
}
}
needpwd
=
false
;
this
.
Visible
=
true
;
this
.
Visible
=
true
;
this
.
WindowState
=
FormWindowState
.
Maximized
;
this
.
WindowState
=
FormWindowState
.
Maximized
;
this
.
notifyIcon1
.
Visible
=
false
;
this
.
notifyIcon1
.
Visible
=
false
;
...
@@ -1037,7 +1042,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -1037,7 +1042,7 @@ namespace OnlineStore.ACSingleStore
显示
ToolStripMenuItem
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
GetTextIdStr
(
class
Name
,
显示
ToolStripMenuItem
.
Name
),
显示
ToolStripMenuItem
.
Text
);
显示
ToolStripMenuItem
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
GetTextIdStr
(
class
Name
,
显示
ToolStripMenuItem
.
Name
),
显示
ToolStripMenuItem
.
Text
);
toolStripMenuItem1
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
GetTextIdStr
(
class
Name
,
toolStripMenuItem1
.
Name
),
toolStripMenuItem1
.
Text
);
toolStripMenuItem1
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
GetTextIdStr
(
class
Name
,
toolStripMenuItem1
.
Name
),
toolStripMenuItem1
.
Text
);
notifyIcon1
.
Text
=
this
.
Text
;
notifyIcon1
.
Text
=
this
.
Text
;
if
(
iodbgfrm
!=
null
)
if
(
iodbgfrm
!=
null
)
iodbgfrm
.
LoadIOList
();
iodbgfrm
.
LoadIOList
();
//if (CurrLanguage.Equals(ResourceCulture.China))
//if (CurrLanguage.Equals(ResourceCulture.China))
//{
//{
...
@@ -1090,7 +1095,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -1090,7 +1095,7 @@ namespace OnlineStore.ACSingleStore
private
void
btnHul_Click
(
object
sender
,
EventArgs
e
)
private
void
btnHul_Click
(
object
sender
,
EventArgs
e
)
{
{
LogUtil
.
info
(
"用户点击:"
+
btnHul
.
Text
);
LogUtil
.
info
(
"用户点击:"
+
btnHul
.
Text
);
bool
result
=
store
.
BtnNextPro
();
bool
result
=
store
.
BtnNextPro
();
btnHul
.
Visible
=
store
.
NeedShowBtn
();
btnHul
.
Visible
=
store
.
NeedShowBtn
();
}
}
...
@@ -1130,13 +1135,14 @@ namespace OnlineStore.ACSingleStore
...
@@ -1130,13 +1135,14 @@ namespace OnlineStore.ACSingleStore
}
}
//软件启动1分钟内,点击气压检测选框10次,永久屏蔽气压检测
//软件启动1分钟内,点击气压检测选框10次,永久屏蔽气压检测
int
thclickcount
=
0
;
int
thclickcount
=
0
;
private
void
chbTH_CheckedChanged
(
object
sender
,
EventArgs
e
)
private
void
chbTH_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
{
if
((
DateTime
.
Now
-
StartTime
).
TotalSeconds
<
70
)
if
((
DateTime
.
Now
-
StartTime
).
TotalSeconds
<
70
)
{
{
thclickcount
++;
thclickcount
++;
if
(
thclickcount
>
10
)
{
if
(
thclickcount
>
10
)
{
MessageBox
.
Show
(
"气压检测已被屏蔽!"
);
MessageBox
.
Show
(
"气压检测已被屏蔽!"
);
chbTH
.
Enabled
=
false
;
chbTH
.
Enabled
=
false
;
chbTH
.
Visible
=
false
;
chbTH
.
Visible
=
false
;
...
@@ -1163,5 +1169,20 @@ namespace OnlineStore.ACSingleStore
...
@@ -1163,5 +1169,20 @@ namespace OnlineStore.ACSingleStore
LogUtil
.
info
(
"勾选:禁用吹气报警"
);
LogUtil
.
info
(
"勾选:禁用吹气报警"
);
}
}
}
}
bool
needpwd
=
false
;
private
void
FrmStoreBox_Resize
(
object
sender
,
EventArgs
e
)
{
if
(
this
.
WindowState
==
FormWindowState
.
Minimized
)
{
needpwd
=
true
;
return
;
}
if
(!
needpwd
)
return
;
if
(
this
.
WindowState
==
FormWindowState
.
Normal
||
this
.
WindowState
==
FormWindowState
.
Maximized
)
{
显示
ToolStripMenuItem_Click
(
this
,
EventArgs
.
Empty
);
}
}
}
}
}
}
source/ACSingleStore/Program.cs
查看文件 @
ab49389
...
@@ -83,7 +83,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -83,7 +83,7 @@ namespace OnlineStore.ACSingleStore
formhwnd
=
FindWindow
(
null
,
formTitle
);
formhwnd
=
FindWindow
(
null
,
formTitle
);
// 重新显示该窗体并切换到带入到前台
// 重新显示该窗体并切换到带入到前台
ShowWindow
(
formhwnd
,
SW_RESTORE
);
ShowWindow
(
formhwnd
,
SW_RESTORE
);
SwitchToThisWindow
(
formhwnd
,
true
);
//
SwitchToThisWindow(formhwnd, true);
isShow
=
true
;
isShow
=
true
;
break
;
break
;
}
}
...
...
source/ACSingleStore/Properties/AssemblyInfo.cs
查看文件 @
ab49389
...
@@ -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
4908122be5f3e7e6f5e9f44a28ab562549b45d2c
")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore
026fb23c8d6a3c677432a5f7ceefa5e2aa659fde
")]
[assembly: AssemblyCopyright("Copyright ? 2017")]
[assembly: AssemblyCopyright("Copyright ? 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyCulture("")]
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean_ADIO.cs
查看文件 @
ab49389
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Diagnostics.Eventing.Reader
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
...
@@ -49,7 +50,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -49,7 +50,9 @@ namespace OnlineStore.DeviceLibrary
if
(
Ultrasonic1
!=
null
)
if
(
Ultrasonic1
!=
null
)
{
{
lock
(
Ultrasonic1
)
{
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
vv
=
xx
>=
4
?
IO_VALUE
.
HIGH
:
IO_VALUE
.
LOW
;
var
Filter
=
vv
;
var
Filter
=
vv
;
if
(
vv
!=
Last_TrayCheck_Door
)
if
(
vv
!=
Last_TrayCheck_Door
)
...
@@ -63,7 +66,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -63,7 +66,9 @@ namespace OnlineStore.DeviceLibrary
if
(
Ultrasonic2
!=
null
)
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
;
var
v2
=
x2
>=
4
?
IO_VALUE
.
HIGH
:
IO_VALUE
.
LOW
;
if
(
v2
==
IO_VALUE
.
HIGH
)
if
(
v2
==
IO_VALUE
.
HIGH
)
Filter
=
IO_VALUE
.
HIGH
;
Filter
=
IO_VALUE
.
HIGH
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论