Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
RC1271-DUOStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 510c7411
由
LN
编写于
2020-09-03 10:41:09 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
cecaecce
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
73 行增加
和
22 行删除
source/DUOStore/DUOStore.csproj
source/DUOStore/FrmStore.Designer.cs
source/DUOStore/FrmStore.cs
source/DeviceLibrary/duoStore/BoxBean.cs
source/DeviceLibrary/store/KTK_Store.cs
source/DUOStore/DUOStore.csproj
查看文件 @
510c741
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
</Reference>
</Reference>
<Reference Include="System" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data.DataSetExtensions" />
...
...
source/DUOStore/FrmStore.Designer.cs
查看文件 @
510c741
...
@@ -72,6 +72,7 @@
...
@@ -72,6 +72,7 @@
this
.
toolStripSeparator8
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator8
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
...
@@ -113,6 +114,7 @@
...
@@ -113,6 +114,7 @@
//
//
this
.
panel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
this
.
panel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
panel1
.
Controls
.
Add
(
this
.
button1
);
this
.
panel1
.
Controls
.
Add
(
this
.
chbInstoreEnd
);
this
.
panel1
.
Controls
.
Add
(
this
.
chbInstoreEnd
);
this
.
panel1
.
Controls
.
Add
(
this
.
chkDebug
);
this
.
panel1
.
Controls
.
Add
(
this
.
chkDebug
);
this
.
panel1
.
Controls
.
Add
(
this
.
lblMoveInfo
);
this
.
panel1
.
Controls
.
Add
(
this
.
lblMoveInfo
);
...
@@ -475,6 +477,19 @@
...
@@ -475,6 +477,19 @@
this
.
timer1
.
Interval
=
1000
;
this
.
timer1
.
Interval
=
1000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
//
// button1
//
this
.
button1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
button1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button1
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
490
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
35
);
this
.
button1
.
TabIndex
=
272
;
this
.
button1
.
Text
=
"测试"
;
this
.
button1
.
UseVisualStyleBackColor
=
false
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click
);
//
// FrmStore
// FrmStore
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
@@ -551,6 +566,7 @@
...
@@ -551,6 +566,7 @@
private
System
.
Windows
.
Forms
.
Label
lblMoveInfo
;
private
System
.
Windows
.
Forms
.
Label
lblMoveInfo
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
CheckBox
chbInstoreEnd
;
private
System
.
Windows
.
Forms
.
CheckBox
chbInstoreEnd
;
private
System
.
Windows
.
Forms
.
Button
button1
;
}
}
}
}
source/DUOStore/FrmStore.cs
查看文件 @
510c741
...
@@ -11,6 +11,7 @@ using System.Data;
...
@@ -11,6 +11,7 @@ using System.Data;
using
System.Diagnostics
;
using
System.Diagnostics
;
using
System.Drawing
;
using
System.Drawing
;
using
System.Linq
;
using
System.Linq
;
using
System.Net.Http
;
using
System.Reflection
;
using
System.Reflection
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
...
@@ -708,5 +709,41 @@ namespace OnlineStore.DUOStore
...
@@ -708,5 +709,41 @@ namespace OnlineStore.DUOStore
LogUtil
.
info
(
store
.
Name
+
" 切换 入库完成送出料架="
+
store
.
OutstoreEndSendShelf
);
LogUtil
.
info
(
store
.
Name
+
" 切换 入库完成送出料架="
+
store
.
OutstoreEndSendShelf
);
}
}
private
async
void
button1_Click
(
object
sender
,
EventArgs
e
)
{
int
contentLength
=
await
AccessTheWebAsync
();
this
.
logBox
.
Text
+=
$
"\r\nLength of the downloaded string: {contentLength}.\r\n"
;
}
async
Task
<
int
>
AccessTheWebAsync
()
{
// You need to add a reference to System.Net.Http to declare client.
var
client
=
new
HttpClient
();
// GetStringAsync returns a Task<string>. That means that when you await the
// task you'll get a string (urlContents).
Task
<
string
>
getStringTask
=
client
.
GetStringAsync
(
"https://docs.microsoft.com/dotnet"
);
// You can do work here that doesn't rely on the string from GetStringAsync.
DoIndependentWork
();
// The await operator suspends AccessTheWebAsync.
// - AccessTheWebAsync can't continue until getStringTask is complete.
// - Meanwhile, control returns to the caller of AccessTheWebAsync.
// - Control resumes here when getStringTask is complete.
// - The await operator then retrieves the string result from getStringTask.
string
urlContents
=
await
getStringTask
;
// The return statement specifies an integer result.
// Any methods that are awaiting AccessTheWebAsync retrieve the length value.
return
urlContents
.
Length
;
}
private
void
DoIndependentWork
()
{
Console
.
WriteLine
(
"Working ... .... "
);
this
.
logBox
.
Text
+=
$
"\r\nWorking ... .... .\r\n"
;
}
}
}
}
}
source/DeviceLibrary/duoStore/BoxBean.cs
查看文件 @
510c741
...
@@ -76,7 +76,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -76,7 +76,7 @@ namespace OnlineStore.DeviceLibrary
//判断急停
//判断急停
if
(
runStatus
>=
StoreRunStatus
.
HomeMoving
)
if
(
runStatus
>=
StoreRunStatus
.
HomeMoving
)
{
{
if
(
IO
Value
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IO
Manager
.
IOValue
(
IO_Type
.
SuddenStop_BTN
,
0
).
Equals
(
IO_VALUE
.
LOW
))
{
{
if
(
isInSuddenDown
.
Equals
(
false
))
if
(
isInSuddenDown
.
Equals
(
false
))
{
{
...
@@ -113,12 +113,21 @@ namespace OnlineStore.DeviceLibrary
...
@@ -113,12 +113,21 @@ namespace OnlineStore.DeviceLibrary
AutoInout
.
StopAuto
();
AutoInout
.
StopAuto
();
mainTimer
.
Enabled
=
false
;
mainTimer
.
Enabled
=
false
;
alarmType
=
AlarmType
.
None
;
alarmType
=
AlarmType
.
None
;
//急停按钮和气压检测需要一起判断
if
(
IOManager
.
IOValue
(
IO_Type
.
SuddenStop_BTN
,
0
).
Equals
(
IO_VALUE
.
LOW
))
IO_VALUE
suddenBtn
=
IOValue
(
IO_Type
.
SuddenStop_BTN
);
{
IO_VALUE
airCheck
=
IOValue
(
IO_Type
.
Airpressure_Check
);
WarnMsg
=
"启动失败:急停没开"
;
LogUtil
.
error
(
" ("
+
Name
+
")启动失败:急停没开!"
);
if
(
suddenBtn
.
Equals
(
IO_VALUE
.
HIGH
)
&&
(
airCheck
.
Equals
(
IO_VALUE
.
HIGH
)))
return
false
;
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
Airpressure_Check
,
0
).
Equals
(
IO_VALUE
.
LOW
))
{
WarnMsg
=
"启动失败:没有气压信号"
;
LogUtil
.
error
(
" ("
+
Name
+
")启动失败:没有气压信号!"
);
return
false
;
}
else
//if (suddenBtn.Equals(IO_VALUE.HIGH) && (airCheck.Equals(IO_VALUE.HIGH)))
{
{
//lastAirValue = airCheck;
//lastAirValue = airCheck;
lastAirCloseTime
=
DateTime
.
Now
;
lastAirCloseTime
=
DateTime
.
Now
;
...
@@ -141,20 +150,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -141,20 +150,7 @@ namespace OnlineStore.DeviceLibrary
return
true
;
return
true
;
}
}
else
{
if
(
suddenBtn
.
Equals
(
IO_VALUE
.
LOW
))
{
WarnMsg
=
"启动失败:急停没开"
;
LogUtil
.
error
(
" ("
+
Name
+
")启动失败:急停没开!"
);
}
else
{
WarnMsg
=
"启动失败:没有气压信号"
;
LogUtil
.
error
(
" ("
+
Name
+
")启动失败:没有气压信号!"
);
}
return
false
;
}
}
}
...
...
source/DeviceLibrary/store/KTK_Store.cs
查看文件 @
510c741
...
@@ -379,7 +379,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -379,7 +379,8 @@ namespace OnlineStore.DeviceLibrary
public
IO_VALUE
IOValue
(
string
IoType
)
public
IO_VALUE
IOValue
(
string
IoType
)
{
{
return
IOManager
.
IOValue
(
IoType
,
baseConfig
.
Id
);
return
IOManager
.
IOValue
(
IoType
,
baseConfig
.
Id
);
}
}
protected
bool
WaitIo
(
string
ioType
,
IO_VALUE
value
,
int
timeOut
,
string
errName
=
""
)
protected
bool
WaitIo
(
string
ioType
,
IO_VALUE
value
,
int
timeOut
,
string
errName
=
""
)
{
{
return
WaitUtil
.
Wait
(
timeOut
,
delegate
()
{
return
WaitUtil
.
Wait
(
timeOut
,
delegate
()
{
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论