Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 69cbddcc
由
LN
编写于
2024-06-14 09:37:44 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
4eaa20d8
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
52 行增加
和
34 行删除
TheMachine/AxisControl.Designer.cs
TheMachine/AxisControl.cs
TheMachine/AxisControl.Designer.cs
查看文件 @
69cbddc
...
...
@@ -61,26 +61,29 @@ namespace TheMachine
// lblLed
//
this
.
lblLed
.
AutoSize
=
true
;
this
.
lblLed
.
Location
=
new
System
.
Drawing
.
Point
(
38
,
621
);
this
.
lblLed
.
Location
=
new
System
.
Drawing
.
Point
(
256
,
487
);
this
.
lblLed
.
Name
=
"lblLed"
;
this
.
lblLed
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
12
);
this
.
lblLed
.
Size
=
new
System
.
Drawing
.
Size
(
41
,
12
);
this
.
lblLed
.
TabIndex
=
16
;
this
.
lblLed
.
Text
=
"氛围灯"
;
//
// lblOkValue
//
this
.
lblOkValue
.
AutoSize
=
true
;
this
.
lblOkValue
.
Location
=
new
System
.
Drawing
.
Point
(
38
,
578
);
this
.
lblOkValue
.
Location
=
new
System
.
Drawing
.
Point
(
256
,
454
);
this
.
lblOkValue
.
Name
=
"lblOkValue"
;
this
.
lblOkValue
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
12
);
this
.
lblOkValue
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
lblOkValue
.
TabIndex
=
15
;
this
.
lblOkValue
.
Text
=
"压力传感器"
;
//
// lblSensor
//
this
.
lblSensor
.
AutoSize
=
true
;
this
.
lblSensor
.
Location
=
new
System
.
Drawing
.
Point
(
38
,
539
);
this
.
lblSensor
.
Location
=
new
System
.
Drawing
.
Point
(
256
,
421
);
this
.
lblSensor
.
Name
=
"lblSensor"
;
this
.
lblSensor
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
12
);
this
.
lblSensor
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
12
);
this
.
lblSensor
.
TabIndex
=
14
;
this
.
lblSensor
.
Text
=
"声波传感器"
;
//
// button3
//
...
...
TheMachine/AxisControl.cs
查看文件 @
69cbddc
...
...
@@ -24,6 +24,9 @@ namespace TheMachine
if
(
DesignMode
)
return
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
lblLed
.
Text
=
""
;
lblOkValue
.
Text
=
""
;
lblSensor
.
Text
=
""
;
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
...
...
@@ -121,47 +124,59 @@ namespace TheMachine
{
roateloop
=
false
;
}
private
bool
isPro
=
false
;
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
if
(!
this
.
Visible
)
{
return
;
}
try
{
if
(
Setting_Init
.
Device_LedLight_PortName
!=
""
)
{
lblLed
.
Text
=
"LED"
+
Setting_Init
.
Device_LedLight_PortName
+
":"
+
RobotManage
.
mainMachine
.
lastColor
.
ToString
();
}
else
if
(
isPro
)
{
return
;
}
isPro
=
true
;
Task
.
Run
(()
=>
{
try
{
lblLed
.
Text
=
""
;
}
if
(
Setting_Init
.
Device_LedLight_PortName
!=
""
)
{
lblLed
.
Text
=
"LED"
+
Setting_Init
.
Device_LedLight_PortName
+
":"
+
RobotManage
.
mainMachine
.
lastColor
.
ToString
();
}
else
{
lblLed
.
Text
=
""
;
}
if
(
Setting_Init
.
Device_DauxiKS107_PortName
!=
""
)
{
RobotManage
.
dauxiKS107Controller
.
Quary
(
out
int
currValue
,
out
string
msg
);
lblSensor
.
Text
=
$
"红外传感器{Setting_Init.Device_DauxiKS107_PortName}:"
+
currValue
+
", /"
+
Setting_Init
.
Device_DauxiKS107_BaseValue
+
"/"
+
Setting_Init
.
Device_DauxiKS107_ErrorValue
;
}
else
{
lblSensor
.
Text
=
""
;
}
if
(
Setting_Init
.
Device_WeightSensor_PortName
!=
""
)
{
lblOkValue
.
Text
=
$
"压力传感器{Setting_Init.Device_WeightSensor_PortName}: {Setting_Init.Device_WeightSensor_MaxValue}"
;
}
else
{
lblOkValue
.
Text
=
""
;
}
if
(
Setting_Init
.
Device_DauxiKS107_PortName
!=
""
)
{
RobotManage
.
dauxiKS107Controller
.
Quary
(
out
int
currValue
,
out
string
msg
);
lblSensor
.
Text
=
$
"红外传感器{Setting_Init.Device_DauxiKS107_PortName}:"
+
currValue
+
", /"
+
Setting_Init
.
Device_DauxiKS107_BaseValue
+
"/"
+
Setting_Init
.
Device_DauxiKS107_ErrorValue
;
}
else
{
lblSensor
.
Text
=
""
;
}
if
(
Setting_Init
.
Device_WeightSensor_PortName
!=
""
)
catch
(
Exception
ex
)
{
lblOkValue
.
Text
=
$
"压力传感器{Setting_Init.Device_WeightSensor_PortName}: {Setting_Init.Device_WeightSensor_MaxValue}"
;
LogUtil
.
error
(
"出错:"
+
ex
.
ToString
())
;
}
else
finally
{
lblOkValue
.
Text
=
""
;
isPro
=
false
;
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"出错:"
+
ex
.
ToString
());
}
});
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论