Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d18889ef
由
LN
编写于
2021-04-29 13:59:29 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
调宽速度bug修改。界面状态显示修改。
1 个父辈
2dbc2422
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
105 行增加
和
103 行删除
DeviceLibrary/manager/ResourceControl.cs
DeviceLibrary/manager/TSAVBean.cs
PUSICANLibrary/PUSICANControl.cs
TSA-V/App.config
TSA-V/FrmMaintenance.cs
TSA-V/FrmMenu.Designer.cs
TSA-V/FrmMenu.cs
TSA-V/deviceDebug/FrmPusicanTest.cs
TSA-V/workForm/FrmTSAV.cs
DeviceLibrary/manager/ResourceControl.cs
查看文件 @
d18889e
...
@@ -97,5 +97,30 @@ namespace TSA_V
...
@@ -97,5 +97,30 @@ namespace TSA_V
/// IO模块连接失败
/// IO模块连接失败
/// </summary>
/// </summary>
public
static
string
IOConnectError
=
"IOConnectError"
;
public
static
string
IOConnectError
=
"IOConnectError"
;
/// <summary>
/// 设备急停中
/// </summary>
public
static
string
DeviceInSuddenStop
=
"DeviceInSuddenStop"
;
/// <summary>
/// 设备未启动
/// </summary>
public
static
string
DeviceNotStart
=
"DeviceNotStart"
;
/// <summary>
/// 设备正在原点返回中
/// </summary>
public
static
string
DeviceInGohome
=
"DeviceInGohome"
;
/// <summary>
/// 设备工作中
/// </summary>
public
static
string
DeviceInWork
=
"DeviceInWork"
;
/// <summary>
/// 流水线转动中
/// </summary>
public
static
string
LineTurn
=
"LineTurn"
;
/// <summary>
/// 已工作{0},{1}块电路板
/// </summary>
public
static
string
WorkInfoMsg
=
"WorkInfoMsg"
;
}
}
}
}
DeviceLibrary/manager/TSAVBean.cs
查看文件 @
d18889e
此文件的差异被折叠,
点击展开。
PUSICANLibrary/PUSICANControl.cs
查看文件 @
d18889e
...
@@ -710,20 +710,12 @@ namespace PUSICANLibrary
...
@@ -710,20 +710,12 @@ namespace PUSICANLibrary
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
//重置位置
//重置位置
SetPosition
(
nodeId
,
0
);
SetPosition
(
nodeId
,
0
);
////重置速度
//int startSpeed = ConfigAppSettings.GetIntValue(Setting_Init.RotateNode_StartSpeed, nodeId.ToString());
//PUSICANControl.SetStartSpeed(nodeId, startSpeed);
//int stopSpeed = ConfigAppSettings.GetIntValue(Setting_Init.RotateNode_StopSpeed, nodeId.ToString());
//PUSICANControl.SetStopSpeed(nodeId, stopSpeed);
//int maxSpeed = ConfigAppSettings.GetIntValue(Setting_Init.RotateNode_MaxSpeed, nodeId.ToString());
//PUSICANControl.SetMaxSpeed(nodeId, maxSpeed);
return
true
;
return
true
;
}
}
public
static
bool
SetSpeed
(
uint
nodeId
,
bool
isLineSlv
=
false
)
public
static
bool
SetSpeed
(
uint
nodeId
,
bool
isLineSlv
)
{
{
//重置速度
//重置速度
int
startSpeed
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
RotateNode_StartSpeed
,
nodeId
.
ToString
());
int
startSpeed
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
RotateNode_StartSpeed
,
nodeId
.
ToString
());
...
@@ -846,9 +838,8 @@ namespace PUSICANLibrary
...
@@ -846,9 +838,8 @@ namespace PUSICANLibrary
Thread
.
Sleep
(
10
);
Thread
.
Sleep
(
10
);
//设置为位置模式
//设置为位置模式
PUSICANControl
.
WriteSDO
(
node
,
CAN_Address
.
MoveType
,
movetype
);
PUSICANControl
.
WriteSDO
(
node
,
CAN_Address
.
MoveType
,
movetype
);
Thread
.
Sleep
(
100
);
Thread
.
Sleep
(
100
);
bool
isLineslv
=
node
.
Equals
(
isLineSlv
);
PUSICANControl
.
SetSpeed
(
node
,
isLineSlv
);
PUSICANControl
.
SetSpeed
(
node
);
Thread
.
Sleep
(
10
);
Thread
.
Sleep
(
10
);
//所有轴走到待机点
//所有轴走到待机点
PUSICANControl
.
AbsMove
(
node
,
targetDefaultPosition
);
PUSICANControl
.
AbsMove
(
node
,
targetDefaultPosition
);
...
...
TSA-V/App.config
查看文件 @
d18889e
...
@@ -90,12 +90,12 @@
...
@@ -90,12 +90,12 @@
<
add
key
=
"Line_HomeStartSpeed"
value
=
"1000"
/>
<
add
key
=
"Line_HomeStartSpeed"
value
=
"1000"
/>
<
add
key
=
"Line_HomeStopSpeed"
value
=
"1000"
/>
<
add
key
=
"Line_HomeStopSpeed"
value
=
"1000"
/>
<
add
key
=
"Line_MicroStepping"
value
=
"4"
/>
<
add
key
=
"Line_MicroStepping"
value
=
"4"
/>
<
add
key
=
"Line_MaxSpeed"
value
=
"
1
000"
/>
<
add
key
=
"Line_MaxSpeed"
value
=
"
2
000"
/>
<
add
key
=
"Line_StartSpeed"
value
=
"1000"
/>
<
add
key
=
"Line_StartSpeed"
value
=
"1000"
/>
<
add
key
=
"Line_StopSpeed"
value
=
"1000"
/>
<
add
key
=
"Line_StopSpeed"
value
=
"1000"
/>
<
add
key
=
"Line_AddSpeed"
value
=
"8"
/>
<
add
key
=
"Line_AddSpeed"
value
=
"8"
/>
<
add
key
=
"Line_DelSpeed"
value
=
"8"
/>
<
add
key
=
"Line_DelSpeed"
value
=
"8"
/>
<
add
key
=
"Line_MaxPhaseCurrent"
value
=
"2
0
00"
/>
<
add
key
=
"Line_MaxPhaseCurrent"
value
=
"2
2
00"
/>
<
add
key
=
"Line_DelPhaseCurrent"
value
=
"2"
/>
<
add
key
=
"Line_DelPhaseCurrent"
value
=
"2"
/>
<!--调宽配置:电机回原点后的宽度-->
<!--调宽配置:电机回原点后的宽度-->
<
add
key
=
"Line_HomeWidth"
value
=
"508"
/>
<
add
key
=
"Line_HomeWidth"
value
=
"508"
/>
...
...
TSA-V/FrmMaintenance.cs
查看文件 @
d18889e
...
@@ -31,6 +31,26 @@ namespace TSA_V
...
@@ -31,6 +31,26 @@ namespace TSA_V
private
void
btnPosition_Click
(
object
sender
,
EventArgs
e
)
private
void
btnPosition_Click
(
object
sender
,
EventArgs
e
)
{
{
string
msg
=
""
;
//复位完成才能打开
if
(
TSAVBean
.
IsInSuddenDown
)
{
msg
=
ResourceControl
.
GetString
(
ResourceControl
.
DeviceInSuddenStop
,
"设备急停中"
);
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Wait
))
{
msg
=
ResourceControl
.
GetString
(
ResourceControl
.
DeviceNotStart
,
"设备未启动"
);
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Reset
))
{
msg
=
ResourceControl
.
GetString
(
ResourceControl
.
DeviceInGohome
,
"设备正在原点返回中"
);
}
if
(!
String
.
IsNullOrEmpty
(
msg
))
{
MessageBox
.
Show
(
msg
);
return
;
}
FrmPusicanTest
frmCom
=
new
FrmPusicanTest
();
FrmPusicanTest
frmCom
=
new
FrmPusicanTest
();
this
.
Visible
=
false
;
this
.
Visible
=
false
;
frmCom
.
ShowDialog
();
frmCom
.
ShowDialog
();
...
...
TSA-V/FrmMenu.Designer.cs
查看文件 @
d18889e
...
@@ -36,6 +36,7 @@ namespace TSA_V
...
@@ -36,6 +36,7 @@ namespace TSA_V
this
.
btnExit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnExit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnWork
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnWork
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
lblMsg
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnHistory
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnHistory
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
LblUserName
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
LblUserName
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnScreenTest
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnScreenTest
=
new
System
.
Windows
.
Forms
.
Button
();
...
@@ -58,9 +59,10 @@ namespace TSA_V
...
@@ -58,9 +59,10 @@ namespace TSA_V
//
//
this
.
lblVersion
.
AutoSize
=
true
;
this
.
lblVersion
.
AutoSize
=
true
;
this
.
lblVersion
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
lblVersion
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
lblVersion
.
Location
=
new
System
.
Drawing
.
Point
(
510
,
420
);
this
.
lblVersion
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblVersion
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
435
);
this
.
lblVersion
.
Name
=
"lblVersion"
;
this
.
lblVersion
.
Name
=
"lblVersion"
;
this
.
lblVersion
.
Size
=
new
System
.
Drawing
.
Size
(
7
7
,
12
);
this
.
lblVersion
.
Size
=
new
System
.
Drawing
.
Size
(
7
5
,
17
);
this
.
lblVersion
.
TabIndex
=
11
;
this
.
lblVersion
.
TabIndex
=
11
;
this
.
lblVersion
.
Text
=
"版本号 1.1.2"
;
this
.
lblVersion
.
Text
=
"版本号 1.1.2"
;
//
//
...
@@ -72,7 +74,7 @@ namespace TSA_V
...
@@ -72,7 +74,7 @@ namespace TSA_V
this
.
btnExit
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnExit
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnExit
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
14.25F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnExit
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
14.25F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnExit
.
ForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnExit
.
ForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnExit
.
Location
=
new
System
.
Drawing
.
Point
(
725
,
16
);
this
.
btnExit
.
Location
=
new
System
.
Drawing
.
Point
(
725
,
20
);
this
.
btnExit
.
Name
=
"btnExit"
;
this
.
btnExit
.
Name
=
"btnExit"
;
this
.
btnExit
.
Size
=
new
System
.
Drawing
.
Size
(
89
,
37
);
this
.
btnExit
.
Size
=
new
System
.
Drawing
.
Size
(
89
,
37
);
this
.
btnExit
.
TabIndex
=
9
;
this
.
btnExit
.
TabIndex
=
9
;
...
@@ -98,6 +100,7 @@ namespace TSA_V
...
@@ -98,6 +100,7 @@ namespace TSA_V
// panel1
// panel1
//
//
this
.
panel1
.
BackgroundImageLayout
=
System
.
Windows
.
Forms
.
ImageLayout
.
Stretch
;
this
.
panel1
.
BackgroundImageLayout
=
System
.
Windows
.
Forms
.
ImageLayout
.
Stretch
;
this
.
panel1
.
Controls
.
Add
(
this
.
lblMsg
);
this
.
panel1
.
Controls
.
Add
(
this
.
btnHistory
);
this
.
panel1
.
Controls
.
Add
(
this
.
btnHistory
);
this
.
panel1
.
Controls
.
Add
(
this
.
LblUserName
);
this
.
panel1
.
Controls
.
Add
(
this
.
LblUserName
);
this
.
panel1
.
Controls
.
Add
(
this
.
lblVersion
);
this
.
panel1
.
Controls
.
Add
(
this
.
lblVersion
);
...
@@ -114,6 +117,17 @@ namespace TSA_V
...
@@ -114,6 +117,17 @@ namespace TSA_V
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
861
,
453
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
861
,
453
);
this
.
panel1
.
TabIndex
=
14
;
this
.
panel1
.
TabIndex
=
14
;
//
//
// lblMsg
//
this
.
lblMsg
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
lblMsg
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMsg
.
Location
=
new
System
.
Drawing
.
Point
(
213
,
384
);
this
.
lblMsg
.
Name
=
"lblMsg"
;
this
.
lblMsg
.
Size
=
new
System
.
Drawing
.
Size
(
636
,
60
);
this
.
lblMsg
.
TabIndex
=
21
;
this
.
lblMsg
.
Text
=
"版本号 1.1.2"
;
this
.
lblMsg
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// btnHistory
// btnHistory
//
//
this
.
btnHistory
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
btnHistory
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
...
@@ -134,9 +148,10 @@ namespace TSA_V
...
@@ -134,9 +148,10 @@ namespace TSA_V
//
//
this
.
LblUserName
.
AutoSize
=
true
;
this
.
LblUserName
.
AutoSize
=
true
;
this
.
LblUserName
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
LblUserName
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
LblUserName
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
420
);
this
.
LblUserName
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
LblUserName
.
Location
=
new
System
.
Drawing
.
Point
(
615
,
32
);
this
.
LblUserName
.
Name
=
"LblUserName"
;
this
.
LblUserName
.
Name
=
"LblUserName"
;
this
.
LblUserName
.
Size
=
new
System
.
Drawing
.
Size
(
4
1
,
12
);
this
.
LblUserName
.
Size
=
new
System
.
Drawing
.
Size
(
4
3
,
17
);
this
.
LblUserName
.
TabIndex
=
18
;
this
.
LblUserName
.
TabIndex
=
18
;
this
.
LblUserName
.
Text
=
"label1"
;
this
.
LblUserName
.
Text
=
"label1"
;
//
//
...
@@ -301,5 +316,6 @@ namespace TSA_V
...
@@ -301,5 +316,6 @@ namespace TSA_V
private
System
.
Windows
.
Forms
.
Button
btnScreenTest
;
private
System
.
Windows
.
Forms
.
Button
btnScreenTest
;
private
System
.
Windows
.
Forms
.
Button
btnHistory
;
private
System
.
Windows
.
Forms
.
Button
btnHistory
;
private
System
.
Windows
.
Forms
.
Label
LblUserName
;
private
System
.
Windows
.
Forms
.
Label
LblUserName
;
private
System
.
Windows
.
Forms
.
Label
lblMsg
;
}
}
}
}
\ No newline at end of file
\ No newline at end of file
TSA-V/FrmMenu.cs
查看文件 @
d18889e
...
@@ -46,6 +46,7 @@ namespace TSA_V
...
@@ -46,6 +46,7 @@ namespace TSA_V
btnProduct
.
Visible
=
false
;
btnProduct
.
Visible
=
false
;
btnCom
.
Visible
=
false
;
btnCom
.
Visible
=
false
;
}
}
lblMsg
.
Text
=
""
;
//if (FormManager.UserInfo.Limit.Equals(UserLimit.Admin))
//if (FormManager.UserInfo.Limit.Equals(UserLimit.Admin))
//{
//{
// btnMaintenance.Visible = true;
// btnMaintenance.Visible = true;
...
@@ -292,14 +293,7 @@ namespace TSA_V
...
@@ -292,14 +293,7 @@ namespace TSA_V
}
}
private
void
btnMaintenance_Click
(
object
sender
,
EventArgs
e
)
private
void
btnMaintenance_Click
(
object
sender
,
EventArgs
e
)
{
{
//FrmPwd fw = new FrmPwd(10);
//DialogResult result = fw.ShowDialog();
//if (!result.Equals(DialogResult.OK))
//{
// LogUtil.info("点击 元器件信息,没有正确输入密码");
// return;
//}
isClick
=
true
;
isClick
=
true
;
FrmMaintenance
.
instance
.
Show
();
FrmMaintenance
.
instance
.
Show
();
this
.
Visible
=
false
;
this
.
Visible
=
false
;
...
@@ -338,6 +332,7 @@ namespace TSA_V
...
@@ -338,6 +332,7 @@ namespace TSA_V
{
{
try
try
{
{
lblMsg
.
Text
=
TSAVBean
.
GetShowMsg
();
Screen
[]
sc
=
Screen
.
AllScreens
;
Screen
[]
sc
=
Screen
.
AllScreens
;
if
((!
FrmProjectorScreen
.
instance
.
ISShow
)
&&
sc
.
Length
>
FrmProjectorScreen
.
instance
.
ScreenIndex
)
if
((!
FrmProjectorScreen
.
instance
.
ISShow
)
&&
sc
.
Length
>
FrmProjectorScreen
.
instance
.
ScreenIndex
)
{
{
...
...
TSA-V/deviceDebug/FrmPusicanTest.cs
查看文件 @
d18889e
...
@@ -55,6 +55,7 @@ namespace TSA_V
...
@@ -55,6 +55,7 @@ namespace TSA_V
FormStatus
(
false
);
FormStatus
(
false
);
}
}
SetScreen
();
SetScreen
();
cmbNode
.
SelectedIndex
=
cmbNode
.
Items
.
Count
-
1
;
}
}
private
void
FormStatus
(
bool
open
)
private
void
FormStatus
(
bool
open
)
{
{
...
...
TSA-V/workForm/FrmTSAV.cs
查看文件 @
d18889e
...
@@ -233,84 +233,15 @@ namespace TSA_V
...
@@ -233,84 +233,15 @@ namespace TSA_V
}
}
}
}
FormStatus
();
FormStatus
();
if
(
TSAVBean
.
IsInSuddenDown
)
lblMsg
.
Text
=
TSAVBean
.
GetShowMsg
();
{
lblMsg
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
DeviceInSuddenStop
,
"设备急停中"
);
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Runing
))
//btnStart.Enabled = true;
//btnGoHome.Enabled = false;
btnStartWorking
.
Enabled
=
false
;
if
(
TSAVBean
.
IsDebug
.
Equals
(
false
))
{
btnNextPoint
.
Enabled
=
false
;
btnPrePoint
.
Enabled
=
false
;
}
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Wait
))
{
string
msg
=
ResourceCulture
.
GetString
(
ResourceCulture
.
DeviceNotStart
,
"设备未启动"
);
if
(!
lblMsg
.
Text
.
Equals
(
msg
))
{
lblMsg
.
Text
=
msg
;
//btnStart.Enabled = true;
//btnGoHome.Enabled = false;
btnStartWorking
.
Enabled
=
false
;
if
(
TSAVBean
.
IsDebug
.
Equals
(
false
))
{
btnNextPoint
.
Enabled
=
false
;
btnPrePoint
.
Enabled
=
false
;
}
}
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Reset
))
{
string
msg
=
ResourceCulture
.
GetString
(
ResourceCulture
.
DeviceInGohome
,
"设备正在原点返回中"
);
if
(!
lblMsg
.
Text
.
Equals
(
msg
))
{
lblMsg
.
Text
=
msg
+
"\r\n"
+
TSAVBean
.
WarnMsg
;
//btnStart.Enabled = false;
//btnGoHome.Enabled = true;
btnStartWorking
.
Enabled
=
false
;
if
(
TSAVBean
.
IsDebug
.
Equals
(
false
))
{
btnNextPoint
.
Enabled
=
false
;
btnPrePoint
.
Enabled
=
false
;
}
}
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Runing
))
{
{
//如果没有开始工作,自动开始工作
//如果没有开始工作,自动开始工作
if
(!
TSAVBean
.
Work
.
IsWorking
&&
btnStart
.
Enabled
)
if
(!
TSAVBean
.
Work
.
IsWorking
&&
btnStart
.
Enabled
)
{
{
btnStart_Click
(
null
,
null
);
btnStart_Click
(
null
,
null
);
}
}
string
msg
=
ResourceCulture
.
GetString
(
ResourceCulture
.
DeviceInWork
,
"设备工作中"
);
string
lineMsg
=
ResourceCulture
.
GetString
(
ResourceCulture
.
LineTurn
,
"流水线转动中"
);
if
(!
lblMsg
.
Text
.
Equals
(
msg
))
{
if
(
TSAVBean
.
Work
.
IsWorking
)
{
TimeSpan
span
=
DateTime
.
Now
-
TSAVBean
.
Work
.
beginWorkTime
;
int
count
=
TSAVBean
.
Work
.
BoardCount
;
string
time
=
span
.
Hours
.
ToString
().
PadLeft
(
2
,
'0'
)
+
":"
+
span
.
Minutes
.
ToString
().
PadLeft
(
2
,
'0'
)
+
":"
+
span
.
Seconds
.
ToString
().
PadLeft
(
2
,
'0'
);
lblMsg
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
WorkInfoMsg
,
"已工作{0},{1}块电路板"
,
time
,
count
)
+
"\r\n"
+
TSAVBean
.
WarnMsg
;
}
else
if
(
TSAVBean
.
LineStep
.
moveType
.
Equals
(
1
))
{
lblMsg
.
Text
=
lineMsg
+
"\r\n"
+
TSAVBean
.
WarnMsg
;
}
else
{
lblMsg
.
Text
=
msg
+
"\r\n"
+
TSAVBean
.
WarnMsg
;
}
//btnStart.Enabled = false;
//btnGoHome.Enabled = true;
btnStartWorking
.
Enabled
=
true
;
btnNextPoint
.
Enabled
=
true
;
btnPrePoint
.
Enabled
=
true
;
}
//显示图片
if
(!
preIndex
.
Equals
(
TSAVBean
.
Work
.
currIndex
)
&&
(
TSAVBean
.
Work
.
currPoint
!=
null
))
if
(!
preIndex
.
Equals
(
TSAVBean
.
Work
.
currIndex
)
&&
(
TSAVBean
.
Work
.
currPoint
!=
null
))
{
{
ShowTSAVPoint
();
ShowTSAVPoint
();
...
@@ -387,18 +318,41 @@ namespace TSA_V
...
@@ -387,18 +318,41 @@ namespace TSA_V
{
{
btnSave
.
Enabled
=
true
;
btnSave
.
Enabled
=
true
;
btnGoHome
.
Enabled
=
true
;
btnGoHome
.
Enabled
=
true
;
if
(
TSAVBean
.
Status
<=(
TSAVStatus
.
Wait
))
if
(
TSAVBean
.
Status
<=
(
TSAVStatus
.
Wait
))
{
{
btnStart
.
Visible
=
true
;
btnStart
.
Visible
=
true
;
btnGoHome
.
Visible
=
false
;
btnGoHome
.
Visible
=
false
;
}
}
else
else
{
{
btnStart
.
Visible
=
false
;
btnStart
.
Visible
=
false
;
btnGoHome
.
Visible
=
true
;
btnGoHome
.
Visible
=
true
;
}
}
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Runing
)&&(!
TSAVBean
.
IsInSuddenDown
))
{
//如果没有开始工作,自动开始工作
if
(!
TSAVBean
.
Work
.
IsWorking
&&
btnStart
.
Enabled
)
{
btnStart_Click
(
null
,
null
);
}
btnStartWorking
.
Enabled
=
true
;
btnNextPoint
.
Enabled
=
true
;
btnPrePoint
.
Enabled
=
true
;
}
else
{
btnStartWorking
.
Enabled
=
false
;
if
(
TSAVBean
.
IsDebug
.
Equals
(
false
))
{
btnNextPoint
.
Enabled
=
false
;
btnPrePoint
.
Enabled
=
false
;
}
}
}
}
private
void
btnStart_Click
(
object
sender
,
EventArgs
e
)
private
void
btnStart_Click
(
object
sender
,
EventArgs
e
)
{
{
StartRun
();
StartRun
();
FormStatus
();
FormStatus
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论