Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit fa2cad7b
由
张东亮
编写于
2023-12-30 22:40:09 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
添加led配置和两次按钮启动功能
1 个父辈
a12fb6e3
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
514 行增加
和
31 行删除
DeviceLibrary/theMachine/MainMachine _BtnProcess.cs
DeviceLibrary/theMachine/MainMachine _LedProcess.cs
DeviceLibrary/theMachine/MainMachine.cs
TheMachine/SettingControl.Designer.cs
TheMachine/SettingControl.cs
TheMachine/TheMachine.csproj
TheMachine/UC/UC_LedConfig.Designer.cs
TheMachine/UC/UC_LedConfig.cs
TheMachine/UC/UC_LedConfig.resx
TheMachine/resources/en-US.lngres
TheMachine/resources/ja-JP.lngres
TheMachine/resources/zh-CN.lngres
DeviceLibrary/theMachine/MainMachine _BtnProcess.cs
查看文件 @
fa2cad7
...
@@ -15,12 +15,14 @@ namespace DeviceLibrary
...
@@ -15,12 +15,14 @@ namespace DeviceLibrary
partial
class
MainMachine
partial
class
MainMachine
{
{
void
BtnProcess
()
void
BtnProcess
()
{
{
}
}
void
Reset_BTN
()
{
bool
lastSuddenStop
=
true
;
void
Reset_BTN
()
{
LogUtil
.
info
(
"按下复位按钮"
);
LogUtil
.
info
(
"按下复位按钮"
);
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
!
lastSuddenStop
&&
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
Msg
.
add
(
crc
.
GetString
(
L
.
reset_press
,
"按下复位按钮."
),
MsgLevel
.
info
,
ErrInfo
.
ResetBtn
);
Msg
.
add
(
crc
.
GetString
(
L
.
reset_press
,
"按下复位按钮."
),
MsgLevel
.
info
,
ErrInfo
.
ResetBtn
);
}
}
...
@@ -29,8 +31,8 @@ namespace DeviceLibrary
...
@@ -29,8 +31,8 @@ namespace DeviceLibrary
Msg
.
add
(
crc
.
GetString
(
L
.
reset_press_with_sudden
,
"急停未解除,按下复位按钮尝试复位安全继电器."
),
MsgLevel
.
info
,
ErrInfo
.
SuddenStop
);
Msg
.
add
(
crc
.
GetString
(
L
.
reset_press_with_sudden
,
"急停未解除,按下复位按钮尝试复位安全继电器."
),
MsgLevel
.
info
,
ErrInfo
.
SuddenStop
);
return
;
return
;
}
}
lastSuddenStop
=
false
;
ProcessMsgEvent
?.
Invoke
(
Msg
.
get
());
ProcessMsgEvent
?.
Invoke
(
Msg
.
get
());
//暂停时按下reaet按钮
//暂停时按下reaet按钮
...
@@ -39,20 +41,27 @@ namespace DeviceLibrary
...
@@ -39,20 +41,27 @@ namespace DeviceLibrary
RobotManage
.
UserPause
(
"Reset_BTN"
,
false
);
RobotManage
.
UserPause
(
"Reset_BTN"
,
false
);
}
}
}
}
void
Run_BTN
()
{
void
Run_BTN
()
if
(
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(!
lastSuddenStop
&&
IOValue
(
IO_Type
.
SuddenStop_BTN
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
if
(!
RobotManage
.
isRunning
)
if
(!
RobotManage
.
isRunning
)
Msg
.
add
(
crc
.
GetString
(
L
.
runbtn_press
,
"按下启动按钮,开始启动."
),
MsgLevel
.
info
,
ErrInfo
.
RunBtn
);
Msg
.
add
(
crc
.
GetString
(
L
.
runbtn_press
,
"按下启动按钮,开始启动."
),
MsgLevel
.
info
,
ErrInfo
.
RunBtn
);
else
else
Msg
.
add
(
crc
.
GetString
(
L
.
system_is_running
,
"系统正在运行."
),
MsgLevel
.
info
);
Msg
.
add
(
crc
.
GetString
(
L
.
system_is_running
,
"系统正在运行."
),
MsgLevel
.
info
);
}
}
else
else
{
{
Msg
.
add
(
crc
.
GetString
(
L
.
runbtn_press_with_sudden
,
"急停中,按下启动按钮,无法启动."
),
MsgLevel
.
warning
);
Msg
.
add
(
crc
.
GetString
(
L
.
runbtn_press_with_sudden
,
"急停中,按下启动按钮,无法启动."
),
MsgLevel
.
warning
);
}
}
lastSuddenStop
=
false
;
LogUtil
.
info
(
"按下启动按钮"
);
LogUtil
.
info
(
"按下启动按钮"
);
ProcessMsgEvent
?.
Invoke
(
Msg
.
get
());
ProcessMsgEvent
?.
Invoke
(
Msg
.
get
());
}
}
void
SuddenStop_BTN
()
{
lastSuddenStop
=
true
;
RobotManage
.
Stop
();
}
}
}
}
}
DeviceLibrary/theMachine/MainMachine _LedProcess.cs
查看文件 @
fa2cad7
此文件的差异被折叠,
点击展开。
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
fa2cad7
...
@@ -93,9 +93,10 @@ namespace DeviceLibrary
...
@@ -93,9 +93,10 @@ namespace DeviceLibrary
AIOTMoveInfo
=
new
MoveInfo
(
$
"出入库测试"
);
AIOTMoveInfo
=
new
MoveInfo
(
$
"出入库测试"
);
#
region
初始化
led
灯
#
region
初始化
led
灯
AlarmLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Alarm_Led
].
GetIOAddr
());
RunningLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Run_Led
].
GetIOAddr
(),
LedColor
.
green
);
StandbyLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Standby_Led
].
GetIOAddr
());
StandbyLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Standby_Led
].
GetIOAddr
(),
LedColor
.
yellow
);
RunningLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Run_Led
].
GetIOAddr
());
AlarmLed
=
new
Led
(
Config
.
DOList
[
IO_Type
.
Alarm_Led
].
GetIOAddr
(),
LedColor
.
red
);
//NG_Led = new Led(Config.DOList[IO_Type.MaterialNG_Led].GetIOAddr());
//NG_Led = new Led(Config.DOList[IO_Type.MaterialNG_Led].GetIOAddr());
#
endregion
#
endregion
#
region
初始化伺服轴
#
region
初始化伺服轴
...
@@ -186,6 +187,7 @@ namespace DeviceLibrary
...
@@ -186,6 +187,7 @@ namespace DeviceLibrary
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
);
ConfigHelper
.
Config
.
Get
(
"Device_Disable_StringDoor"
,
false
);
AlarmBuzzer
.
SetOnOffAction
(()
=>
{
IOMove
(
IO_Type
.
Alarm_Buzzer
,
IO_VALUE
.
HIGH
);
},
()
=>
{
IOMove
(
IO_Type
.
Alarm_Buzzer
,
IO_VALUE
.
LOW
);
});
AlarmBuzzer
.
SetOnOffAction
(()
=>
{
IOMove
(
IO_Type
.
Alarm_Buzzer
,
IO_VALUE
.
HIGH
);
},
()
=>
{
IOMove
(
IO_Type
.
Alarm_Buzzer
,
IO_VALUE
.
LOW
);
});
IOMonitor
.
RegisterIO
(
IO_Type
.
SuddenStop_BTN
,
Config
,
IO_VALUE
.
LOW
,
SuddenStop_BTN
,
2500
,
100
);
IOMonitor
.
RegisterIO
(
IO_Type
.
Reset_BTN
,
Config
,
IO_VALUE
.
HIGH
,
Reset_BTN
,
2500
,
100
);
IOMonitor
.
RegisterIO
(
IO_Type
.
Reset_BTN
,
Config
,
IO_VALUE
.
HIGH
,
Reset_BTN
,
2500
,
100
);
IOMonitor
.
RegisterIO
(
IO_Type
.
AutoRun_Single
,
Config
,
IO_VALUE
.
HIGH
,
Run_BTN
,
2500
,
100
);
IOMonitor
.
RegisterIO
(
IO_Type
.
AutoRun_Single
,
Config
,
IO_VALUE
.
HIGH
,
Run_BTN
,
2500
,
100
);
IOMonitor
.
RegisterIO
(
IO_Type
.
SafetyLightCurtains
,
Config
,
IO_VALUE
.
LOW
,
DeviceSuddenStop
,
1
,
1
);
IOMonitor
.
RegisterIO
(
IO_Type
.
SafetyLightCurtains
,
Config
,
IO_VALUE
.
LOW
,
DeviceSuddenStop
,
1
,
1
);
...
...
TheMachine/SettingControl.Designer.cs
查看文件 @
fa2cad7
...
@@ -39,8 +39,8 @@ namespace TheMachine
...
@@ -39,8 +39,8 @@ namespace TheMachine
this
.
tp
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
tp
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
cb_usefixpos
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
cb_usefixpos
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
uC_SetUserPassword1
=
new
TheMachine
.
UC_SetUserPassword
();
this
.
uC_SetUserPassword1
=
new
TheMachine
.
UC_SetUserPassword
();
this
.
uC_LedConfig1
=
new
TheMachine
.
UC_LedConfig
();
this
.
tp
.
SuspendLayout
();
this
.
tp
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
...
@@ -159,28 +159,29 @@ namespace TheMachine
...
@@ -159,28 +159,29 @@ namespace TheMachine
this
.
button1
.
Visible
=
false
;
this
.
button1
.
Visible
=
false
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click_1
);
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click_1
);
//
//
// label1
//
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
16
,
325
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
989
,
397
);
this
.
label1
.
TabIndex
=
9
;
this
.
label1
.
Text
=
"label1"
;
//
// uC_SetUserPassword1
// uC_SetUserPassword1
//
//
this
.
uC_SetUserPassword1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
uC_SetUserPassword1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
uC_SetUserPassword1
.
Location
=
new
System
.
Drawing
.
Point
(
3
03
,
3
);
this
.
uC_SetUserPassword1
.
Location
=
new
System
.
Drawing
.
Point
(
3
27
,
3
);
this
.
uC_SetUserPassword1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
this
.
uC_SetUserPassword1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
this
.
uC_SetUserPassword1
.
Name
=
"uC_SetUserPassword1"
;
this
.
uC_SetUserPassword1
.
Name
=
"uC_SetUserPassword1"
;
this
.
uC_SetUserPassword1
.
Size
=
new
System
.
Drawing
.
Size
(
405
,
27
2
);
this
.
uC_SetUserPassword1
.
Size
=
new
System
.
Drawing
.
Size
(
405
,
27
6
);
this
.
uC_SetUserPassword1
.
TabIndex
=
8
;
this
.
uC_SetUserPassword1
.
TabIndex
=
8
;
this
.
uC_SetUserPassword1
.
Tag
=
"not"
;
this
.
uC_SetUserPassword1
.
Tag
=
"not"
;
//
//
// uC_LedConfig1
//
this
.
uC_LedConfig1
.
Config
=
null
;
this
.
uC_LedConfig1
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
287
);
this
.
uC_LedConfig1
.
Name
=
"uC_LedConfig1"
;
this
.
uC_LedConfig1
.
Size
=
new
System
.
Drawing
.
Size
(
859
,
440
);
this
.
uC_LedConfig1
.
TabIndex
=
9
;
this
.
uC_LedConfig1
.
Tag
=
"not"
;
//
// SettingControl
// SettingControl
//
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
Controls
.
Add
(
this
.
label
1
);
this
.
Controls
.
Add
(
this
.
uC_LedConfig
1
);
this
.
Controls
.
Add
(
this
.
uC_SetUserPassword1
);
this
.
Controls
.
Add
(
this
.
uC_SetUserPassword1
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
Controls
.
Add
(
this
.
tp
);
this
.
Controls
.
Add
(
this
.
tp
);
...
@@ -205,6 +206,6 @@ namespace TheMachine
...
@@ -205,6 +206,6 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
CheckBox
cb_usefixpos
;
private
System
.
Windows
.
Forms
.
CheckBox
cb_usefixpos
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
UC_SetUserPassword
uC_SetUserPassword1
;
private
UC_SetUserPassword
uC_SetUserPassword1
;
private
System
.
Windows
.
Forms
.
Label
label
1
;
private
UC_LedConfig
uC_LedConfig
1
;
}
}
}
}
TheMachine/SettingControl.cs
查看文件 @
fa2cad7
...
@@ -40,7 +40,7 @@ namespace TheMachine
...
@@ -40,7 +40,7 @@ namespace TheMachine
{
{
if
(!
state
)
if
(!
state
)
return
;
return
;
uC_LedConfig1
.
Config
=
RobotManage
.
Config
;
if
(!
RobotManage
.
haveFixpos
)
if
(!
RobotManage
.
haveFixpos
)
cb_usefixpos
.
Visible
=
false
;
cb_usefixpos
.
Visible
=
false
;
}
}
...
@@ -117,7 +117,7 @@ namespace TheMachine
...
@@ -117,7 +117,7 @@ namespace TheMachine
{
{
if
(!
Visible
)
if
(!
Visible
)
return
;
return
;
label1
.
Text
=
ServerCommunication
.
ServerCommStr
;
//
label1.Text = ServerCommunication.ServerCommStr;
lbl_hmdstate
.
Text
=
crc
.
GetString
(
L
.
current_status
,
"当前状态:"
);
lbl_hmdstate
.
Text
=
crc
.
GetString
(
L
.
current_status
,
"当前状态:"
);
if
(!
HumitureController
.
IsRun
)
if
(!
HumitureController
.
IsRun
)
{
{
...
...
TheMachine/TheMachine.csproj
查看文件 @
fa2cad7
...
@@ -154,6 +154,12 @@
...
@@ -154,6 +154,12 @@
<Compile Include="UC\uc_boxdebug.Designer.cs">
<Compile Include="UC\uc_boxdebug.Designer.cs">
<DependentUpon>uc_boxdebug.cs</DependentUpon>
<DependentUpon>uc_boxdebug.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="UC\UC_LedConfig.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\UC_LedConfig.Designer.cs">
<DependentUpon>UC_LedConfig.cs</DependentUpon>
</Compile>
<Compile Include="UC\UC_SetUserPassword.cs">
<Compile Include="UC\UC_SetUserPassword.cs">
<SubType>UserControl</SubType>
<SubType>UserControl</SubType>
</Compile>
</Compile>
...
@@ -211,6 +217,9 @@
...
@@ -211,6 +217,9 @@
<EmbeddedResource Include="UC\uc_boxdebug.resx">
<EmbeddedResource Include="UC\uc_boxdebug.resx">
<DependentUpon>uc_boxdebug.cs</DependentUpon>
<DependentUpon>uc_boxdebug.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="UC\UC_LedConfig.resx">
<DependentUpon>UC_LedConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UC\UC_SetUserPassword.resx">
<EmbeddedResource Include="UC\UC_SetUserPassword.resx">
<DependentUpon>UC_SetUserPassword.cs</DependentUpon>
<DependentUpon>UC_SetUserPassword.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
...
...
TheMachine/UC/UC_LedConfig.Designer.cs
0 → 100644
查看文件 @
fa2cad7
namespace
TheMachine
{
partial
class
UC_LedConfig
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private
void
InitializeComponent
()
{
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
button_reset
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button_save
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
SuspendLayout
();
//
// tableLayoutPanel1
//
this
.
tableLayoutPanel1
.
AutoSize
=
true
;
this
.
tableLayoutPanel1
.
CellBorderStyle
=
System
.
Windows
.
Forms
.
TableLayoutPanelCellBorderStyle
.
Single
;
this
.
tableLayoutPanel1
.
ColumnCount
=
4
;
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
200F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
());
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
());
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
());
this
.
tableLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
RowCount
=
2
;
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
33F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
());
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
20F
));
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
537
,
234
);
this
.
tableLayoutPanel1
.
TabIndex
=
0
;
//
// button_reset
//
this
.
button_reset
.
Location
=
new
System
.
Drawing
.
Point
(
601
,
3
);
this
.
button_reset
.
Name
=
"button_reset"
;
this
.
button_reset
.
Size
=
new
System
.
Drawing
.
Size
(
162
,
34
);
this
.
button_reset
.
TabIndex
=
1
;
this
.
button_reset
.
Text
=
"重置为默认值"
;
this
.
button_reset
.
UseVisualStyleBackColor
=
true
;
this
.
button_reset
.
Click
+=
new
System
.
EventHandler
(
this
.
button_reset_Click
);
//
// button_save
//
this
.
button_save
.
Location
=
new
System
.
Drawing
.
Point
(
601
,
72
);
this
.
button_save
.
Name
=
"button_save"
;
this
.
button_save
.
Size
=
new
System
.
Drawing
.
Size
(
162
,
34
);
this
.
button_save
.
TabIndex
=
1
;
this
.
button_save
.
Text
=
"保存设定"
;
this
.
button_save
.
UseVisualStyleBackColor
=
true
;
this
.
button_save
.
Click
+=
new
System
.
EventHandler
(
this
.
button_save_Click
);
//
// UC_LedConfig
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
Controls
.
Add
(
this
.
button_save
);
this
.
Controls
.
Add
(
this
.
button_reset
);
this
.
Controls
.
Add
(
this
.
tableLayoutPanel1
);
this
.
Name
=
"UC_LedConfig"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
859
,
498
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
#
endregion
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tableLayoutPanel1
;
private
System
.
Windows
.
Forms
.
Button
button_reset
;
private
System
.
Windows
.
Forms
.
Button
button_save
;
}
}
TheMachine/UC/UC_LedConfig.cs
0 → 100644
查看文件 @
fa2cad7
using
OnlineStore
;
using
DeviceLibrary
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
using
OnlineStore.Common
;
namespace
TheMachine
{
using
crc
=
OnlineStore
.
CodeResourceControl
;
public
partial
class
UC_LedConfig
:
UserControl
{
public
UC_LedConfig
()
{
InitializeComponent
();
this
.
Tag
=
"not"
;
crc
.
LanguageChangeEvent
+=
Crc_LanguageChangeEvent
;
// crc.LanguageProcess(this);
}
private
void
Crc_LanguageChangeEvent
(
object
sender
,
EventArgs
e
)
{
if
(
Config
==
null
)
return
;
crc
.
LanguageProcess
(
this
);
LoadLedList
();
}
private
DeviceConfig
_Config
;
public
DeviceConfig
Config
{
get
{
return
_Config
;
}
set
{
if
(
value
==
null
)
return
;
_Config
=
value
;
LoadLedList
();
crc
.
LanguageProcess
(
this
);
}
}
void
LoadLedList
()
{
//if (!this.Created)
// return;
if
(
this
.
InvokeRequired
)
{
this
.
Invoke
((
EventHandler
)
delegate
{
try
{
LoadLedList
();
}
catch
(
Exception
ee
)
{
MessageBox
.
Show
(
"LoadLedList:"
+
ee
.
ToString
());
}
});
return
;
}
tableLayoutPanel1
.
SuspendLayout
();
tableLayoutPanel1
.
Controls
.
Clear
();
this
.
tableLayoutPanel1
.
RowStyles
.
Clear
();
var
statenames
=
Enum
.
GetNames
(
typeof
(
MachineLedStateE
));
Label
label_s
=
new
Label
()
{
Size
=
new
Size
(
200
,
34
),
Text
=
crc
.
GetString
(
"Res0220"
,
"状态,优先级从大到小"
),
TextAlign
=
ContentAlignment
.
MiddleLeft
};
tableLayoutPanel1
.
Controls
.
Add
(
label_s
,
0
,
0
);
Label
label_g
=
new
Label
()
{
Size
=
new
Size
(
120
,
34
),
Text
=
crc
.
GetString
(
"Res0221"
,
"绿灯"
),
TextAlign
=
ContentAlignment
.
MiddleCenter
};
tableLayoutPanel1
.
Controls
.
Add
(
label_g
,
1
,
0
);
Label
label_y
=
new
Label
()
{
Size
=
new
Size
(
120
,
34
),
Text
=
crc
.
GetString
(
"Res0222"
,
"黄灯"
),
TextAlign
=
ContentAlignment
.
MiddleCenter
};
tableLayoutPanel1
.
Controls
.
Add
(
label_y
,
2
,
0
);
Label
label_r
=
new
Label
()
{
Size
=
new
Size
(
120
,
34
),
Text
=
crc
.
GetString
(
"Res0223"
,
"红灯"
),
TextAlign
=
ContentAlignment
.
MiddleCenter
};
tableLayoutPanel1
.
Controls
.
Add
(
label_r
,
3
,
0
);
int
r
=
1
;
var
ledkeys
=
RobotManage
.
mainMachine
.
MachineLedStateName
.
Keys
;
foreach
(
var
key
in
ledkeys
)
{
//if (r == 3)
// return;
Label
button
=
new
Label
();
button
.
Anchor
=
(
AnchorStyles
)(
AnchorStyles
.
Left
|
AnchorStyles
.
Right
|
AnchorStyles
.
Top
|
AnchorStyles
.
Bottom
);
button
.
Name
=
key
.
ToString
();
button
.
Text
=
crc
.
GetString
(
"ledstate_"
+
key
,
RobotManage
.
mainMachine
.
MachineLedStateName
[
key
]);
button
.
AutoSize
=
false
;
button
.
Size
=
new
System
.
Drawing
.
Size
(
200
,
34
);
button
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
tableLayoutPanel1
.
Controls
.
Add
(
button
,
0
,
r
);
int
c
=
1
;
foreach
(
var
led
in
Led
.
LedColors
.
Keys
)
{
List
<
lightitem
>
lightitems
=
new
List
<
lightitem
>();
lightitems
.
Add
(
new
lightitem
(
crc
.
GetString
(
"Res0224"
,
"无动作"
),
LedState
.
none
));
lightitems
.
Add
(
new
lightitem
(
crc
.
GetString
(
"Res0225"
,
"关"
),
LedState
.
off
));
lightitems
.
Add
(
new
lightitem
(
crc
.
GetString
(
"Res0226"
,
"开"
),
LedState
.
on
));
lightitems
.
Add
(
new
lightitem
(
crc
.
GetString
(
"flashing"
,
"闪烁"
),
LedState
.
blink
));
var
selit
=
lightitems
.
FindIndex
(
x
=>
x
.
value
==
RobotManage
.
mainMachine
.
MachineLedState
[
key
][
led
]);
ComboBox
comboBox
=
new
ComboBox
();
comboBox
.
DropDownStyle
=
ComboBoxStyle
.
DropDownList
;
comboBox
.
FormattingEnabled
=
true
;
//comboBox.Items.AddRange(new object[] { "none", "on", "off", "blink" });
comboBox
.
Items
.
AddRange
(
lightitems
.
ToArray
());
comboBox
.
Name
=
key
.
ToString
();
comboBox
.
Tag
=
led
;
//comboBox.SelectedItem = selit;
comboBox
.
SelectedIndex
=
selit
;
tableLayoutPanel1
.
Controls
.
Add
(
comboBox
,
c
,
r
);
c
++;
}
r
++;
}
tableLayoutPanel1
.
ResumeLayout
(
true
);
}
class
lightitem
{
public
string
Text
;
public
LedState
value
;
public
lightitem
(
string
t
,
LedState
v
)
{
Text
=
t
;
value
=
v
;
}
public
override
string
ToString
()
{
return
Text
;
}
}
private
void
button_reset_Click
(
object
sender
,
EventArgs
e
)
{
RobotManage
.
mainMachine
.
DefaultLedCfg
();
LoadLedList
();
}
private
void
button_save_Click
(
object
sender
,
EventArgs
e
)
{
for
(
int
i
=
0
;
i
<
tableLayoutPanel1
.
Controls
.
Count
;
i
++)
{
var
cc
=
tableLayoutPanel1
.
Controls
[
i
];
if
(!(
cc
is
ComboBox
))
continue
;
Enum
.
TryParse
<
MachineLedStateE
>(
cc
.
Name
,
out
MachineLedStateE
key
);
LedColor
led
=
(
LedColor
)
cc
.
Tag
;
RobotManage
.
mainMachine
.
MachineLedState
[
key
][
led
]
=
((
lightitem
)(
cc
as
ComboBox
).
SelectedItem
).
value
;
}
if
(
RobotManage
.
mainMachine
.
SaveLedCfg
())
MessageBox
.
Show
(
crc
.
GetString
(
"save_success"
,
"保存成功"
)
+
"!"
);
else
MessageBox
.
Show
(
crc
.
GetString
(
"save_failed"
,
"保存失败"
)
+
"!"
);
}
}
}
\ No newline at end of file
\ No newline at end of file
TheMachine/UC/UC_LedConfig.resx
0 → 100644
查看文件 @
fa2cad7
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
\ No newline at end of file
TheMachine/resources/en-US.lngres
查看文件 @
fa2cad7
...
@@ -213,10 +213,10 @@ Device_Led 设备照明开启 Light ON
...
@@ -213,10 +213,10 @@ Device_Led 设备照明开启 Light ON
device_pause 暂停运行 Pause
device_pause 暂停运行 Pause
device_resume 恢复运行 Restart
device_resume 恢复运行 Restart
device_suddenstop_cant_start 急停中,无法启动 The SMD BOX cannot be turned on during E-Stop.
device_suddenstop_cant_start 急停中,无法启动 The SMD BOX cannot be turned on during E-Stop.
disable_config_mode 关闭配置模式 Configuration Mod
o
Off
disable_config_mode 关闭配置模式 Configuration Mod
e
Off
DoorSafe_Disable 门禁功能屏蔽 Access Function Shielding
DoorSafe_Disable 门禁功能屏蔽 Access Function Shielding
empty_reel 空料串 Empty Stacker.
empty_reel 空料串 Empty Stacker.
enable_config_mode 启用配置模式 Configuration Mod
o
On
enable_config_mode 启用配置模式 Configuration Mod
e
On
free 空闲中 Available
free 空闲中 Available
...
@@ -403,4 +403,25 @@ reel_not_in_right_status 料盘放置异常 The reel is placed abnormally
...
@@ -403,4 +403,25 @@ reel_not_in_right_status 料盘放置异常 The reel is placed abnormally
confirm_no_reel_in_com 请确保料盘已从库位中取出 Make sure that the reel has been removed from the location
confirm_no_reel_in_com 请确保料盘已从库位中取出 Make sure that the reel has been removed from the location
outstore_abnormal_reel The material tray is not successfully put into the string, please check
outstore_abnormal_reel The material tray is not successfully put into the string, please check
bacth_no_fix 料串未成功放入料叉上,请检查 The string was not successfully placed on the fork, please check
bacth_no_fix 料串未成功放入料叉上,请检查 The string was not successfully placed on the fork, please check
not_allow 不允许 Not allowed
\ No newline at end of file
\ No newline at end of file
not_allow 不允许 Not allowed
UC_LedConfig_button_save_Text 保存设定 Save the settings
UC_LedConfig_button_reset_Text 重置为默认值 Reset to default
ledstate_Alarm 报警 Alarm
ledstate_AlarmStop 停机报警 Shut Down Alarm
ledstate_HomeReset 复位 Reset
ledstate_InOut 出入库中 In Operation
ledstate_Running 运行 Run
ledstate_SystemPause 暂停 Pause
ledstate_THoutRangeOver30m 温湿度超限30分钟 Temperature And Humidity Exceeded The Limit Over 30 min
ledstate_THoutRange 温湿度超限 Temperature And Humidity Exceeded The Limit
Res0220 状态,优先级从大到小 Status, From High To Low Priority
Res0221 绿灯 Green
Res0222 黄灯 Yellow
Res0223 红灯 Red
Res0224 无动作 Waiting
Res0225 关 Switch to Low
Res0226 开 Switch to High
flashing 闪烁 Flashing
save_success 保存成功 Save success
save_failed 保存失败 Save failed
\ No newline at end of file
\ No newline at end of file
TheMachine/resources/ja-JP.lngres
查看文件 @
fa2cad7
...
@@ -405,4 +405,25 @@ reel_not_in_right_status 料盘放置异常 リールが異常に配置されて
...
@@ -405,4 +405,25 @@ reel_not_in_right_status 料盘放置异常 リールが異常に配置されて
confirm_no_reel_in_com 请确保料盘已从库位中取出 リールがその場所から取り外されていることを確認してください
confirm_no_reel_in_com 请确保料盘已从库位中取出 リールがその場所から取り外されていることを確認してください
outstore_abnormal_reel 倉庫を出るとき、材料トレイがひもにうまく入れられていません、確認してください
outstore_abnormal_reel 倉庫を出るとき、材料トレイがひもにうまく入れられていません、確認してください
bacth_no_fix 料串未成功放入料叉上,请检查 文字列がフォークに正常に配置されませんでした。確認してください
bacth_no_fix 料串未成功放入料叉上,请检查 文字列がフォークに正常に配置されませんでした。確認してください
not_allow 不允许 禁じられた
\ No newline at end of file
\ No newline at end of file
not_allow 不允许 禁じられた
UC_LedConfig_button_save_Text 保存设定 設定を保存する
UC_LedConfig_button_reset_Text 重置为默认值 デフォルトにリセット
ledstate_Alarm 报警 警報
ledstate_AlarmStop 停机报警 シャットダウンアラーム
ledstate_HomeReset 复位 位置
ledstate_InOut 出入库中 ストレージの内外
ledstate_Running 运行 走る
ledstate_SystemPause 暂停 たんま
ledstate_THoutRangeOver30m 温湿度超限30分钟 温度と湿度が30分間制限を超えている
ledstate_THoutRange 温湿度超限 温度と湿度が制限を超えています
Res0220 状态,优先级从大到小 ステータス (最大から最小の順に優先)
Res0221 绿灯 青信号
Res0222 黄灯 黄色のライト
Res0223 红灯 紅灯
Res0224 无动作 何もしない
Res0225 关 閉める
Res0226 开 開ける
flashing 闪烁 ヴラド
save_success 保存成功 保存は成功しました
save_failed 保存失败 保存に失敗しました
\ No newline at end of file
\ No newline at end of file
TheMachine/resources/zh-CN.lngres
查看文件 @
fa2cad7
...
@@ -390,4 +390,25 @@ bacth_no_fix 料串未成功放入料叉上,请检查 料串未成功放入料
...
@@ -390,4 +390,25 @@ bacth_no_fix 料串未成功放入料叉上,请检查 料串未成功放入料
l_flipDoor_no_work 左侧翻板水平信号未亮 左侧翻板水平信号未亮
l_flipDoor_no_work 左侧翻板水平信号未亮 左侧翻板水平信号未亮
r_flipDoor_no_work 右侧翻板水平信号未亮 右侧翻板水平信号未亮
r_flipDoor_no_work 右侧翻板水平信号未亮 右侧翻板水平信号未亮
reel_not_in_right_status 料盘放置异常 料盘放置异常
reel_not_in_right_status 料盘放置异常 料盘放置异常
confirm_no_reel_in_com 请确保料盘已从库位中取出 请确保料盘已从库位中取出
\ No newline at end of file
\ No newline at end of file
confirm_no_reel_in_com 请确保料盘已从库位中取出 请确保料盘已从库位中取出
UC_LedConfig_button_save_Text 保存设定 保存设定
UC_LedConfig_button_reset_Text 重置为默认值 重置为默认值
ledstate_Alarm 报警 报警
ledstate_AlarmStop 停机报警 停机报警
ledstate_HomeReset 复位 复位
ledstate_InOut 出入库中 出入库中
ledstate_Running 运行 运行
ledstate_SystemPause 暂停 暂停
ledstate_THoutRangeOver30m 温湿度超限30分钟 温湿度超限30分钟
ledstate_THoutRange 温湿度超限 温湿度超限
Res0220 状态,优先级从大到小 状态,优先级从大到小
Res0221 绿灯 绿灯
Res0222 黄灯 黄灯
Res0223 红灯 红灯
Res0224 无动作 无动作
Res0225 关 关
Res0226 开 开
flashing 闪烁 闪烁
save_success 保存成功 保存成功
save_failed 保存失败 保存失败
\ No newline at end of file
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论