Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO20242OutBound
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5ebcd274
由
LN
编写于
2024-01-26 13:37:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug修改。界面提示文字停留2分钟
1 个父辈
99485715
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
155 行增加
和
18 行删除
DeviceLibrary/DeviceLibrary/ReelParam.cs
DeviceLibrary/theMachine/OutShelfBean.cs
SharedDLL/CodeLibrary.dll
TheMachine/FormMain.cs
TheMachine/Program.cs
TheMachine/SettingControl.Designer.cs
TheMachine/SettingControl.cs
DeviceLibrary/DeviceLibrary/ReelParam.cs
查看文件 @
5ebcd27
...
@@ -26,8 +26,15 @@ public class ReelParam
...
@@ -26,8 +26,15 @@ public class ReelParam
TargetOutShelf
=
posArray
[
0
];
TargetOutShelf
=
posArray
[
0
];
if
(
TargetOutShelf
!=
"NG"
)
if
(
TargetOutShelf
!=
"NG"
)
{
{
if
(
posArray
[
1
].
StartsWith
(
"B"
))
{
TargetLoc
=
26
+
posArray
[
posArray
.
Length
-
1
];
}
else
{
//取最后一位
//取最后一位
TargetLoc
=
posArray
[
posArray
.
Length
-
1
];
TargetLoc
=
posArray
[
posArray
.
Length
-
1
];
}
}
}
}
}
}
}
...
...
DeviceLibrary/theMachine/OutShelfBean.cs
查看文件 @
5ebcd27
...
@@ -194,6 +194,7 @@ namespace DeviceLibrary
...
@@ -194,6 +194,7 @@ namespace DeviceLibrary
//CurrShelf.IsNeedLeave = true;
//CurrShelf.IsNeedLeave = true;
//当前工单任务已完成,直接送料架离开
//当前工单任务已完成,直接送料架离开
MoveInfo
.
log
(
"放料完成 ,设置CurrShelf.IsBusy = false,当前工单任务已完成,剩余空位=0,料架需要离开:"
+
taskInfo
.
ToStr
());
MoveInfo
.
log
(
"放料完成 ,设置CurrShelf.IsBusy = false,当前工单任务已完成,剩余空位=0,料架需要离开:"
+
taskInfo
.
ToStr
());
CurrShelf
.
EmptyPos
=
taskInfo
.
smallEmpty
+
taskInfo
.
bigEmpty
;
S21_ShelfNeedLeave
(
"剩余空位=0"
);
S21_ShelfNeedLeave
(
"剩余空位=0"
);
}
}
else
else
...
...
SharedDLL/CodeLibrary.dll
查看文件 @
5ebcd27
此文件类型无法预览
TheMachine/FormMain.cs
查看文件 @
5ebcd27
...
@@ -404,23 +404,74 @@ namespace TheMachine
...
@@ -404,23 +404,74 @@ namespace TheMachine
}
}
}
}
private
List
<
Msg
>
allMsgList
=
new
List
<
Msg
>();
void
SetMsg
(
List
<
Msg
>
msgs
)
void
SetMsg
(
List
<
Msg
>
msgs
)
{
{
if
(
msgs
==
null
||
msgs
.
Count
<=
0
)
{
if
(
allMsgList
.
Count
<=
0
)
{
return
;
}
msgs
=
new
List
<
Msg
>();
}
this
.
SuspendLayout
();
this
.
SuspendLayout
();
listView1
.
Items
.
Clear
();
listView1
.
Items
.
Clear
();
msgs
.
Sort
((
a
,
b
)
=>
msgs
.
Sort
((
a
,
b
)
=>
{
{
if
(
a
.
msgLevel
==
b
.
msgLevel
)
return
0
;
if
(
a
.
msgLevel
==
MsgLevel
.
alarm
)
if
(
a
.
msgLevel
==
MsgLevel
.
alarm
)
return
-
1
;
return
-
1
;
if
(
a
.
msgLevel
!=
MsgLevel
.
info
)
if
(
b
.
msgLevel
==
MsgLevel
.
alarm
)
return
-
1
;
return
1
;
if
(
a
.
msgLevel
==
MsgLevel
.
warning
)
return
b
.
msgLevel
==
MsgLevel
.
info
?
-
1
:
-
1
;
if
(
a
.
msgLevel
==
MsgLevel
.
info
)
return
1
;
return
0
;
return
0
;
});
});
foreach
(
Msg
msg
in
msgs
)
try
{
allMsgList
.
AddRange
(
msgs
);
int
maxCount
=
5
;
if
(
msgs
.
Count
>
maxCount
)
{
{
if
(
string
.
IsNullOrEmpty
(
msg
.
msgtxt
)
||
msg
.
datetime
==
null
)
maxCount
=
msgs
.
Count
;
}
if
(
allMsgList
.
Count
>
maxCount
)
{
allMsgList
.
RemoveRange
(
0
,
allMsgList
.
Count
-
maxCount
);
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
" SetMsg 出错:"
+
ex
.
ToString
());
allMsgList
=
new
List
<
Msg
>(
msgs
);
}
foreach
(
Msg
msg
in
allMsgList
)
{
if
(
string
.
IsNullOrEmpty
(
msg
.
msgtxt
)
||
msg
.
datetime
==
null
)
continue
;
continue
;
List
<
Msg
>
lists
=
(
from
m
in
msgs
where
m
.
msgtxt
.
Equals
(
msg
.
msgtxt
)
select
m
).
ToList
();
if
(
lists
.
Count
<=
0
&&
msg
.
msgLevel
!=
MsgLevel
.
info
)
{
//如果已经超时2分钟,不显示
TimeSpan
span
=
DateTime
.
Now
-
msg
.
datetime
;
if
(
span
.
TotalMinutes
>
2
)
{
continue
;
}
}
ListViewItem
lvi
=
new
ListViewItem
(
new
string
[]
{
""
,
msg
.
datetime
.
ToString
(),
msg
.
msgtxt
});
ListViewItem
lvi
=
new
ListViewItem
(
new
string
[]
{
""
,
msg
.
datetime
.
ToString
(),
msg
.
msgtxt
});
if
(
msg
.
msgLevel
==
MsgLevel
.
info
)
if
(
msg
.
msgLevel
==
MsgLevel
.
info
)
lvi
.
ForeColor
=
Color
.
DarkGreen
;
lvi
.
ForeColor
=
Color
.
DarkGreen
;
...
@@ -431,11 +482,48 @@ namespace TheMachine
...
@@ -431,11 +482,48 @@ namespace TheMachine
if
(
msg
.
errInfo
==
ErrInfo
.
X09_BoxNotDetect
)
if
(
msg
.
errInfo
==
ErrInfo
.
X09_BoxNotDetect
)
{
{
btn_IgnoreX09
.
Visible
=
true
;
btn_IgnoreX09
.
Visible
=
true
;
}
else
if
(
msg
.
errInfo
==
ErrInfo
.
X09_Clear
)
}
else
if
(
msg
.
errInfo
==
ErrInfo
.
X09_Clear
)
{
{
btn_IgnoreX09
.
Visible
=
false
;
btn_IgnoreX09
.
Visible
=
false
;
}
}
////查询是否是最新消息
//if (lists.Count > 0)
//{
// if (msg.errInfo == ErrInfo.RunBtn || msg.errInfo == ErrInfo.ResetBtn)
// {
// Task.Run(() =>
// {
// if (!RobotManage.isRunning)
// {
// LogUtil.info("Task.Run");
// this.Invoke((EventHandler)delegate
// {
// LogUtil.info("Invoke((EventHandler)delegate");
// btn_run_Click(this, EventArgs.Empty);
// });
// }
// });
// }
// else if (msg.errInfo == ErrInfo.SuddenStop)
// {
// Task.Run(() =>
// {
// if (RobotManage.isRunning)
// this.Invoke((EventHandler)delegate
// {
// btn_stop_Click(this, EventArgs.Empty);
// });
// });
// }
//}
}
}
this
.
ResumeLayout
(
true
);
this
.
ResumeLayout
(
true
);
}
}
...
...
TheMachine/Program.cs
查看文件 @
5ebcd27
...
@@ -71,7 +71,7 @@ namespace TheMachine
...
@@ -71,7 +71,7 @@ namespace TheMachine
static
void
Application_ThreadException
(
object
sender
,
System
.
Threading
.
ThreadExceptionEventArgs
e
)
static
void
Application_ThreadException
(
object
sender
,
System
.
Threading
.
ThreadExceptionEventArgs
e
)
{
{
LogUnhandledException
(
"Application_ThreadException"
,
e
.
ToString
()
+
""
+
e
.
Exception
.
ToString
()
+
" "
);
LogUnhandledException
(
"Application_ThreadException"
,
e
.
Exception
.
ToString
()
+
""
+
e
.
Exception
.
ToString
()
+
" "
);
}
}
static
void
LogUnhandledException
(
string
type
,
string
exceptionobj
)
static
void
LogUnhandledException
(
string
type
,
string
exceptionobj
)
{
{
...
...
TheMachine/SettingControl.Designer.cs
查看文件 @
5ebcd27
...
@@ -33,12 +33,14 @@ namespace TheMachine
...
@@ -33,12 +33,14 @@ namespace TheMachine
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabControl1
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabPage_set
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
tabPage_set
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
group
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
group
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
button_Clear
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label_newpwd
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label_newpwd
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label_oldpwd
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label_oldpwd
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtRfid
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtRfid
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtOrderNo
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtOrderNo
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
button_Clear
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
uC_SetUserPassword1
=
new
TheMachine
.
UC_SetUserPassword
();
this
.
uC_SetUserPassword1
=
new
TheMachine
.
UC_SetUserPassword
();
this
.
btnClearPN
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage_set
.
SuspendLayout
();
this
.
tabPage_set
.
SuspendLayout
();
this
.
group
.
SuspendLayout
();
this
.
group
.
SuspendLayout
();
...
@@ -80,6 +82,8 @@ namespace TheMachine
...
@@ -80,6 +82,8 @@ namespace TheMachine
//
//
// group
// group
//
//
this
.
group
.
Controls
.
Add
(
this
.
button2
);
this
.
group
.
Controls
.
Add
(
this
.
btnClearPN
);
this
.
group
.
Controls
.
Add
(
this
.
button_Clear
);
this
.
group
.
Controls
.
Add
(
this
.
button_Clear
);
this
.
group
.
Controls
.
Add
(
this
.
label_newpwd
);
this
.
group
.
Controls
.
Add
(
this
.
label_newpwd
);
this
.
group
.
Controls
.
Add
(
this
.
label_oldpwd
);
this
.
group
.
Controls
.
Add
(
this
.
label_oldpwd
);
...
@@ -93,6 +97,16 @@ namespace TheMachine
...
@@ -93,6 +97,16 @@ namespace TheMachine
this
.
group
.
TabStop
=
false
;
this
.
group
.
TabStop
=
false
;
this
.
group
.
Text
=
"清空料架"
;
this
.
group
.
Text
=
"清空料架"
;
//
//
// button_Clear
//
this
.
button_Clear
.
Location
=
new
System
.
Drawing
.
Point
(
152
,
152
);
this
.
button_Clear
.
Name
=
"button_Clear"
;
this
.
button_Clear
.
Size
=
new
System
.
Drawing
.
Size
(
119
,
33
);
this
.
button_Clear
.
TabIndex
=
6
;
this
.
button_Clear
.
Text
=
"清理料架"
;
this
.
button_Clear
.
UseVisualStyleBackColor
=
true
;
this
.
button_Clear
.
Click
+=
new
System
.
EventHandler
(
this
.
button_Clear_Click
);
//
// label_newpwd
// label_newpwd
//
//
this
.
label_newpwd
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
94
);
this
.
label_newpwd
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
94
);
...
@@ -129,16 +143,6 @@ namespace TheMachine
...
@@ -129,16 +143,6 @@ namespace TheMachine
this
.
txtOrderNo
.
Size
=
new
System
.
Drawing
.
Size
(
165
,
26
);
this
.
txtOrderNo
.
Size
=
new
System
.
Drawing
.
Size
(
165
,
26
);
this
.
txtOrderNo
.
TabIndex
=
3
;
this
.
txtOrderNo
.
TabIndex
=
3
;
//
//
// button_Clear
//
this
.
button_Clear
.
Location
=
new
System
.
Drawing
.
Point
(
152
,
152
);
this
.
button_Clear
.
Name
=
"button_Clear"
;
this
.
button_Clear
.
Size
=
new
System
.
Drawing
.
Size
(
119
,
33
);
this
.
button_Clear
.
TabIndex
=
6
;
this
.
button_Clear
.
Text
=
"清理料架"
;
this
.
button_Clear
.
UseVisualStyleBackColor
=
true
;
this
.
button_Clear
.
Click
+=
new
System
.
EventHandler
(
this
.
button_Clear_Click
);
//
// uC_SetUserPassword1
// uC_SetUserPassword1
//
//
this
.
uC_SetUserPassword1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
uC_SetUserPassword1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
...
@@ -148,6 +152,27 @@ namespace TheMachine
...
@@ -148,6 +152,27 @@ namespace TheMachine
this
.
uC_SetUserPassword1
.
Size
=
new
System
.
Drawing
.
Size
(
411
,
271
);
this
.
uC_SetUserPassword1
.
Size
=
new
System
.
Drawing
.
Size
(
411
,
271
);
this
.
uC_SetUserPassword1
.
TabIndex
=
7
;
this
.
uC_SetUserPassword1
.
TabIndex
=
7
;
//
//
// btnClearPN
//
this
.
btnClearPN
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
193
);
this
.
btnClearPN
.
Name
=
"btnClearPN"
;
this
.
btnClearPN
.
Size
=
new
System
.
Drawing
.
Size
(
119
,
33
);
this
.
btnClearPN
.
TabIndex
=
7
;
this
.
btnClearPN
.
Text
=
"清理PN出库料架"
;
this
.
btnClearPN
.
UseVisualStyleBackColor
=
true
;
this
.
btnClearPN
.
Click
+=
new
System
.
EventHandler
(
this
.
btnClearPN_Click
);
//
// button2
//
this
.
button2
.
AccessibleDescription
=
"btnClear1"
;
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
232
);
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
119
,
33
);
this
.
button2
.
TabIndex
=
8
;
this
.
button2
.
Text
=
"清理单盘出库料架"
;
this
.
button2
.
UseVisualStyleBackColor
=
true
;
this
.
button2
.
Click
+=
new
System
.
EventHandler
(
this
.
button2_Click
);
//
// SettingControl
// SettingControl
//
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
...
@@ -174,5 +199,7 @@ namespace TheMachine
...
@@ -174,5 +199,7 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
TextBox
txtRfid
;
private
System
.
Windows
.
Forms
.
TextBox
txtRfid
;
private
System
.
Windows
.
Forms
.
TextBox
txtOrderNo
;
private
System
.
Windows
.
Forms
.
TextBox
txtOrderNo
;
private
System
.
Windows
.
Forms
.
Button
button_Clear
;
private
System
.
Windows
.
Forms
.
Button
button_Clear
;
private
System
.
Windows
.
Forms
.
Button
button2
;
private
System
.
Windows
.
Forms
.
Button
btnClearPN
;
}
}
}
}
TheMachine/SettingControl.cs
查看文件 @
5ebcd27
...
@@ -69,5 +69,19 @@ namespace TheMachine
...
@@ -69,5 +69,19 @@ namespace TheMachine
MessageBox
.
Show
(
$
"清理料架,rfid={rfid} ,orderNo={orderNo} 结果:\r\n {result}"
,
"提示"
,
MessageBoxButtons
.
OK
);
MessageBox
.
Show
(
$
"清理料架,rfid={rfid} ,orderNo={orderNo} 结果:\r\n {result}"
,
"提示"
,
MessageBoxButtons
.
OK
);
}
}
private
void
btnClearPN_Click
(
object
sender
,
EventArgs
e
)
{
LogUtil
.
info
(
$
"点击按钮 {btnClearPN.Text.ToString()} ,rfid=[],orderNo=[PN],调用接口清理料架信息"
);
string
result
=
HttpServer
.
ClearRfid
(
""
,
"PN"
);
MessageBox
.
Show
(
$
"清理PN料架, 结果:\r\n {result}"
,
"提示"
,
MessageBoxButtons
.
OK
);
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
LogUtil
.
info
(
$
"点击按钮 {button2.Text.ToString()} ,rfid=[],orderNo=[1],调用接口清理料架信息"
);
string
result
=
HttpServer
.
ClearRfid
(
""
,
"1"
);
MessageBox
.
Show
(
$
"清理单盘出库料架, 结果:\r\n {result}"
,
"提示"
,
MessageBoxButtons
.
OK
);
}
}
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论