Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO815-AutoInOutStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
图表
网络
创建新的问题
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit eb2722ae
由
LN
编写于
2019-09-12 13:28:24 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加升降轴对位置功能
1 个父辈
ace18d91
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
441 行增加
和
275 行删除
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/positionTool/FrmPositionTool.Designer.cs
source/ACSingleStore/positionTool/FrmPositionTool.cs
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
eb2722a
...
...
@@ -2604,7 +2604,6 @@
this
.
升降轴位置调试
ToolStripMenuItem
.
Name
=
"升降轴位置调试ToolStripMenuItem"
;
this
.
升降轴位置调试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
192
,
26
);
this
.
升降轴位置调试
ToolStripMenuItem
.
Text
=
"升降轴位置调试"
;
this
.
升降轴位置调试
ToolStripMenuItem
.
Visible
=
false
;
this
.
升降轴位置调试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
升降轴位置调试
ToolStripMenuItem_Click
);
//
// toolStripSeparator11
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
eb2722a
...
...
@@ -1799,8 +1799,8 @@ namespace OnlineStore.AutoInOutStore
int
ioIndex
=
0
;
if
(
store
.
Config
.
StoreDIList
.
ContainsKey
(
IO_Type
.
UpdownPositionSingal
))
{
ioIP
=
store
.
Config
.
StoreDIList
[
IO_Type
.
UpdownPositionSingal
].
DeviceName
;
ioIndex
=
store
.
Config
.
StoreDIList
[
IO_Type
.
UpdownPositionSingal
].
GetIOAddr
();
ioIP
=
store
.
Config
.
StoreDIList
[
IO_Type
.
TrayCheck_Fixture
].
DeviceName
;
ioIndex
=
store
.
Config
.
StoreDIList
[
IO_Type
.
TrayCheck_Fixture
].
GetIOAddr
();
}
FrmPositionTool
frm
=
new
FrmPositionTool
(
PortName
,
slvAddr
,
ioIP
,
ioIndex
);
frm
.
ShowDialog
();
...
...
source/ACSingleStore/positionTool/FrmPositionTool.Designer.cs
查看文件 @
eb2722a
...
...
@@ -30,37 +30,49 @@
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnExit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
txtP4Offset
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label10
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtP3Offset
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label9
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtP6Offset
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtP5Offset
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label4
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnOpenFolder
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
ioStatusControl1
=
new
UserFromControl
.
IOStatusControl
();
this
.
btnGetActualPosition
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtSpeed
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtFileName
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
ioStatusControl1
=
new
UserFromControl
.
IOStatusControl
();
this
.
btnAbsMove
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtPortName
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtIOIndex
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtIoIp
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtPosition
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
txtActualPosition
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnGetActualPosition
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label13
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnSdStop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label6
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtTargetPosition
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnServoOff
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnServoOn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSdStop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label18
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtAddr
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnHomeMove
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnServoOn
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtPortName
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnServoOff
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtIOIndex
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtIoIp
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnExit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnClear
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
richTextBox1
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
txtAddr
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label18
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label13
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtPosition
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
btnAbsMove
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label8
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtSpeed
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label12
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
groupBox6
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// groupBox6
...
...
@@ -68,58 +80,136 @@
this
.
groupBox6
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox6
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnExit
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnOpenFolder
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
ioStatusControl1
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
txtFileName
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
txtPortName
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
txtIOIndex
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
txtIoIp
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
label7
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
txtActualPosition
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnGetActualPosition
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
label6
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
txtTargetPosition
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnServoOff
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnServoOn
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnSdStop
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnHomeMove
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnClear
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
richTextBox1
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
txtAddr
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
label18
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
label13
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
txtPosition
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnAbsMove
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
label8
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
txtSpeed
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
label12
);
this
.
groupBox6
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
10
);
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
5
);
this
.
groupBox6
.
Name
=
"groupBox6"
;
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
994
,
646
);
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
1008
,
707
);
this
.
groupBox6
.
TabIndex
=
250
;
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"伺服运动测试"
;
//
// btnExit
//
this
.
btnExit
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnExit
.
Location
=
new
System
.
Drawing
.
Point
(
824
,
604
);
this
.
btnExit
.
Name
=
"btnExit"
;
this
.
btnExit
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btnExit
.
TabIndex
=
281
;
this
.
btnExit
.
Text
=
"退出"
;
this
.
btnExit
.
UseVisualStyleBackColor
=
true
;
this
.
btnExit
.
Click
+=
new
System
.
EventHandler
(
this
.
btnExit_Click
);
// groupBox2
//
this
.
groupBox2
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtP4Offset
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label10
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtP3Offset
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label9
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtP6Offset
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label5
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtP5Offset
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label4
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnOpenFolder
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnGetActualPosition
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtSpeed
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label8
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtFileName
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ioStatusControl1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnAbsMove
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label7
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtPosition
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtActualPosition
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label13
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnSdStop
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label6
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
txtTargetPosition
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
192
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
458
,
504
);
this
.
groupBox2
.
TabIndex
=
283
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"位置信息"
;
//
// txtP4Offset
//
this
.
txtP4Offset
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtP4Offset
.
Location
=
new
System
.
Drawing
.
Point
(
184
,
174
);
this
.
txtP4Offset
.
MaxLength
=
30
;
this
.
txtP4Offset
.
Name
=
"txtP4Offset"
;
this
.
txtP4Offset
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
26
);
this
.
txtP4Offset
.
TabIndex
=
287
;
this
.
txtP4Offset
.
Text
=
"-6000"
;
//
// label10
//
this
.
label10
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label10
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
177
);
this
.
label10
.
Name
=
"label10"
;
this
.
label10
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
20
);
this
.
label10
.
TabIndex
=
288
;
this
.
label10
.
Text
=
"入料缓冲点P4偏移量:"
;
this
.
label10
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtP3Offset
//
this
.
txtP3Offset
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtP3Offset
.
Location
=
new
System
.
Drawing
.
Point
(
184
,
142
);
this
.
txtP3Offset
.
MaxLength
=
30
;
this
.
txtP3Offset
.
Name
=
"txtP3Offset"
;
this
.
txtP3Offset
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
26
);
this
.
txtP3Offset
.
TabIndex
=
285
;
this
.
txtP3Offset
.
Text
=
"6000"
;
//
// label9
//
this
.
label9
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label9
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
145
);
this
.
label9
.
Name
=
"label9"
;
this
.
label9
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
20
);
this
.
label9
.
TabIndex
=
286
;
this
.
label9
.
Text
=
"入料前点P3偏移量:"
;
this
.
label9
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtP6Offset
//
this
.
txtP6Offset
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtP6Offset
.
Location
=
new
System
.
Drawing
.
Point
(
184
,
110
);
this
.
txtP6Offset
.
MaxLength
=
30
;
this
.
txtP6Offset
.
Name
=
"txtP6Offset"
;
this
.
txtP6Offset
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
26
);
this
.
txtP6Offset
.
TabIndex
=
283
;
this
.
txtP6Offset
.
Text
=
"6000"
;
//
// label5
//
this
.
label5
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
113
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
20
);
this
.
label5
.
TabIndex
=
284
;
this
.
label5
.
Text
=
"出料缓冲点P6偏移量:"
;
this
.
label5
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtP5Offset
//
this
.
txtP5Offset
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtP5Offset
.
Location
=
new
System
.
Drawing
.
Point
(
184
,
78
);
this
.
txtP5Offset
.
MaxLength
=
30
;
this
.
txtP5Offset
.
Name
=
"txtP5Offset"
;
this
.
txtP5Offset
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
26
);
this
.
txtP5Offset
.
TabIndex
=
281
;
this
.
txtP5Offset
.
Text
=
"-6000"
;
//
// label4
//
this
.
label4
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
81
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
20
);
this
.
label4
.
TabIndex
=
282
;
this
.
label4
.
Text
=
"出料前点P5偏移值:"
;
this
.
label4
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// btnOpenFolder
//
this
.
btnOpenFolder
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOpenFolder
.
Location
=
new
System
.
Drawing
.
Point
(
3
05
,
180
);
this
.
btnOpenFolder
.
Location
=
new
System
.
Drawing
.
Point
(
3
12
,
22
);
this
.
btnOpenFolder
.
Name
=
"btnOpenFolder"
;
this
.
btnOpenFolder
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btnOpenFolder
.
TabIndex
=
280
;
...
...
@@ -127,126 +217,135 @@
this
.
btnOpenFolder
.
UseVisualStyleBackColor
=
true
;
this
.
btnOpenFolder
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOpenFolder_Click
);
//
//
ioStatusControl1
//
btnGetActualPosition
//
this
.
ioStatusControl1
.
IOName
=
null
;
this
.
ioStatusControl1
.
IOValue
=
0
;
this
.
ioStatusControl1
.
isCanClick
=
false
;
this
.
ioStatusControl1
.
Location
=
new
System
.
Drawing
.
Point
(
122
,
483
);
this
.
ioStatusControl1
.
Name
=
"ioStatusControl1"
;
this
.
ioStatusControl1
.
Size
=
new
System
.
Drawing
.
Size
(
171
,
39
);
this
.
ioStatusControl1
.
TabIndex
=
279
;
this
.
btnGetActualPosition
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnGetActualPosition
.
Location
=
new
System
.
Drawing
.
Point
(
312
,
342
);
this
.
btnGetActualPosition
.
Name
=
"btnGetActualPosition"
;
this
.
btnGetActualPosition
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btnGetActualPosition
.
TabIndex
=
269
;
this
.
btnGetActualPosition
.
Text
=
"读取位置"
;
this
.
btnGetActualPosition
.
UseVisualStyleBackColor
=
true
;
this
.
btnGetActualPosition
.
Click
+=
new
System
.
EventHandler
(
this
.
btnGetActualPosition_Click
);
//
// txtSpeed
//
this
.
txtSpeed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtSpeed
.
Location
=
new
System
.
Drawing
.
Point
(
184
,
227
);
this
.
txtSpeed
.
MaxLength
=
30
;
this
.
txtSpeed
.
Name
=
"txtSpeed"
;
this
.
txtSpeed
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
26
);
this
.
txtSpeed
.
TabIndex
=
83
;
this
.
txtSpeed
.
Text
=
"20"
;
//
// label8
//
this
.
label8
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label8
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
230
);
this
.
label8
.
Name
=
"label8"
;
this
.
label8
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
20
);
this
.
label8
.
TabIndex
=
84
;
this
.
label8
.
Text
=
"移动速度:"
;
this
.
label8
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtFileName
//
this
.
txtFileName
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtFileName
.
Location
=
new
System
.
Drawing
.
Point
(
1
34
,
185
);
this
.
txtFileName
.
Location
=
new
System
.
Drawing
.
Point
(
1
41
,
27
);
this
.
txtFileName
.
MaxLength
=
30
;
this
.
txtFileName
.
Name
=
"txtFileName"
;
this
.
txtFileName
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
);
this
.
txtFileName
.
TabIndex
=
278
;
this
.
txtFileName
.
Text
=
"position.csv"
;
//
// ioStatusControl1
//
this
.
ioStatusControl1
.
IOName
=
"检测信号"
;
this
.
ioStatusControl1
.
IOValue
=
0
;
this
.
ioStatusControl1
.
isCanClick
=
false
;
this
.
ioStatusControl1
.
Location
=
new
System
.
Drawing
.
Point
(
134
,
401
);
this
.
ioStatusControl1
.
Name
=
"ioStatusControl1"
;
this
.
ioStatusControl1
.
Size
=
new
System
.
Drawing
.
Size
(
171
,
39
);
this
.
ioStatusControl1
.
TabIndex
=
279
;
//
// btnAbsMove
//
this
.
btnAbsMove
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnAbsMove
.
Location
=
new
System
.
Drawing
.
Point
(
312
,
222
);
this
.
btnAbsMove
.
Name
=
"btnAbsMove"
;
this
.
btnAbsMove
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btnAbsMove
.
TabIndex
=
88
;
this
.
btnAbsMove
.
Text
=
"开始运动"
;
this
.
btnAbsMove
.
UseVisualStyleBackColor
=
true
;
this
.
btnAbsMove
.
Click
+=
new
System
.
EventHandler
(
this
.
btnAbsMove_Click
);
//
// label3
//
this
.
label3
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
188
);
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
30
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
122
,
20
);
this
.
label3
.
TabIndex
=
277
;
this
.
label3
.
Text
=
"保存文件名称:"
;
this
.
label3
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtPortName
//
this
.
txtPortName
.
Enabled
=
false
;
this
.
txtPortName
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtPortName
.
Location
=
new
System
.
Drawing
.
Point
(
134
,
41
);
this
.
txtPortName
.
MaxLength
=
30
;
this
.
txtPortName
.
Name
=
"txtPortName"
;
this
.
txtPortName
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
);
this
.
txtPortName
.
TabIndex
=
276
;
this
.
txtPortName
.
Text
=
"COM1"
;
//
// txtIOIndex
//
this
.
txtIOIndex
.
Enabled
=
false
;
this
.
txtIOIndex
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtIOIndex
.
Location
=
new
System
.
Drawing
.
Point
(
134
,
149
);
this
.
txtIOIndex
.
MaxLength
=
30
;
this
.
txtIOIndex
.
Name
=
"txtIOIndex"
;
this
.
txtIOIndex
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
);
this
.
txtIOIndex
.
TabIndex
=
275
;
this
.
txtIOIndex
.
Text
=
"1"
;
//
// label2
//
this
.
label2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
152
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
122
,
20
);
this
.
label2
.
TabIndex
=
274
;
this
.
label2
.
Text
=
"检测信号地址:"
;
this
.
label2
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtIoIp
//
this
.
txtIoIp
.
Enabled
=
false
;
this
.
txtIoIp
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtIoIp
.
Location
=
new
System
.
Drawing
.
Point
(
134
,
113
);
this
.
txtIoIp
.
MaxLength
=
30
;
this
.
txtIoIp
.
Name
=
"txtIoIp"
;
this
.
txtIoIp
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
);
this
.
txtIoIp
.
TabIndex
=
273
;
this
.
txtIoIp
.
Text
=
"192.168.201.11"
;
//
// label1
//
this
.
label1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
116
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
122
,
20
);
this
.
label1
.
TabIndex
=
272
;
this
.
label1
.
Text
=
"IO模块IP:"
;
this
.
label1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// label7
//
this
.
label7
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label7
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
3
70
);
this
.
label7
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
3
55
);
this
.
label7
.
Name
=
"label7"
;
this
.
label7
.
Size
=
new
System
.
Drawing
.
Size
(
1
22
,
20
);
this
.
label7
.
Size
=
new
System
.
Drawing
.
Size
(
1
73
,
20
);
this
.
label7
.
TabIndex
=
271
;
this
.
label7
.
Text
=
"实际位置:"
;
this
.
label7
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtPosition
//
this
.
txtPosition
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtPosition
.
Location
=
new
System
.
Drawing
.
Point
(
184
,
265
);
this
.
txtPosition
.
MaxLength
=
30
;
this
.
txtPosition
.
Name
=
"txtPosition"
;
this
.
txtPosition
.
Size
=
new
System
.
Drawing
.
Size
(
121
,
26
);
this
.
txtPosition
.
TabIndex
=
89
;
this
.
txtPosition
.
Text
=
"5000"
;
//
// txtActualPosition
//
this
.
txtActualPosition
.
Enabled
=
false
;
this
.
txtActualPosition
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtActualPosition
.
Location
=
new
System
.
Drawing
.
Point
(
1
34
,
367
);
this
.
txtActualPosition
.
Location
=
new
System
.
Drawing
.
Point
(
1
84
,
352
);
this
.
txtActualPosition
.
MaxLength
=
30
;
this
.
txtActualPosition
.
Name
=
"txtActualPosition"
;
this
.
txtActualPosition
.
Size
=
new
System
.
Drawing
.
Size
(
1
64
,
26
);
this
.
txtActualPosition
.
Size
=
new
System
.
Drawing
.
Size
(
1
21
,
26
);
this
.
txtActualPosition
.
TabIndex
=
270
;
//
//
btnGetActualPosition
//
label13
//
this
.
btnGetActualPosition
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnGetActualPosition
.
Location
=
new
System
.
Drawing
.
Point
(
305
,
362
);
this
.
btnGetActualPosition
.
Name
=
"btnGetActualPosition"
;
this
.
btnGetActualPosition
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btnGetActualPosition
.
TabIndex
=
269
;
this
.
btnGetActualPosition
.
Text
=
"读取位置"
;
this
.
btnGetActualPosition
.
UseVisualStyleBackColor
=
true
;
this
.
btnGetActualPosition
.
Click
+=
new
System
.
EventHandler
(
this
.
btnGetActualPosition_Click
);
this
.
label13
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label13
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
268
);
this
.
label13
.
Name
=
"label13"
;
this
.
label13
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
20
);
this
.
label13
.
TabIndex
=
90
;
this
.
label13
.
Text
=
"目标位置:"
;
this
.
label13
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// btnSdStop
//
this
.
btnSdStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSdStop
.
Location
=
new
System
.
Drawing
.
Point
(
312
,
260
);
this
.
btnSdStop
.
Name
=
"btnSdStop"
;
this
.
btnSdStop
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btnSdStop
.
TabIndex
=
257
;
this
.
btnSdStop
.
Text
=
"停止"
;
this
.
btnSdStop
.
UseVisualStyleBackColor
=
true
;
this
.
btnSdStop
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSdStop_Click
);
//
// label6
//
this
.
label6
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
3
36
);
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
3
21
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
1
22
,
20
);
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
1
73
,
20
);
this
.
label6
.
TabIndex
=
268
;
this
.
label6
.
Text
=
"目标位置:"
;
this
.
label6
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
@@ -255,49 +354,67 @@
//
this
.
txtTargetPosition
.
Enabled
=
false
;
this
.
txtTargetPosition
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtTargetPosition
.
Location
=
new
System
.
Drawing
.
Point
(
1
34
,
333
);
this
.
txtTargetPosition
.
Location
=
new
System
.
Drawing
.
Point
(
1
84
,
318
);
this
.
txtTargetPosition
.
MaxLength
=
30
;
this
.
txtTargetPosition
.
Name
=
"txtTargetPosition"
;
this
.
txtTargetPosition
.
Size
=
new
System
.
Drawing
.
Size
(
1
64
,
26
);
this
.
txtTargetPosition
.
Size
=
new
System
.
Drawing
.
Size
(
1
21
,
26
);
this
.
txtTargetPosition
.
TabIndex
=
267
;
//
// btnServoOff
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
label12
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label18
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtAddr
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnHomeMove
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnServoOn
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtPortName
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnServoOff
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtIOIndex
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
txtIoIp
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
13
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
458
,
173
);
this
.
groupBox1
.
TabIndex
=
282
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"设备信息"
;
//
this
.
btnServoOff
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnServoOff
.
Location
=
new
System
.
Drawing
.
Point
(
305
,
80
);
this
.
btnServoOff
.
Name
=
"btnServoOff"
;
this
.
btnServoOff
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btnServoOff
.
TabIndex
=
259
;
this
.
btnServoOff
.
Text
=
"关闭伺服"
;
this
.
btnServoOff
.
UseVisualStyleBackColor
=
true
;
this
.
btnServoOff
.
Click
+=
new
System
.
EventHandler
(
this
.
btnServoOff_Click
);
// label12
//
// btnServoOn
this
.
label12
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label12
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
28
);
this
.
label12
.
Name
=
"label12"
;
this
.
label12
.
Size
=
new
System
.
Drawing
.
Size
(
122
,
20
);
this
.
label12
.
TabIndex
=
1
;
this
.
label12
.
Text
=
"端口号:"
;
this
.
label12
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
this
.
btnServoOn
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnServoOn
.
Location
=
new
System
.
Drawing
.
Point
(
305
,
41
);
this
.
btnServoOn
.
Name
=
"btnServoOn"
;
this
.
btnServoOn
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btnServoOn
.
TabIndex
=
258
;
this
.
btnServoOn
.
Text
=
"打开伺服"
;
this
.
btnServoOn
.
UseVisualStyleBackColor
=
true
;
this
.
btnServoOn
.
Click
+=
new
System
.
EventHandler
(
this
.
btnServoOn_Click
);
// label18
//
// btnSdStop
this
.
label18
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label18
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
64
);
this
.
label18
.
Name
=
"label18"
;
this
.
label18
.
Size
=
new
System
.
Drawing
.
Size
(
122
,
20
);
this
.
label18
.
TabIndex
=
94
;
this
.
label18
.
Text
=
"地址:"
;
this
.
label18
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
this
.
btnSdStop
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSdStop
.
Location
=
new
System
.
Drawing
.
Point
(
305
,
275
);
this
.
btnSdStop
.
Name
=
"btnSdStop"
;
this
.
btnSdStop
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btnSdStop
.
TabIndex
=
257
;
this
.
btnSdStop
.
Text
=
"停止"
;
this
.
btnSdStop
.
UseVisualStyleBackColor
=
true
;
this
.
btnSdStop
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSdStop_Click
);
// txtAddr
//
this
.
txtAddr
.
Enabled
=
false
;
this
.
txtAddr
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtAddr
.
Location
=
new
System
.
Drawing
.
Point
(
136
,
61
);
this
.
txtAddr
.
MaxLength
=
30
;
this
.
txtAddr
.
Name
=
"txtAddr"
;
this
.
txtAddr
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
);
this
.
txtAddr
.
TabIndex
=
95
;
this
.
txtAddr
.
Text
=
"1"
;
//
// btnHomeMove
//
this
.
btnHomeMove
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnHomeMove
.
Location
=
new
System
.
Drawing
.
Point
(
30
5
,
129
);
this
.
btnHomeMove
.
Location
=
new
System
.
Drawing
.
Point
(
30
7
,
113
);
this
.
btnHomeMove
.
Name
=
"btnHomeMove"
;
this
.
btnHomeMove
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btnHomeMove
.
TabIndex
=
110
;
...
...
@@ -305,110 +422,114 @@
this
.
btnHomeMove
.
UseVisualStyleBackColor
=
true
;
this
.
btnHomeMove
.
Click
+=
new
System
.
EventHandler
(
this
.
btnHomeMove_Click
);
//
// btn
Clear
// btn
ServoOn
//
this
.
btn
Clear
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btn
Clear
.
Location
=
new
System
.
Drawing
.
Point
(
677
,
604
);
this
.
btn
Clear
.
Name
=
"btnClear
"
;
this
.
btn
Clear
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btn
Clear
.
TabIndex
=
106
;
this
.
btn
Clear
.
Text
=
"清理
"
;
this
.
btn
Clear
.
UseVisualStyleBackColor
=
true
;
this
.
btn
Clear
.
Click
+=
new
System
.
EventHandler
(
this
.
btnClear
_Click
);
this
.
btn
ServoOn
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btn
ServoOn
.
Location
=
new
System
.
Drawing
.
Point
(
307
,
25
);
this
.
btn
ServoOn
.
Name
=
"btnServoOn
"
;
this
.
btn
ServoOn
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btn
ServoOn
.
TabIndex
=
258
;
this
.
btn
ServoOn
.
Text
=
"打开伺服
"
;
this
.
btn
ServoOn
.
UseVisualStyleBackColor
=
true
;
this
.
btn
ServoOn
.
Click
+=
new
System
.
EventHandler
(
this
.
btnServoOn
_Click
);
//
//
richTextBox1
//
txtPortName
//
this
.
richTextBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
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
.
Location
=
new
System
.
Drawing
.
Point
(
458
,
20
);
this
.
richTextBox1
.
Name
=
"richTextBox1"
;
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
527
,
581
);
this
.
richTextBox1
.
TabIndex
=
105
;
this
.
richTextBox1
.
Text
=
""
;
this
.
txtPortName
.
Enabled
=
false
;
this
.
txtPortName
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtPortName
.
Location
=
new
System
.
Drawing
.
Point
(
136
,
25
);
this
.
txtPortName
.
MaxLength
=
30
;
this
.
txtPortName
.
Name
=
"txtPortName"
;
this
.
txtPortName
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
);
this
.
txtPortName
.
TabIndex
=
276
;
this
.
txtPortName
.
Text
=
"COM1"
;
//
//
txtAddr
//
btnServoOff
//
this
.
txtAddr
.
Enabled
=
false
;
this
.
txtAddr
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
))
);
this
.
txtAddr
.
Location
=
new
System
.
Drawing
.
Point
(
134
,
77
)
;
this
.
txtAddr
.
MaxLength
=
30
;
this
.
txtAddr
.
Name
=
"txtAddr"
;
this
.
txtAddr
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
)
;
this
.
txtAddr
.
TabIndex
=
95
;
this
.
txtAddr
.
Text
=
"1"
;
this
.
btnServoOff
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)))
;
this
.
btnServoOff
.
Location
=
new
System
.
Drawing
.
Point
(
307
,
64
);
this
.
btnServoOff
.
Name
=
"btnServoOff"
;
this
.
btnServoOff
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
)
;
this
.
btnServoOff
.
TabIndex
=
259
;
this
.
btnServoOff
.
Text
=
"关闭伺服"
;
this
.
btnServoOff
.
UseVisualStyleBackColor
=
true
;
this
.
btnServoOff
.
Click
+=
new
System
.
EventHandler
(
this
.
btnServoOff_Click
)
;
//
//
label18
//
txtIOIndex
//
this
.
label18
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label18
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
80
);
this
.
label18
.
Name
=
"label18"
;
this
.
label18
.
Size
=
new
System
.
Drawing
.
Size
(
122
,
20
);
this
.
label18
.
TabIndex
=
94
;
this
.
label18
.
Text
=
"地址:"
;
this
.
label18
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
txtIOIndex
.
Enabled
=
false
;
this
.
txtIOIndex
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtIOIndex
.
Location
=
new
System
.
Drawing
.
Point
(
136
,
133
);
this
.
txtIOIndex
.
MaxLength
=
30
;
this
.
txtIOIndex
.
Name
=
"txtIOIndex"
;
this
.
txtIOIndex
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
);
this
.
txtIOIndex
.
TabIndex
=
275
;
this
.
txtIOIndex
.
Text
=
"1"
;
//
// label1
3
// label1
//
this
.
label1
3
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label1
3
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
283
);
this
.
label1
3
.
Name
=
"label13
"
;
this
.
label1
3
.
Size
=
new
System
.
Drawing
.
Size
(
122
,
20
);
this
.
label1
3
.
TabIndex
=
90
;
this
.
label1
3
.
Text
=
"位置
:"
;
this
.
label1
3
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
100
);
this
.
label1
.
Name
=
"label1
"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
122
,
20
);
this
.
label1
.
TabIndex
=
272
;
this
.
label1
.
Text
=
"IO模块IP
:"
;
this
.
label1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
//
txtPosition
//
label2
//
this
.
txtPosition
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5
F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtPosition
.
Location
=
new
System
.
Drawing
.
Point
(
134
,
280
);
this
.
txtPosition
.
MaxLength
=
30
;
this
.
txtPosition
.
Name
=
"txtPosition"
;
this
.
txtPosition
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
)
;
this
.
txtPosition
.
TabIndex
=
89
;
this
.
txtPosition
.
Text
=
"5000"
;
this
.
label2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9
F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
136
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
122
,
20
)
;
this
.
label2
.
TabIndex
=
274
;
this
.
label2
.
Text
=
"检测信号地址:"
;
this
.
label2
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
//
btnAbsMove
//
txtIoIp
//
this
.
btnAbsMove
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)))
;
this
.
btnAbsMove
.
Location
=
new
System
.
Drawing
.
Point
(
305
,
237
);
this
.
btnAbsMove
.
Name
=
"btnAbsMove"
;
this
.
btnAbsMove
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
)
;
this
.
btnAbsMove
.
TabIndex
=
88
;
this
.
btnAbsMove
.
Text
=
"开始运动"
;
this
.
btnAbsMove
.
UseVisualStyleBackColor
=
true
;
this
.
btnAbsMove
.
Click
+=
new
System
.
EventHandler
(
this
.
btnAbsMove_Click
)
;
this
.
txtIoIp
.
Enabled
=
false
;
this
.
txtIoIp
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
))
);
this
.
txtIoIp
.
Location
=
new
System
.
Drawing
.
Point
(
136
,
97
)
;
this
.
txtIoIp
.
MaxLength
=
30
;
this
.
txtIoIp
.
Name
=
"txtIoIp"
;
this
.
txtIoIp
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
)
;
this
.
txtIoIp
.
TabIndex
=
273
;
this
.
txtIoIp
.
Text
=
"192.168.201.11"
;
//
//
label8
//
btnExit
//
this
.
label8
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label8
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
245
);
this
.
label8
.
Name
=
"label8"
;
this
.
label8
.
Size
=
new
System
.
Drawing
.
Size
(
122
,
20
);
this
.
label8
.
TabIndex
=
84
;
this
.
label8
.
Text
=
"速度:"
;
this
.
label8
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
btnExit
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnExit
.
Location
=
new
System
.
Drawing
.
Point
(
838
,
665
);
this
.
btnExit
.
Name
=
"btnExit"
;
this
.
btnExit
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btnExit
.
TabIndex
=
281
;
this
.
btnExit
.
Text
=
"退出"
;
this
.
btnExit
.
UseVisualStyleBackColor
=
true
;
this
.
btnExit
.
Click
+=
new
System
.
EventHandler
(
this
.
btnExit_Click
);
//
//
txtSpeed
//
btnClear
//
this
.
txtSpeed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtSpeed
.
Location
=
new
System
.
Drawing
.
Point
(
134
,
242
);
this
.
txtSpeed
.
MaxLength
=
30
;
this
.
txtSpeed
.
Name
=
"txtSpeed"
;
this
.
txtSpeed
.
Size
=
new
System
.
Drawing
.
Size
(
164
,
26
);
this
.
txtSpeed
.
TabIndex
=
83
;
this
.
txtSpeed
.
Text
=
"20"
;
this
.
btnClear
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnClear
.
Location
=
new
System
.
Drawing
.
Point
(
691
,
665
);
this
.
btnClear
.
Name
=
"btnClear"
;
this
.
btnClear
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
36
);
this
.
btnClear
.
TabIndex
=
106
;
this
.
btnClear
.
Text
=
"清理"
;
this
.
btnClear
.
UseVisualStyleBackColor
=
true
;
this
.
btnClear
.
Click
+=
new
System
.
EventHandler
(
this
.
btnClear_Click
);
//
//
label12
//
richTextBox1
//
this
.
label12
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label12
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
44
);
this
.
label12
.
Name
=
"label12"
;
this
.
label12
.
Size
=
new
System
.
Drawing
.
Size
(
122
,
20
);
this
.
label12
.
TabIndex
=
1
;
this
.
label12
.
Text
=
"端口号:"
;
this
.
label12
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
richTextBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
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
.
Location
=
new
System
.
Drawing
.
Point
(
473
,
20
);
this
.
richTextBox1
.
Name
=
"richTextBox1"
;
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
526
,
642
);
this
.
richTextBox1
.
TabIndex
=
105
;
this
.
richTextBox1
.
Text
=
""
;
//
// timer1
//
...
...
@@ -419,7 +540,7 @@
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Dpi
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1020
,
668
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1020
,
719
);
this
.
Controls
.
Add
(
this
.
groupBox6
);
this
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
Name
=
"FrmPositionTool"
;
...
...
@@ -428,7 +549,10 @@
this
.
FormClosing
+=
new
System
.
Windows
.
Forms
.
FormClosingEventHandler
(
this
.
FrmPositionTool_FormClosing
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
Form1_Load
);
this
.
groupBox6
.
ResumeLayout
(
false
);
this
.
groupBox6
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox2
.
PerformLayout
();
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
}
...
...
@@ -466,6 +590,16 @@
private
UserFromControl
.
IOStatusControl
ioStatusControl1
;
private
System
.
Windows
.
Forms
.
Button
btnOpenFolder
;
private
System
.
Windows
.
Forms
.
Button
btnExit
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
System
.
Windows
.
Forms
.
TextBox
txtP4Offset
;
private
System
.
Windows
.
Forms
.
Label
label10
;
private
System
.
Windows
.
Forms
.
TextBox
txtP3Offset
;
private
System
.
Windows
.
Forms
.
Label
label9
;
private
System
.
Windows
.
Forms
.
TextBox
txtP6Offset
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
TextBox
txtP5Offset
;
private
System
.
Windows
.
Forms
.
Label
label4
;
}
}
source/ACSingleStore/positionTool/FrmPositionTool.cs
查看文件 @
eb2722a
...
...
@@ -47,7 +47,7 @@ namespace OnlineStore.AutoInOutStore
ACServerManager
.
IsShowMsg
=
false
;
LogUtil
.
logBox
=
this
.
richTextBox1
;
//ACServerManager.richeBox = this.richTextBox1;
formStatus
(
false
);
CheckForIllegalCrossThreadCalls
=
false
;
txtPortName
.
Text
=
PortName
;
txtAddr
.
Text
=
SlvAddr
.
ToString
();
...
...
@@ -57,12 +57,26 @@ namespace OnlineStore.AutoInOutStore
if
(
IOManager
.
instance
==
null
)
{
IOManager
.
Init
();
IOManager
.
instance
.
ConnectionIOList
(
new
List
<
string
>
{
IoIp
});
IOManager
.
instance
.
ConnectionIOList
(
new
List
<
string
>
{
/*IoIp*/
});
}
//判断伺服是否已经打开
bool
isOn
=
ACServerManager
.
ServerOnStatus
(
PortName
,
SlvAddr
);
formStatus
(
isOn
);
timer1
.
Start
();
ioStatusControl1
.
IOName
=
"检测信号"
;
}
private
void
btnServoOn_Click
(
object
sender
,
EventArgs
e
)
{
//PositionList.Add(32000);
//PositionList.Add(38000);
//PositionList.Add(44000);
//PositionList.Add(50000);
//PositionList.Add(56000);
//P3Offset = FormUtil.GetIntValue(txtP3Offset);
//P4Offset = FormUtil.GetIntValue(txtP4Offset);
//P5Offset = FormUtil.GetIntValue(txtP5Offset);
//P6Offset = FormUtil.GetIntValue(txtP6Offset);
//StopTimer();
this
.
PortName
=
txtPortName
.
Text
;
this
.
SlvAddr
=
FormUtil
.
GetIntValue
(
txtAddr
);
bool
result
=
ACServerManager
.
OpenPort
(
PortName
);
...
...
@@ -85,6 +99,7 @@ namespace OnlineStore.AutoInOutStore
{
}
}
private
void
btnServoOff_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -102,9 +117,7 @@ namespace OnlineStore.AutoInOutStore
}
ACServerManager
.
ServoOff
(
PortName
,
SlvAddr
);
formStatus
(
false
);
formStatus
(
false
);
}
private
void
formStatus
(
bool
p
)
...
...
@@ -163,9 +176,13 @@ namespace OnlineStore.AutoInOutStore
txtSpeed
.
Focus
();
return
;
}
P3Offset
=
FormUtil
.
GetIntValue
(
txtP3Offset
);
P4Offset
=
FormUtil
.
GetIntValue
(
txtP4Offset
);
P5Offset
=
FormUtil
.
GetIntValue
(
txtP5Offset
);
P6Offset
=
FormUtil
.
GetIntValue
(
txtP6Offset
);
LastValue
=
IO_VALUE
.
LOW
;
string
fileName
=
txtFileName
.
Text
;
string
filePath
=
Application
.
StartupPath
+
@"
\"
+
fileName
;
string
filePath
=
Application
.
StartupPath
+
@"\logs
\"
+
fileName
;
if
(
File
.
Exists
(
filePath
))
{
DialogResult
result
=
MessageBox
.
Show
(
"文件【"
+
filePath
+
"】已存在,是否确定覆盖?"
,
""
,
MessageBoxButtons
.
OKCancel
,
MessageBoxIcon
.
Question
);
...
...
@@ -176,10 +193,25 @@ namespace OnlineStore.AutoInOutStore
}
PositionList
=
new
List
<
int
>();
LogUtil
.
info
(
LogName
+
"伺服开始运动,速度【"
+
speed
+
"】位置【"
+
position
+
"】启动定时器 "
);
formMoveStatus
(
false
);
ACServerManager
.
AbsMove
(
PortName
,
SlvAddr
,
position
,
speed
);
toolTimer
.
Start
();
}
private
int
P3Offset
=
0
;
private
int
P4Offset
=
0
;
private
int
P5Offset
=
0
;
private
int
P6Offset
=
0
;
private
void
formMoveStatus
(
bool
status
)
{
txtFileName
.
Enabled
=
status
;
txtP5Offset
.
Enabled
=
status
;
txtP3Offset
.
Enabled
=
status
;
txtP4Offset
.
Enabled
=
status
;
txtP6Offset
.
Enabled
=
status
;
txtSpeed
.
Enabled
=
status
;
txtPosition
.
Enabled
=
status
;
}
private
void
btnSdStop_Click
(
object
sender
,
EventArgs
e
)
{
toolTimer
.
Stop
();
...
...
@@ -190,9 +222,6 @@ namespace OnlineStore.AutoInOutStore
{
return
IOManager
.
instance
.
GetDIValue
(
IoIp
,
0
,
(
ushort
)
IoIndex
);
}
private
int
TargetPostion
=
0
;
private
bool
isInProcesss
=
false
;
private
DateTime
LastTime
=
DateTime
.
Now
;
...
...
@@ -249,20 +278,27 @@ namespace OnlineStore.AutoInOutStore
return
;
}
LogUtil
.
info
(
LogName
+
"伺服已停止运动,停止定时器,记录数据"
);
string
resultstr
=
""
;
List
<
string
>
strList
=
new
List
<
string
>();
strList
.
Add
(
"编号,标准位置,升降轴库位出料前点P5,升降轴库位出料缓冲点P6,升降轴库位入料前点P3,升降轴库位入料缓冲点P4"
);
int
index
=
1
;
foreach
(
int
p
in
PositionList
)
{
resultstr
+=
index
+
","
+
p
+
"\r\n"
;
int
P3
=
p
+
P3Offset
;
int
P4
=
p
+
P4Offset
;
int
P5
=
p
+
P5Offset
;
int
P6
=
p
+
P6Offset
;
string
resultstr
=
index
+
","
+
p
+
","
+
P5
+
","
+
P6
+
","
+
P3
+
","
+
P4
+
""
;
strList
.
Add
(
resultstr
);
index
++;
}
string
fileName
=
txtFileName
.
Text
;
string
filePath
=
Application
.
StartupPath
+
@"\"
+
fileName
;
string
filePath
=
Application
.
StartupPath
+
@"\
logs\
"
+
fileName
;
try
{
// Clipboard.SetDataObject(resultstr);
File
.
WriteAll
Text
(
filePath
,
resultstr
);
File
.
WriteAll
Lines
(
filePath
,
strList
.
ToArray
()
);
LogUtil
.
error
(
LogName
+
"保存位置到文件【"
+
filePath
+
"】成功"
);
}
...
...
@@ -270,10 +306,10 @@ namespace OnlineStore.AutoInOutStore
{
LogUtil
.
error
(
LogName
+
"保存位置到文件【"
+
filePath
+
"】出错:"
+
ex
.
ToString
());
}
formMoveStatus
(
true
);
}
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
try
{
ioStatusControl1
.
IOValue
=
(
int
)
GetSingleValue
();
...
...
@@ -281,9 +317,7 @@ namespace OnlineStore.AutoInOutStore
}
catch
(
Exception
ex
)
{
}
}
private
void
FrmPositionTool_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
...
...
@@ -295,12 +329,11 @@ namespace OnlineStore.AutoInOutStore
}
//ACServerManager.CloseAllPort();
IOManager
.
instance
.
CloseAllConnection
();
}
private
void
btnOpenFolder_Click
(
object
sender
,
EventArgs
e
)
{
System
.
Diagnostics
.
Process
.
Start
(
"Explorer.exe"
,
Application
.
StartupPath
);
System
.
Diagnostics
.
Process
.
Start
(
"Explorer.exe"
,
Application
.
StartupPath
+
@"\logs\"
);
}
private
void
btnExit_Click
(
object
sender
,
EventArgs
e
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论