Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 66887678
由
LN
编写于
2019-08-14 09:38:59 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加调试切换功能
1 个父辈
203ba6e5
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
34 行增加
和
13 行删除
source/ACSingleStore/App.config
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/DeviceLibrary/lineConnect/LineConnect.cs
source/ACSingleStore/App.config
查看文件 @
6688767
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<
add
key
=
"HumitureControllerType"
value
=
"0"
/>
<
add
key
=
"HumitureControllerType"
value
=
"0"
/>
<
add
key
=
"UseAIOBOX"
value
=
"1"
/>
<
add
key
=
"UseAIOBOX"
value
=
"1"
/>
<!--流水线地址和端口配置-->
<!--流水线地址和端口配置-->
<
add
key
=
"LineServerIp"
value
=
"192.168.1.11
0
"
/>
<
add
key
=
"LineServerIp"
value
=
"192.168.1.11
3
"
/>
<
add
key
=
"LineServerPort"
value
=
"5246"
/>
<
add
key
=
"LineServerPort"
value
=
"5246"
/>
<!--是否调试状态-->
<!--是否调试状态-->
<
add
key
=
"IsInDebug"
value
=
"1"
/>
<
add
key
=
"IsInDebug"
value
=
"1"
/>
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
6688767
...
@@ -794,9 +794,9 @@
...
@@ -794,9 +794,9 @@
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
richTextBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
richTextBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
richTextBox1
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
9
);
this
.
richTextBox1
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
9
2
);
this
.
richTextBox1
.
Name
=
"richTextBox1"
;
this
.
richTextBox1
.
Name
=
"richTextBox1"
;
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
545
,
536
);
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
545
,
453
);
this
.
richTextBox1
.
TabIndex
=
256
;
this
.
richTextBox1
.
TabIndex
=
256
;
this
.
richTextBox1
.
Text
=
""
;
this
.
richTextBox1
.
Text
=
""
;
//
//
...
@@ -2048,6 +2048,7 @@
...
@@ -2048,6 +2048,7 @@
//
//
// tabPage3
// tabPage3
//
//
this
.
tabPage3
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnClearLog
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnClearLog
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnCloseDoor
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnCloseDoor
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnOpenDoor
);
this
.
tabPage3
.
Controls
.
Add
(
this
.
btnOpenDoor
);
...
@@ -2097,7 +2098,6 @@
...
@@ -2097,7 +2098,6 @@
//
//
// tabPage2
// tabPage2
//
//
this
.
tabPage2
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
tabPage2
.
Controls
.
Add
(
this
.
groupBox7
);
this
.
tabPage2
.
Controls
.
Add
(
this
.
groupBox7
);
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
29
);
this
.
tabPage2
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
29
);
this
.
tabPage2
.
Name
=
"tabPage2"
;
this
.
tabPage2
.
Name
=
"tabPage2"
;
...
@@ -2112,16 +2112,16 @@
...
@@ -2112,16 +2112,16 @@
this
.
groupBox2
.
Controls
.
Add
(
this
.
button6
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
button6
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
button3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
button3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
button5
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
button5
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
11
,
179
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
8
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
5
34
,
104
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
5
45
,
78
);
this
.
groupBox2
.
TabIndex
=
276
;
this
.
groupBox2
.
TabIndex
=
276
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"流水线通信测试"
;
this
.
groupBox2
.
Text
=
"流水线通信测试"
;
//
//
// button6
// button6
//
//
this
.
button6
.
Location
=
new
System
.
Drawing
.
Point
(
317
,
43
);
this
.
button6
.
Location
=
new
System
.
Drawing
.
Point
(
317
,
32
);
this
.
button6
.
Name
=
"button6"
;
this
.
button6
.
Name
=
"button6"
;
this
.
button6
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
33
);
this
.
button6
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
33
);
this
.
button6
.
TabIndex
=
275
;
this
.
button6
.
TabIndex
=
275
;
...
@@ -2131,7 +2131,7 @@
...
@@ -2131,7 +2131,7 @@
//
//
// button3
// button3
//
//
this
.
button3
.
Location
=
new
System
.
Drawing
.
Point
(
64
,
42
);
this
.
button3
.
Location
=
new
System
.
Drawing
.
Point
(
64
,
31
);
this
.
button3
.
Name
=
"button3"
;
this
.
button3
.
Name
=
"button3"
;
this
.
button3
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
33
);
this
.
button3
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
33
);
this
.
button3
.
TabIndex
=
273
;
this
.
button3
.
TabIndex
=
273
;
...
@@ -2141,7 +2141,7 @@
...
@@ -2141,7 +2141,7 @@
//
//
// button5
// button5
//
//
this
.
button5
.
Location
=
new
System
.
Drawing
.
Point
(
193
,
43
);
this
.
button5
.
Location
=
new
System
.
Drawing
.
Point
(
193
,
32
);
this
.
button5
.
Name
=
"button5"
;
this
.
button5
.
Name
=
"button5"
;
this
.
button5
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
33
);
this
.
button5
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
33
);
this
.
button5
.
TabIndex
=
274
;
this
.
button5
.
TabIndex
=
274
;
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
6688767
...
@@ -170,7 +170,14 @@ namespace OnlineStore.ACSingleStore
...
@@ -170,7 +170,14 @@ namespace OnlineStore.ACSingleStore
if
(!
this
.
Visible
)
if
(!
this
.
Visible
)
{
{
return
;
return
;
}
}
if
(
chbDebug
.
Checked
.
Equals
(
store
.
IsDebug
).
Equals
(
false
))
{
LoadOk
=
false
;
chbDebug
.
Checked
=
store
.
IsDebug
;
LoadOk
=
true
;
}
lblTemp
.
Text
=
store
.
currTempStr
;
lblTemp
.
Text
=
store
.
currTempStr
;
lblMoveEquipInfo
.
Text
=
"移栽状态:"
+(
LineConnect
.
CanStartOut
()
?
"可出库"
:
"不可出库"
)+
" "
+
LineConnect
.
LastUpdateTime
.
ToLongTimeString
()
;
lblMoveEquipInfo
.
Text
=
"移栽状态:"
+(
LineConnect
.
CanStartOut
()
?
"可出库"
:
"不可出库"
)+
" "
+
LineConnect
.
LastUpdateTime
.
ToLongTimeString
()
;
//忙碌状态不读取状态
//忙碌状态不读取状态
...
@@ -1351,7 +1358,12 @@ namespace OnlineStore.ACSingleStore
...
@@ -1351,7 +1358,12 @@ namespace OnlineStore.ACSingleStore
private
void
button6_Click
(
object
sender
,
EventArgs
e
)
private
void
button6_Click
(
object
sender
,
EventArgs
e
)
{
{
int
hasTray
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
);
int
hasTray
=
(
int
)
IOManager
.
IOValue
(
IO_Type
.
TrayCheck_Door
);
LineConnect
.
SendHeart
(
StoreManager
.
Config
.
Id
,
StoreManager
.
Config
.
CID
,
(
int
)
StoreStatus
.
StoreOnline
,
(
int
)
StoreRunStatus
.
Runing
,
hasTray
,(
int
)
StoreAlarmType
.
None
);
StoreStatus
ss
=
StoreStatus
.
StoreOnline
;
if
(
store
.
IsDebug
)
{
ss
=
StoreStatus
.
Debugging
;
}
LineConnect
.
SendHeart
(
StoreManager
.
Config
.
Id
,
StoreManager
.
Config
.
CID
,
(
int
)
ss
,
(
int
)
StoreRunStatus
.
Runing
,
hasTray
,(
int
)
StoreAlarmType
.
None
);
}
}
private
void
chbDebug_CheckedChanged
(
object
sender
,
EventArgs
e
)
private
void
chbDebug_CheckedChanged
(
object
sender
,
EventArgs
e
)
...
...
source/DeviceLibrary/lineConnect/LineConnect.cs
查看文件 @
6688767
...
@@ -128,8 +128,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -128,8 +128,16 @@ namespace OnlineStore.DeviceLibrary
string
plateH
=
msgArray
[
3
];
string
plateH
=
msgArray
[
3
];
string
plateW
=
msgArray
[
4
];
string
plateW
=
msgArray
[
4
];
string
code
=
msgArray
[
5
];
string
code
=
msgArray
[
5
];
StoreManager
.
Store
.
ReviceLineInStoreCMD
(
posId
,
plateH
,
plateW
,
code
);
StoreManager
.
Store
.
ReviceLineInStoreCMD
(
posId
,
plateH
,
plateW
,
code
);
}
else
if
(
cmd
.
Equals
(
cmd_updateDebug
))
{
int
isDebug
=
Convert
.
ToInt32
(
msgArray
[
2
]);
LogUtil
.
info
(
"收到流水线更改调试状态="
+
isDebug
);
StoreManager
.
Store
.
IsDebug
=
isDebug
.
Equals
(
1
)
?
true
:
false
;
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
IsInDebug
,
isDebug
);
LogUtil
.
info
(
"切换调试状态= "
+
isDebug
+
";"
);
}
}
else
else
{
{
...
@@ -139,13 +147,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -139,13 +147,14 @@ namespace OnlineStore.DeviceLibrary
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
LogUtil
.
error
(
"处理流水线消息出错:"
+
message
);
LogUtil
.
error
(
"处理流水线消息出错:"
+
message
);
}
}
}
}
public
static
char
cmd_spilt
=
';'
;
public
static
char
cmd_spilt
=
';'
;
private
static
string
cmd_heart
=
"heart"
;
private
static
string
cmd_heart
=
"heart"
;
private
static
string
cmd_outend
=
"outend"
;
private
static
string
cmd_outend
=
"outend"
;
private
static
string
cmd_startIn
=
"starIn"
;
private
static
string
cmd_startIn
=
"starIn"
;
private
static
string
cmd_updateDebug
=
"updateDebug"
;
private
static
bool
CanOutStore
=
false
;
private
static
bool
CanOutStore
=
false
;
public
static
DateTime
LastUpdateTime
=
new
DateTime
(
0
);
public
static
DateTime
LastUpdateTime
=
new
DateTime
(
0
);
public
static
bool
IsConnect
()
public
static
bool
IsConnect
()
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论