Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO1196_X800
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 187fca30
由
刘韬
编写于
2023-02-20 16:00:38 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
稳定版本
1 个父辈
c4a95896
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
19 行增加
和
4 行删除
DeviceLibrary/theMachine/Common.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_PrinterProcess.cs
DeviceLibrary/theMachine/Common.cs
查看文件 @
187fca3
...
...
@@ -6,6 +6,7 @@ using System.Drawing;
using
System.Drawing.Imaging
;
using
System.IO
;
using
System.Linq
;
using
System.Runtime.ExceptionServices
;
using
System.Runtime.Serialization.Formatters.Binary
;
using
System.Text
;
using
System.Text.RegularExpressions
;
...
...
@@ -102,6 +103,7 @@ namespace DeviceLibrary
/// <param name="Label_R_Offset">贴标臂偏移</param>
/// <param name="labelAngle">贴标角度</param>
/// <returns></returns>
[
HandleProcessCorruptedStateExceptions
]
public
static
Point
CalcLabelPoint
(
ReelParam
labelParam
,
Point
org
,
int
Label_R_Offset
,
int
Label_R_Angle_Diff
,
out
int
labelAngle
)
{
...
...
@@ -115,7 +117,14 @@ namespace DeviceLibrary
Bitmap
srcbitmap
;
if
(
BitmapCache
.
HasBmp
(
labelParam
.
bitmapfilename
))
{
srcbitmap
=
BitmapCache
.
GetBmp
(
labelParam
.
bitmapfilename
);
try
{
srcbitmap
=
BitmapCache
.
GetBmp
(
labelParam
.
bitmapfilename
);
var
w
=
srcbitmap
.
Width
;
}
catch
{
srcbitmap
=
new
Bitmap
(
3648
,
3648
);
}
}
else
{
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
187fca3
...
...
@@ -248,6 +248,8 @@ namespace DeviceLibrary
}
public
void
Stop
()
{
mstart
=
false
;
PrintJob
=
null
;
CurrentPrintJob
=
null
;
ServerCM
.
StopConnectServer
();
Thread
.
Sleep
(
300
);
Alarm
(
AlarmType
.
None
);
...
...
@@ -349,6 +351,7 @@ namespace DeviceLibrary
OutCarMoveInfo
.
NewMove
(
MoveStep
.
Wait
);
OutMoveInfo
.
NewMove
(
MoveStep
.
Wait
);
LabelMoveInfo
.
NewMove
(
MoveStep
.
Wait
);
PrintMoveInfo
.
NewMove
(
MoveStep
.
Wait
);
CylinderMove
(
ResetMoveInfo
,
IO_Type
.
Counting_EnterDoor_Close
,
IO_Type
.
Counting_EnterDoor_Open
,
IO_VALUE
.
LOW
);
CylinderMove
(
ResetMoveInfo
,
IO_Type
.
Counting_ExitDoor_Close
,
IO_Type
.
Counting_ExitDoor_Open
,
IO_VALUE
.
LOW
);
if
(
IOValue
(
IO_Type
.
Counting_Reel_Check
).
Equals
(
IO_VALUE
.
HIGH
))
...
...
DeviceLibrary/theMachine/MainMachine_PrinterProcess.cs
查看文件 @
187fca3
...
...
@@ -22,7 +22,7 @@ namespace DeviceLibrary
CountMoveInfo
.
log
(
"打印时 Code:"
+
String
.
Join
(
"##"
,
cc
));
}
readonly
MoveInfo
PrintMoveInfo
=
new
MoveInfo
(
""
,
false
);
readonly
MoveInfo
PrintMoveInfo
=
new
MoveInfo
(
"
打印机
"
,
false
);
ReelParam
PrintJob
=
null
;
ReelParam
CurrentPrintJob
=
null
;
Task
<(
bool
,
string
)>
PrintTask
=
null
;
...
...
@@ -51,9 +51,9 @@ namespace DeviceLibrary
case
MoveStep
.
Print_02
:
if
(
PrintTask
.
IsCompleted
)
{
var
(
result
,
msg
)
=
PrintTask
.
Result
;
var
(
result
,
msg
)
=
PrintTask
.
Result
;
if
(
result
)
{
{
PrintMoveInfo
.
NextMoveStep
(
MoveStep
.
Print_04
);
PrintMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
PrintMoveInfo
.
log
(
"打印成功,等待标签被取走"
);
...
...
@@ -66,6 +66,9 @@ namespace DeviceLibrary
PrintMoveInfo
.
log
(
"打印失败,再次打印"
);
}
}
else
if
(
PrintMoveInfo
.
IsTimeOut
(
30
))
{
Msg
.
add
(
"打印标签超时请检查打印机状态"
,
MsgLevel
.
alarm
);
}
break
;
case
MoveStep
.
Print_04
:
PrintMoveInfo
.
NextMoveStep
(
MoveStep
.
Print_WaitTakeLabel
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论