Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 75f52895
由
LN
编写于
2023-10-31 15:55:07 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
轨道调宽最宽不能超过原点
1 个父辈
abf7198d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
39 行增加
和
16 行删除
DeviceLibrary/manager/LineWidthManager.cs
TSA-V/FrmChangeWidth.Designer.cs
TSA-V/FrmChangeWidth.cs
DeviceLibrary/manager/LineWidthManager.cs
查看文件 @
75f5289
...
...
@@ -185,15 +185,28 @@ namespace TSA_V.DeviceLibrary
}
return
result
;
}
public
static
int
GetWidthPosition
(
int
targetWidth
)
{
// LaodMap();
// LaodMap();
if
(
WPositionMap
.
ContainsKey
(
targetWidth
))
{
return
WPositionMap
[
targetWidth
];
}
int
targetP
=
(
targetWidth
-
Line_HomeWidth
)
*
Line_ChangeValue
;
//轨道位置不能超过原点
if
(
Line_ChangeValue
>
0
&&
targetP
>
0
)
{
LogUtil
.
info
(
$
"调宽{targetWidth} 计算目标位置{targetP} 转换系数{Line_ChangeValue},不能超过原点,位置改为=0"
);
return
0
;
}
else
if
(
Line_ChangeValue
<
0
&&
targetP
<
0
)
{
LogUtil
.
info
(
$
"调宽{targetWidth} 计算目标位置{targetP} 转换系数{Line_ChangeValue},不能超过原点,位置改为=0"
);
return
0
;
}
return
targetP
;
}
public
static
Dictionary
<
int
,
int
>
WPositionMap
=
null
;
...
...
TSA-V/FrmChangeWidth.Designer.cs
查看文件 @
75f5289
...
...
@@ -39,6 +39,7 @@
this
.
numTarget
=
new
System
.
Windows
.
Forms
.
NumericUpDown
();
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnHomeM
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
numChangeValue
=
new
System
.
Windows
.
Forms
.
NumericUpDown
();
this
.
numHomeWidth
=
new
System
.
Windows
.
Forms
.
NumericUpDown
();
this
.
numSlv
=
new
System
.
Windows
.
Forms
.
NumericUpDown
();
...
...
@@ -52,7 +53,6 @@
this
.
btnDSave
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtWP
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
lbWidthMap
=
new
System
.
Windows
.
Forms
.
ListBox
();
this
.
btnHomeM
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
numTarget
)).
BeginInit
();
this
.
groupBox2
.
SuspendLayout
();
...
...
@@ -160,7 +160,8 @@
0
,
0
,
0
});
this
.
numTarget
.
ValueChanged
+=
new
System
.
EventHandler
(
this
.
numTarget_ValueChanged
);
this
.
numTarget
.
ValueChanged
+=
new
System
.
EventHandler
(
this
.
numTarget_ValueChanged
);
this
.
numTarget
.
Leave
+=
new
System
.
EventHandler
(
this
.
numTarget_Leave
);
//
// label5
//
...
...
@@ -189,6 +190,18 @@
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"轨道配置"
;
//
// btnHomeM
//
this
.
btnHomeM
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnHomeM
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnHomeM
.
Location
=
new
System
.
Drawing
.
Point
(
32
,
172
);
this
.
btnHomeM
.
Name
=
"btnHomeM"
;
this
.
btnHomeM
.
Size
=
new
System
.
Drawing
.
Size
(
128
,
40
);
this
.
btnHomeM
.
TabIndex
=
296
;
this
.
btnHomeM
.
Text
=
"原点返回"
;
this
.
btnHomeM
.
UseVisualStyleBackColor
=
true
;
this
.
btnHomeM
.
Click
+=
new
System
.
EventHandler
(
this
.
btnHomeM_Click
);
//
// numChangeValue
//
this
.
numChangeValue
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
...
...
@@ -364,18 +377,6 @@
this
.
lbWidthMap
.
TabIndex
=
319
;
this
.
lbWidthMap
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
listDetitalP2_SelectedIndexChanged
);
//
// btnHomeM
//
this
.
btnHomeM
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnHomeM
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnHomeM
.
Location
=
new
System
.
Drawing
.
Point
(
32
,
172
);
this
.
btnHomeM
.
Name
=
"btnHomeM"
;
this
.
btnHomeM
.
Size
=
new
System
.
Drawing
.
Size
(
128
,
40
);
this
.
btnHomeM
.
TabIndex
=
296
;
this
.
btnHomeM
.
Text
=
"原点返回"
;
this
.
btnHomeM
.
UseVisualStyleBackColor
=
true
;
this
.
btnHomeM
.
Click
+=
new
System
.
EventHandler
(
this
.
btnHomeM_Click
);
//
// FrmChangeWidth
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
TSA-V/FrmChangeWidth.cs
查看文件 @
75f5289
...
...
@@ -165,5 +165,14 @@ namespace TSA_V
LogUtil
.
info
(
Name
+
"点击 原点返回"
);
PUSICANControl
.
HomeMove
(
LWidthManager
.
Line_NodeAddr
,
true
);
}
private
void
numTarget_Leave
(
object
sender
,
EventArgs
e
)
{
int
value
=
(
int
)
numTarget
.
Value
;
int
p
=
LWidthManager
.
GetWidthPosition
(
value
);
txtTargetPosition
.
Text
=
p
.
ToString
();
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论