ResourceControl.cs
5.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TSA_V.Common;
namespace TSA_V
{
public class ResourceControl
{
public static string China = "zh-CN";
public static string English = "en-US";
public delegate string GetStrDelegate(string id, string defaultStr );
public static event GetStrDelegate GetStrEvent;
public delegate string GetStringDelegate(string id, string defaultStr, params object[] param);
public static event GetStringDelegate GetStringEvent;
public delegate string GetLanDelegate();
public static event GetLanDelegate GetLanEvent;
public static string GetString(string id,string defaultStr)
{
string result = GetStrEvent?.Invoke(id, defaultStr);
return result;
}
public static string GetString(string id, string defaultStr, params object[] param)
{
string result = GetStringEvent?.Invoke(id, defaultStr,param);
return result;
}
public static string GetLanguage( )
{
string result = GetLanEvent?.Invoke();
return result;
}
/// <summary>
/// 宽度
/// </summary>
public static string Width = "Width";
/// <summary>
/// 长度
/// </summary>
public static string Length = "Length";
/// <summary>
/// 组件数量
/// </summary>
public static string InfoCount = "InfoCount";
/// <summary>
/// 红外X轴初始化失败
/// </summary>
public static string InitXFail = "InitXFail";
/// <summary>
/// 红外Y轴初始化失败
/// </summary>
public static string InitYFail = "InitYFail";
/// <summary>
/// Can协议连接失败
/// </summary>
public static string CanConnectFail = "CanConnectFail";
/// <summary>
/// XY轴回待机点
/// </summary>
public static string XTGoHome = "XTGoHome";
/// <summary>
/// 旋转轴[{0}][{1}]上线
/// </summary>
public static string RNodeOnLine = "RNodeOnLine";
/// <summary>
/// 旋转轴[{0}]原点返回完成
/// </summary>
public static string RNodeGoHome = "RNodeGoHome";
/// <summary>
/// 旋转轴[{0}]走到待机点[{1}]
/// </summary>
public static string RNodeToPosition = "RNodeToPosition";
/// <summary>
/// 重置等待[{0}]超时,已等待:{1}分
/// </summary>
public static string TimeOutMsg = "TimeOutMsg";
/// <summary>
/// 收到急停信号,停止所有运动,设备断开连接
/// </summary>
public static string SuddenDownMsg = "SuddenDownMsg";
/// <summary>
/// 急停恢复,自动重置设备
/// </summary>
public static string AutoResetMsg = "AutoResetMsg";
/// <summary>
/// 旋转轴[{0}]堵转,需要重置
/// </summary>
public static string DuZhuanMsg = "DuZhuanMsg";
/// <summary>
/// 组装中,等待【{0}】超时 已等待[{1}]秒
/// </summary>
public static string WaitTimeOutMsg = "WaitTimeOutMsg";
/// <summary>
/// 流水线转动中,等待【{0}】超时 已等待[{1}]秒
/// </summary>
public static string LineTimeOutMsg = "LineTimeOutMsg";
/// <summary>
/// IO模块连接失败
/// </summary>
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";
/// <summary>
/// 线体宽度
/// </summary>
public static string LineWidth = "LineWidth";
/// <summary>
/// 启动调宽失败
/// </summary>
public static string ChangeWFail = "ChangeWFail";
/// <summary>
/// 宽度无效
/// </summary>
public static string WidthInvalid = "WidthInvalid";
/// <summary>
/// 已在调宽中
/// </summary>
public static string InChangeW = "InChangeW";
/// <summary>
/// 用户中止
/// </summary>
public static string UserStop = "UserStop";
/// <summary>
/// 等待原点完成超时
/// </summary>
public static string HomeMoveTimeout = "HomeMoveTimeout";
/// <summary>
/// 等待目标位置{0}超时
/// </summary>
public static string WaitChangeWOk = "WaitChangeWOk";
}
}