提交 | 用户 | age
|
b978bf
|
1 |
// MyDlgBarInputShow.cpp: 实现文件
|
Q |
2 |
//
|
|
3 |
|
|
4 |
#include "pch.h"
|
|
5 |
#include "MTerm2.h"
|
|
6 |
#include "MyDlgBarInputShow.h"
|
|
7 |
#include "afxdialogex.h"
|
e00d5a
|
8 |
#include "KDefine.h"
|
YC |
9 |
#include "MTerm2View.h"
|
|
10 |
#include "MainFrm.h"
|
b978bf
|
11 |
|
Q |
12 |
|
|
13 |
// CMyDlgBarInputShow 对话框
|
e00d5a
|
14 |
|
YC |
15 |
|
b978bf
|
16 |
|
Q |
17 |
IMPLEMENT_DYNAMIC(CMyDlgBarInputShow, CDialogBar)
|
|
18 |
|
|
19 |
CMyDlgBarInputShow::CMyDlgBarInputShow(CWnd* pParent /*=nullptr*/)
|
|
20 |
{
|
|
21 |
|
|
22 |
}
|
|
23 |
|
|
24 |
CMyDlgBarInputShow::~CMyDlgBarInputShow()
|
|
25 |
{
|
|
26 |
}
|
|
27 |
|
|
28 |
void CMyDlgBarInputShow::DoDataExchange(CDataExchange* pDX)
|
|
29 |
{
|
|
30 |
CDialogBar::DoDataExchange(pDX);
|
e00d5a
|
31 |
DDX_Control(pDX, IDC_EDIT_INPUT, m_edit_input);
|
b978bf
|
32 |
}
|
Q |
33 |
|
|
34 |
|
|
35 |
BEGIN_MESSAGE_MAP(CMyDlgBarInputShow, CDialogBar)
|
e00d5a
|
36 |
|
b978bf
|
37 |
END_MESSAGE_MAP()
|
Q |
38 |
|
|
39 |
|
|
40 |
// CMyDlgBarInputShow 消息处理程序
|
e00d5a
|
41 |
|
YC |
42 |
|
|
43 |
|
|
44 |
//SetDlgItemText(IDC_EDIT_INPUT, myButtons[0][0].sCaption);
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
int flag = 0;
|
|
50 |
int CMyDlgBarInputShow::SetDisplay(int inputInfo)
|
|
51 |
{
|
|
52 |
/*stInputCell.OP = CMTerm2View::typeNO;
|
|
53 |
stInputCell.param = KLCoilTypeY;
|
|
54 |
stInputCell.num = _T("1234");*/
|
|
55 |
|
|
56 |
static int clickCounter = 0;
|
|
57 |
static int clickCounterDF = 0;
|
|
58 |
static int clickCounterNot = 0;
|
|
59 |
static int clickCounterCMP = 0;
|
|
60 |
static int clickCounterD = 0;
|
|
61 |
static int clickCounterF = 0;
|
|
62 |
static char curTaskState = 'A';
|
|
63 |
static int lastLParam = 0;
|
|
64 |
static int lastCMP = 0;
|
|
65 |
static CString str, strStoreB, strStoreC, strNum;
|
|
66 |
static CString strOp, strParam;
|
|
67 |
|
|
68 |
|
|
69 |
CString s1, strNumTemp;
|
|
70 |
int para = 0;
|
|
71 |
int HParam, LParam;
|
|
72 |
s1.Format(_T("is this window %d"), IsWindow(m_hWnd));
|
|
73 |
SysLog(s1);
|
|
74 |
// ChangeState(inputInfo>>16, lastTaskState, curTaskState);
|
|
75 |
if (inputInfo == 0x00010008)
|
|
76 |
{
|
|
77 |
clickCounterDF++;
|
|
78 |
if (clickCounterDF == 1) //DF redefine key value
|
|
79 |
{
|
|
80 |
|
|
81 |
inputInfo = 0x00010008;
|
|
82 |
}
|
|
83 |
else if (clickCounterDF == 2)
|
|
84 |
{
|
|
85 |
inputInfo = 0x00010009;
|
|
86 |
clickCounterDF = 0;
|
|
87 |
}
|
|
88 |
}
|
|
89 |
if (inputInfo == 0x00010010)
|
|
90 |
{
|
|
91 |
clickCounter++;
|
|
92 |
|
|
93 |
if (clickCounter == 1) //updown redefine key value
|
|
94 |
{
|
|
95 |
inputInfo = 0x00010010;
|
|
96 |
}
|
|
97 |
else if (clickCounter == 2)
|
|
98 |
{
|
|
99 |
inputInfo = 0x00010011;
|
|
100 |
}
|
|
101 |
else if (clickCounter == 3)
|
|
102 |
{
|
|
103 |
inputInfo = 0x00010012;
|
|
104 |
clickCounter = 0;
|
|
105 |
}
|
|
106 |
}
|
|
107 |
if (inputInfo == 0x00010013)
|
|
108 |
{
|
|
109 |
clickCounterNot++;
|
|
110 |
if (clickCounterNot == 1) //NOT redefine key value
|
|
111 |
{
|
|
112 |
|
|
113 |
inputInfo = 0x00010013;
|
|
114 |
}
|
|
115 |
else if (clickCounterNot == 2)
|
|
116 |
{
|
|
117 |
inputInfo = 0x00010014;
|
|
118 |
clickCounterNot = 0;
|
|
119 |
}
|
|
120 |
}
|
|
121 |
|
|
122 |
if (inputInfo == 0x00010015)
|
|
123 |
{
|
|
124 |
clickCounterD++;
|
|
125 |
if (clickCounterD == 1) //D redefine key value
|
|
126 |
{
|
|
127 |
|
|
128 |
inputInfo = 0x00010015;
|
|
129 |
}
|
|
130 |
else if (clickCounterD == 2)
|
|
131 |
{
|
|
132 |
inputInfo = 0x00010017;
|
|
133 |
clickCounterD = 0;
|
|
134 |
}
|
|
135 |
}
|
|
136 |
|
|
137 |
if (inputInfo == 0x00010016)
|
|
138 |
{
|
|
139 |
clickCounterF++;
|
|
140 |
if (clickCounterF== 1) //D redefine key value
|
|
141 |
{
|
|
142 |
|
|
143 |
inputInfo = 0x00010016;
|
|
144 |
}
|
|
145 |
else if (clickCounterF == 2)
|
|
146 |
{
|
|
147 |
inputInfo = 0x00010018;
|
|
148 |
clickCounterF = 0;
|
|
149 |
}
|
|
150 |
}
|
|
151 |
|
|
152 |
HParam = inputInfo >> 16;
|
|
153 |
LParam = inputInfo & 0xffff;
|
|
154 |
|
|
155 |
|
|
156 |
switch (curTaskState)
|
|
157 |
{
|
|
158 |
case 'A':
|
|
159 |
if (HParam == 0x1) //operator 1
|
|
160 |
{
|
|
161 |
stInputCell.bnot = false;
|
|
162 |
stInputCell.bpp = false;
|
|
163 |
stInputCell.bpn = false;
|
|
164 |
stInputCell.bcmpEq = false;
|
|
165 |
stInputCell.bcmpLt = false;
|
|
166 |
stInputCell.bcmpGt = false;
|
|
167 |
stInputCell.bDouble = false;
|
|
168 |
stInputCell.bDouble1 = false;
|
|
169 |
stInputCell.bFloat = false;
|
|
170 |
stInputCell.bFloat1 = false;
|
|
171 |
stInputCell.bLeftLineUp = false;
|
|
172 |
stInputCell.brightLineUp = false;
|
|
173 |
|
|
174 |
if ((LParam>=0x1)&& (LParam <= 0x0f))
|
|
175 |
{
|
|
176 |
|
|
177 |
if ((LParam == 0x8) || (LParam == 0x9)) //IF DF not clear df
|
|
178 |
{
|
|
179 |
clickCounter = 0;
|
|
180 |
clickCounterNot = 0;
|
|
181 |
clickCounterCMP = 0;
|
|
182 |
clickCounterD = 0;
|
|
183 |
clickCounterF = 0;
|
|
184 |
}
|
|
185 |
else
|
|
186 |
{
|
|
187 |
if (lastLParam != LParam)
|
|
188 |
{
|
|
189 |
clickCounter = 0;
|
|
190 |
clickCounterNot = 0;
|
|
191 |
clickCounterDF = 0;
|
|
192 |
clickCounterCMP = 0;
|
|
193 |
clickCounterD = 0;
|
|
194 |
clickCounterF = 0;
|
|
195 |
}
|
|
196 |
}
|
|
197 |
}
|
|
198 |
if ((lastLParam == 0x14) && ((LParam == 0x10) || (LParam == 0x11) || (LParam == 0x12))) //from not to updown
|
|
199 |
{
|
|
200 |
clickCounter = 1;
|
|
201 |
clickCounterNot = 0;
|
|
202 |
clickCounterDF = 0;
|
|
203 |
clickCounterCMP = 0;
|
|
204 |
clickCounterD = 0;
|
|
205 |
clickCounterF = 0;
|
|
206 |
|
|
207 |
}
|
|
208 |
if ((lastLParam == 0x10) && ((LParam == 0x13) || (LParam == 0x14))) //from up to not
|
|
209 |
{
|
|
210 |
clickCounter = 0;
|
|
211 |
clickCounterNot = 1;
|
|
212 |
clickCounterDF = 0;
|
|
213 |
clickCounterCMP = 0;
|
|
214 |
clickCounterD = 0;
|
|
215 |
clickCounterF = 0;
|
|
216 |
|
|
217 |
}
|
|
218 |
if ((lastLParam == 0x11) && ((LParam == 0x13) || (LParam == 0x14))) //from down to not
|
|
219 |
{
|
|
220 |
clickCounter = 0;
|
|
221 |
clickCounterNot = 1;
|
|
222 |
clickCounterDF = 0;
|
|
223 |
clickCounterCMP = 0;
|
|
224 |
clickCounterD = 0;
|
|
225 |
clickCounterF = 0;
|
|
226 |
}
|
|
227 |
|
|
228 |
if ((lastLParam == 0x13) && ((LParam == 0x10)|| (LParam == 0x11)|| (LParam == 0x12))) //not
|
|
229 |
{
|
|
230 |
clickCounter = 0;
|
|
231 |
clickCounterNot = 0;
|
|
232 |
clickCounterDF = 0;
|
|
233 |
clickCounterCMP = 0;
|
|
234 |
clickCounterD = 0;
|
|
235 |
clickCounterF = 0;
|
|
236 |
|
|
237 |
}
|
|
238 |
if ((lastLParam == 0x10) && ((LParam == 0x13) || (LParam == 0x14))) //updown
|
|
239 |
{
|
|
240 |
clickCounter = 0;
|
|
241 |
clickCounterNot = 0;
|
|
242 |
clickCounterDF = 0;
|
|
243 |
clickCounterCMP = 0;
|
|
244 |
clickCounterD = 0;
|
|
245 |
clickCounterF = 0;
|
|
246 |
|
|
247 |
}
|
|
248 |
if ((lastLParam == 0x11) && ((LParam == 0x13) || (LParam == 0x14))) //updown
|
|
249 |
{
|
|
250 |
clickCounter = 0;
|
|
251 |
clickCounterNot = 0;
|
|
252 |
clickCounterDF = 0;
|
|
253 |
clickCounterCMP = 0;
|
|
254 |
clickCounterD = 0;
|
|
255 |
clickCounterF = 0;
|
|
256 |
}
|
|
257 |
|
|
258 |
if ((lastLParam == 0x15) && ((LParam == 0x16) || (LParam == 0x18))) //D ,"", F,""
|
|
259 |
{
|
|
260 |
clickCounter = 0;
|
|
261 |
clickCounterNot = 0;
|
|
262 |
clickCounterDF = 0;
|
|
263 |
clickCounterCMP = 0;
|
|
264 |
clickCounterD = 0;
|
|
265 |
clickCounterF = 1;
|
|
266 |
}
|
|
267 |
|
|
268 |
if ((lastLParam == 0x15)&&((LParam == 0x16)||(LParam == 0x18)))
|
|
269 |
{
|
|
270 |
clickCounter = 0;
|
|
271 |
clickCounterNot = 0;
|
|
272 |
clickCounterDF = 0;
|
|
273 |
clickCounterCMP = 0;
|
|
274 |
clickCounterD = 0;
|
|
275 |
clickCounterF = 1;
|
|
276 |
}
|
|
277 |
if ((lastLParam == 0x17) && ((LParam == 0x16) || (LParam == 0x18)))
|
|
278 |
{
|
|
279 |
clickCounter = 0;
|
|
280 |
clickCounterNot = 0;
|
|
281 |
clickCounterDF = 0;
|
|
282 |
clickCounterCMP = 0;
|
|
283 |
clickCounterD = 0;
|
|
284 |
clickCounterF = 1;
|
|
285 |
}
|
|
286 |
if ((lastLParam == 0x16) && ((LParam == 0x15) || (LParam == 0x17)))
|
|
287 |
{
|
|
288 |
clickCounter = 0;
|
|
289 |
clickCounterNot = 0;
|
|
290 |
clickCounterDF = 0;
|
|
291 |
clickCounterCMP = 0;
|
|
292 |
clickCounterD = 1;
|
|
293 |
clickCounterF = 0;
|
|
294 |
}
|
|
295 |
if ((lastLParam == 0x18) && ((LParam == 0x15) || (LParam == 0x17)))
|
|
296 |
{
|
|
297 |
clickCounter = 0;
|
|
298 |
clickCounterNot = 0;
|
|
299 |
clickCounterDF = 0;
|
|
300 |
clickCounterCMP = 0;
|
|
301 |
clickCounterD = 1;
|
|
302 |
clickCounterF = 0;
|
|
303 |
}
|
|
304 |
switch (LParam)
|
|
305 |
{
|
|
306 |
case 0x01:
|
|
307 |
stInputCell.OP = CMTerm2View::typeNO; stInputCell.param= 0x10; //0x10 define para null
|
|
308 |
|
|
309 |
lastLParam = LParam;
|
|
310 |
curTaskState = 'B';
|
|
311 |
break;
|
|
312 |
case 0x02:
|
|
313 |
stInputCell.OP = CMTerm2View::typeNO; stInputCell.param = 0x10;
|
|
314 |
stInputCell.bLeftLineUp = true;
|
|
315 |
stInputCell.brightLineUp = true;
|
|
316 |
lastLParam = LParam;
|
|
317 |
curTaskState = 'B';
|
|
318 |
break;
|
|
319 |
case 0x03:
|
|
320 |
stInputCell.OP = CMTerm2View::typeOUT; stInputCell.param = 0x10;
|
|
321 |
|
|
322 |
lastLParam = LParam;
|
|
323 |
curTaskState = 'B';
|
|
324 |
break;
|
|
325 |
/*case 4:
|
|
326 |
strOp = _T("(MC)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
327 |
case 5:
|
|
328 |
strOp = _T("(MCE)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;*/
|
|
329 |
case 0x06:
|
|
330 |
stInputCell.OP = CMTerm2View::typeSET; stInputCell.param = 0x10;
|
|
331 |
|
|
332 |
lastLParam = LParam;curTaskState = 'B'; break;
|
|
333 |
case 0x07:
|
|
334 |
stInputCell.OP = CMTerm2View::typeRESET; stInputCell.param = 0x10;
|
|
335 |
|
|
336 |
lastLParam = LParam;curTaskState = 'B'; break;
|
|
337 |
case 0x08:
|
|
338 |
stInputCell.OP = CMTerm2View::typeDF;stInputCell.param = 0x10;
|
|
339 |
|
|
340 |
lastLParam = LParam;
|
|
341 |
curTaskState = 'A';
|
|
342 |
break;
|
|
343 |
case 0x09:
|
|
344 |
stInputCell.OP = CMTerm2View::typeDF_;stInputCell.param = 0x10;
|
|
345 |
|
|
346 |
lastLParam = LParam;
|
|
347 |
curTaskState = 'A';
|
|
348 |
break;
|
|
349 |
case 0x0a:
|
|
350 |
strOp = _T("(ED)");strParam = "";lastLParam = LParam;curTaskState = 'A'; break;
|
|
351 |
case 0x0b:
|
|
352 |
stInputCell.OP = CMTerm2View::typeTM;stInputCell.param = 0x10;
|
|
353 |
|
|
354 |
lastLParam = LParam;
|
|
355 |
curTaskState = 'B';
|
|
356 |
break;
|
|
357 |
case 0x10:
|
|
358 |
stInputCell.bpp = true;
|
|
359 |
stInputCell.bpn = false;
|
|
360 |
lastLParam = LParam;
|
|
361 |
break;
|
|
362 |
case 0x11:
|
|
363 |
stInputCell.bpp = false;
|
|
364 |
stInputCell.bpn = true;
|
|
365 |
lastLParam = LParam;
|
|
366 |
break;
|
|
367 |
case 0x12:
|
|
368 |
stInputCell.bpp = false;
|
|
369 |
stInputCell.bpn = false;
|
|
370 |
lastLParam = LParam;
|
|
371 |
break;
|
|
372 |
case 0x13:
|
|
373 |
switch (lastLParam)
|
|
374 |
{
|
|
375 |
case 0x03:
|
|
376 |
case 0x06:
|
|
377 |
case 0x07:
|
|
378 |
case 0x15:
|
|
379 |
case 0x17:
|
|
380 |
case 0x16:
|
|
381 |
case 0x18:
|
|
382 |
case 0x20:
|
|
383 |
case 0x21:
|
|
384 |
case 0x22:
|
|
385 |
stInputCell.OP = CMTerm2View::typeNOT;
|
|
386 |
clickCounterNot = 0;
|
|
387 |
curTaskState = 'A';
|
|
388 |
default:
|
|
389 |
break;
|
|
390 |
}
|
|
391 |
switch (lastLParam)
|
|
392 |
{
|
|
393 |
case 0x01:
|
|
394 |
stInputCell.OP = CMTerm2View::typeNC;break;
|
|
395 |
case 0x02:
|
|
396 |
stInputCell.OP = CMTerm2View::typeNC;
|
|
397 |
stInputCell.bLeftLineUp = true;
|
|
398 |
stInputCell.brightLineUp = true;
|
|
399 |
break;
|
|
400 |
default:
|
|
401 |
break;
|
|
402 |
}
|
|
403 |
lastLParam = LParam;
|
|
404 |
stInputCell.bnot = true;
|
|
405 |
break;
|
|
406 |
case 0x14:
|
|
407 |
stInputCell.bnot = false;
|
|
408 |
break;
|
|
409 |
case 0x15:
|
|
410 |
stInputCell.bDouble = true;
|
|
411 |
stInputCell.bDouble1 = false;
|
|
412 |
stInputCell.bFloat = false;
|
|
413 |
stInputCell.bFloat1 = false;
|
|
414 |
lastLParam = LParam;stInputCell.param = 0x10;curTaskState = 'B';
|
|
415 |
break;
|
|
416 |
case 0x17:
|
|
417 |
stInputCell.bDouble = false;
|
|
418 |
stInputCell.bDouble1 = true;
|
|
419 |
stInputCell.bFloat = false;
|
|
420 |
stInputCell.bFloat1 = false;
|
|
421 |
lastLParam = LParam;stInputCell.param = 0x10;curTaskState = 'B';
|
|
422 |
break;
|
|
423 |
case 0x16:
|
|
424 |
stInputCell.bDouble = false;
|
|
425 |
stInputCell.bDouble1 = false;
|
|
426 |
stInputCell.bFloat = true;
|
|
427 |
stInputCell.bFloat1 = false;
|
|
428 |
lastLParam = LParam;stInputCell.param = 0x10;curTaskState = 'B';
|
|
429 |
break;
|
|
430 |
case 0x18:
|
|
431 |
stInputCell.bDouble = false;
|
|
432 |
stInputCell.bDouble1 = false;
|
|
433 |
stInputCell.bFloat = false;
|
|
434 |
stInputCell.bFloat1 = true;
|
|
435 |
lastLParam = LParam;stInputCell.param = 0x10;curTaskState = 'B';
|
|
436 |
break;
|
|
437 |
default:
|
|
438 |
break;
|
|
439 |
}
|
|
440 |
}
|
|
441 |
|
|
442 |
str = strOp;
|
|
443 |
break;
|
|
444 |
case 'B':
|
|
445 |
str = strOp;
|
|
446 |
if (HParam == 0x1) //operator 1
|
|
447 |
{
|
|
448 |
stInputCell.bnot = false;
|
|
449 |
stInputCell.bpp = false;
|
|
450 |
stInputCell.bpn = false;
|
|
451 |
stInputCell.bcmpEq = false;
|
|
452 |
stInputCell.bcmpLt = false;
|
|
453 |
stInputCell.bcmpGt = false;
|
|
454 |
stInputCell.bDouble = false;
|
|
455 |
stInputCell.bDouble1 = false;
|
|
456 |
stInputCell.bFloat = false;
|
|
457 |
stInputCell.bFloat1 = false;
|
|
458 |
stInputCell.bLeftLineUp = false;
|
|
459 |
stInputCell.brightLineUp = false;
|
|
460 |
if ((LParam >= 0x0) && (LParam <= 0x0f))
|
|
461 |
{
|
|
462 |
|
|
463 |
if ((LParam == 0x08) || (LParam ==0x09))
|
|
464 |
{
|
|
465 |
clickCounter = 0;
|
|
466 |
clickCounterNot = 0;
|
|
467 |
clickCounterCMP = 0;
|
|
468 |
clickCounterD = 0;
|
|
469 |
clickCounterF = 0;
|
|
470 |
}
|
|
471 |
else
|
|
472 |
{
|
|
473 |
if (lastLParam != LParam)
|
|
474 |
{
|
|
475 |
clickCounter = 0;
|
|
476 |
clickCounterNot = 0;
|
|
477 |
clickCounterDF = 0;
|
|
478 |
clickCounterCMP = 0;
|
|
479 |
clickCounterD = 0;
|
|
480 |
clickCounterF = 0;
|
|
481 |
}
|
|
482 |
}
|
|
483 |
|
|
484 |
}
|
|
485 |
if ((lastLParam == 0x13) && ((LParam == 0x10) || (LParam == 0x11) || (LParam == 0x12))) //from not to updown
|
|
486 |
{
|
|
487 |
clickCounter = 1;
|
|
488 |
clickCounterNot = 0;
|
|
489 |
clickCounterDF = 0;
|
|
490 |
clickCounterCMP = 0;
|
|
491 |
clickCounterD = 0;
|
|
492 |
clickCounterF = 0;
|
|
493 |
|
|
494 |
}
|
|
495 |
if ((lastLParam == 0x14) && ((LParam == 0x10) || (LParam == 0x11) || (LParam == 0x12))) //from not to updown
|
|
496 |
{
|
|
497 |
clickCounter = 1;
|
|
498 |
clickCounterNot = 0;
|
|
499 |
clickCounterDF = 0;
|
|
500 |
clickCounterCMP = 0;
|
|
501 |
clickCounterD = 0;
|
|
502 |
clickCounterF = 0;
|
|
503 |
|
|
504 |
}
|
|
505 |
if ((lastLParam == 0x10) && ((LParam == 0x13) || (LParam == 0x14))) //from up to not
|
|
506 |
{
|
|
507 |
clickCounter = 0;
|
|
508 |
clickCounterNot = 1;
|
|
509 |
clickCounterDF = 0;
|
|
510 |
clickCounterCMP = 0;
|
|
511 |
clickCounterD = 0;
|
|
512 |
clickCounterF = 0;
|
|
513 |
|
|
514 |
}
|
|
515 |
if ((lastLParam == 0x11) && ((LParam == 0x13) || (LParam == 0x14))) //from down to not
|
|
516 |
{
|
|
517 |
clickCounter = 0;
|
|
518 |
clickCounterNot = 1;
|
|
519 |
clickCounterDF = 0;
|
|
520 |
clickCounterCMP = 0;
|
|
521 |
clickCounterD = 0;
|
|
522 |
clickCounterF = 0;
|
|
523 |
}
|
|
524 |
if ((lastLParam == 0x15) && ((LParam == 0x16) || (LParam == 0x18)))
|
|
525 |
{
|
|
526 |
clickCounter = 0;
|
|
527 |
clickCounterNot = 0;
|
|
528 |
clickCounterDF = 0;
|
|
529 |
clickCounterCMP = 0;
|
|
530 |
clickCounterD = 0;
|
|
531 |
clickCounterF = 1;
|
|
532 |
}
|
|
533 |
if ((lastLParam == 0x17) && ((LParam == 0x16) || (LParam == 0x18)))
|
|
534 |
{
|
|
535 |
clickCounter = 0;
|
|
536 |
clickCounterNot = 0;
|
|
537 |
clickCounterDF = 0;
|
|
538 |
clickCounterCMP = 0;
|
|
539 |
clickCounterD = 0;
|
|
540 |
clickCounterF = 1;
|
|
541 |
}
|
|
542 |
if ((lastLParam == 0x16) && ((LParam == 0x15) || (LParam == 0x17)))
|
|
543 |
{
|
|
544 |
clickCounter = 0;
|
|
545 |
clickCounterNot = 0;
|
|
546 |
clickCounterDF = 0;
|
|
547 |
clickCounterCMP = 0;
|
|
548 |
clickCounterD = 1;
|
|
549 |
clickCounterF = 0;
|
|
550 |
}
|
|
551 |
if ((lastLParam == 0x18) && ((LParam == 0x15) || (LParam == 0x17)))
|
|
552 |
{
|
|
553 |
clickCounter = 0;
|
|
554 |
clickCounterNot = 0;
|
|
555 |
clickCounterDF = 0;
|
|
556 |
clickCounterCMP = 0;
|
|
557 |
clickCounterD = 1;
|
|
558 |
clickCounterF = 0;
|
|
559 |
}
|
|
560 |
switch (LParam)
|
|
561 |
{
|
|
562 |
case 0x01:
|
|
563 |
stInputCell.OP = CMTerm2View::typeNO; stInputCell.param = 0x10; //0x10 define para null
|
|
564 |
|
|
565 |
lastLParam = LParam;
|
|
566 |
curTaskState = 'B';
|
|
567 |
break;
|
|
568 |
case 0x02:
|
|
569 |
stInputCell.OP = CMTerm2View::typeNO; stInputCell.param = 0x10;
|
|
570 |
stInputCell.bLeftLineUp = true;
|
|
571 |
stInputCell.brightLineUp = true;
|
|
572 |
lastLParam = LParam;
|
|
573 |
curTaskState = 'B';
|
|
574 |
break;
|
|
575 |
case 0x03:
|
|
576 |
stInputCell.OP = CMTerm2View::typeOUT; stInputCell.param = 0x10;
|
|
577 |
|
|
578 |
lastLParam = LParam;
|
|
579 |
curTaskState = 'B';
|
|
580 |
break;
|
|
581 |
/*case 4:
|
|
582 |
strOp = _T("(MC)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
583 |
case 5:
|
|
584 |
strOp = _T("(MCE)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;*/
|
|
585 |
case 0x06:
|
|
586 |
stInputCell.OP = CMTerm2View::typeSET; stInputCell.param = 0x10; ;lastLParam = LParam;curTaskState = 'B'; break;
|
|
587 |
case 0x07:
|
|
588 |
stInputCell.OP = CMTerm2View::typeRESET; stInputCell.param = 0x10; ;lastLParam = LParam;curTaskState = 'B'; break;
|
|
589 |
case 0x08:
|
|
590 |
stInputCell.OP = CMTerm2View::typeDF;;stInputCell.param = 0x10;
|
|
591 |
|
|
592 |
lastLParam = LParam;
|
|
593 |
curTaskState = 'A';
|
|
594 |
break;
|
|
595 |
case 0x9:
|
|
596 |
stInputCell.OP = CMTerm2View::typeDF_;stInputCell.param = 0x10;
|
|
597 |
|
|
598 |
lastLParam = LParam;
|
|
599 |
curTaskState = 'A';
|
|
600 |
break;
|
|
601 |
case 0x0a:
|
|
602 |
strOp = _T("(ED)");strParam = "";lastLParam = LParam;curTaskState = 'A'; break;
|
|
603 |
case 0x0b:
|
|
604 |
stInputCell.OP = CMTerm2View::typeTM;stInputCell.param = 0x10;
|
|
605 |
|
|
606 |
lastLParam = LParam;
|
|
607 |
curTaskState = 'B';
|
|
608 |
break;
|
|
609 |
case 0x10:
|
|
610 |
stInputCell.bpp = true;
|
|
611 |
stInputCell.bpn = false;
|
|
612 |
lastLParam = LParam;
|
|
613 |
break;
|
|
614 |
case 0x11:
|
|
615 |
stInputCell.bpp = false;
|
|
616 |
stInputCell.bpn = true;
|
|
617 |
lastLParam = LParam;
|
|
618 |
break;
|
|
619 |
case 0x12:
|
|
620 |
stInputCell.bpp = false;
|
|
621 |
stInputCell.bpn = false;
|
|
622 |
lastLParam = LParam;
|
|
623 |
break;
|
|
624 |
case 0x13:
|
|
625 |
switch (lastLParam)
|
|
626 |
{
|
|
627 |
case 0x03:
|
|
628 |
case 0x06:
|
|
629 |
case 0x07:
|
|
630 |
case 0x15:
|
|
631 |
case 0x17:
|
|
632 |
case 0x16:
|
|
633 |
case 0x18:
|
|
634 |
case 0x20:
|
|
635 |
case 0x21:
|
|
636 |
case 0x22:
|
|
637 |
stInputCell.OP = CMTerm2View::typeNOT;
|
|
638 |
clickCounterNot = 0;
|
|
639 |
curTaskState = 'A';
|
|
640 |
default:
|
|
641 |
break;
|
|
642 |
}
|
|
643 |
|
|
644 |
switch (lastLParam)
|
|
645 |
{
|
|
646 |
case 0x01:
|
|
647 |
stInputCell.OP = CMTerm2View::typeNC;break;
|
|
648 |
case 0x02:
|
|
649 |
stInputCell.OP = CMTerm2View::typeNC;
|
|
650 |
stInputCell.bLeftLineUp = true;
|
|
651 |
stInputCell.brightLineUp = true;
|
|
652 |
break;
|
|
653 |
default:
|
|
654 |
break;
|
|
655 |
}
|
|
656 |
|
|
657 |
lastLParam = LParam;
|
|
658 |
stInputCell.bnot = true;
|
|
659 |
break;
|
|
660 |
case 0x14:
|
|
661 |
stInputCell.bnot = false;
|
|
662 |
break;
|
|
663 |
case 0x15:
|
|
664 |
stInputCell.bDouble = true;
|
|
665 |
stInputCell.bDouble1 = false;
|
|
666 |
stInputCell.bFloat = false;
|
|
667 |
stInputCell.bFloat1 = false;
|
|
668 |
stInputCell.param = 0x10;lastLParam = LParam;curTaskState = 'B';
|
|
669 |
break;
|
|
670 |
case 0x17:
|
|
671 |
stInputCell.bDouble = false;
|
|
672 |
stInputCell.bDouble1 = true;
|
|
673 |
stInputCell.bFloat = false;
|
|
674 |
stInputCell.bFloat1 = false;
|
|
675 |
stInputCell.param = 0x10;lastLParam = LParam;curTaskState = 'B';
|
|
676 |
break;
|
|
677 |
case 0x16:
|
|
678 |
stInputCell.bDouble = false;
|
|
679 |
stInputCell.bDouble1 = false;
|
|
680 |
stInputCell.bFloat = true;
|
|
681 |
stInputCell.bFloat1 = false;
|
|
682 |
lastLParam = LParam;stInputCell.param = 0x10;curTaskState = 'B';
|
|
683 |
break;
|
|
684 |
case 0x18:
|
|
685 |
stInputCell.bDouble = false;
|
|
686 |
stInputCell.bDouble1 = false;
|
|
687 |
stInputCell.bFloat = false;
|
|
688 |
stInputCell.bFloat1 = true;
|
|
689 |
lastLParam = LParam;stInputCell.param = 0x10;curTaskState = 'B';
|
|
690 |
break;
|
|
691 |
default:
|
|
692 |
break;
|
|
693 |
}
|
|
694 |
}
|
|
695 |
else if (HParam == 0x2)
|
|
696 |
{
|
|
697 |
switch (LParam)
|
|
698 |
{
|
|
699 |
case 1:
|
|
700 |
stInputCell.param = KLCoilTypeX;curTaskState = 'C'; break;
|
|
701 |
case 2:
|
|
702 |
stInputCell.param = KLCoilTypeY;curTaskState = 'C'; break;
|
|
703 |
case 3:
|
|
704 |
stInputCell.param = KLCoilTypeR;curTaskState = 'C'; break;
|
|
705 |
case 4:
|
|
706 |
stInputCell.param = KLCoilTypeLR; curTaskState = 'C';break;
|
|
707 |
case 5:
|
|
708 |
strParam = _T(" P");curTaskState = 'C'; break;
|
|
709 |
case 6:
|
|
710 |
stInputCell.param = KLCoilTypeT; curTaskState = 'C';break;
|
|
711 |
case 7:
|
|
712 |
stInputCell.param = KLCoilTypeC;curTaskState = 'C'; break;
|
|
713 |
case 8:
|
|
714 |
strParam = _T(" E");curTaskState = 'C'; break;
|
|
715 |
case 9:
|
|
716 |
stInputCell.param = OP_TMX;curTaskState = 'C'; break;
|
|
717 |
case 0x0a:
|
|
718 |
stInputCell.param = OP_TMY;curTaskState = 'C'; break;
|
|
719 |
case 0x0b:
|
|
720 |
stInputCell.param = OP_TMR;curTaskState = 'C'; break;
|
|
721 |
case 0x0c:
|
|
722 |
stInputCell.param = OP_TML;curTaskState = 'C'; break;
|
|
723 |
case 0x0d:
|
|
724 |
if ((lastLParam==0x03)|| (lastLParam == 0x06)|| (lastLParam == 0x07)|| (lastLParam == 0x08)|| (lastLParam == 0x09))
|
|
725 |
{
|
|
726 |
stInputCell.OP = CMTerm2View::typeNO;
|
|
727 |
stInputCell.bnot = false;
|
|
728 |
stInputCell.bpp = false;
|
|
729 |
stInputCell.bpn = false;
|
|
730 |
clickCounter = 0;
|
|
731 |
clickCounterNot = 0;
|
|
732 |
clickCounterDF = 0;
|
|
733 |
clickCounterD = 0;
|
|
734 |
clickCounterF = 0;
|
|
735 |
}
|
|
736 |
lastLParam = 0x20;
|
|
737 |
stInputCell.bcmpEq = true;
|
|
738 |
if(lastCMP!= LParam)
|
|
739 |
{
|
|
740 |
clickCounterCMP++;
|
|
741 |
}
|
|
742 |
else
|
|
743 |
{
|
|
744 |
clickCounterCMP = 1;
|
|
745 |
stInputCell.bcmpGt = false;
|
|
746 |
stInputCell.bcmpLt = false;
|
|
747 |
}
|
|
748 |
|
|
749 |
if (clickCounterCMP>2)
|
|
750 |
{
|
|
751 |
clickCounterCMP = 1;
|
|
752 |
stInputCell.bcmpGt = false;
|
|
753 |
stInputCell.bcmpLt = false;
|
|
754 |
}
|
|
755 |
lastCMP = LParam;
|
|
756 |
curTaskState = 'B'; break;
|
|
757 |
case 0x0e:
|
|
758 |
if ((lastLParam == 0x03) || (lastLParam == 0x06) || (lastLParam == 0x07) || (lastLParam == 0x08) || (lastLParam == 0x09))
|
|
759 |
{
|
|
760 |
stInputCell.OP = CMTerm2View::typeNO;
|
|
761 |
stInputCell.bnot = false;
|
|
762 |
stInputCell.bpp = false;
|
|
763 |
stInputCell.bpn = false;
|
|
764 |
clickCounter = 0;
|
|
765 |
clickCounterNot = 0;
|
|
766 |
clickCounterDF = 0;
|
|
767 |
clickCounterD = 0;
|
|
768 |
clickCounterF = 0;
|
|
769 |
}
|
|
770 |
lastLParam = 0x21;
|
|
771 |
stInputCell.bcmpGt = true;
|
|
772 |
if (lastCMP != LParam)
|
|
773 |
{
|
|
774 |
clickCounterCMP++;
|
|
775 |
}
|
|
776 |
else
|
|
777 |
{
|
|
778 |
clickCounterCMP = 1;
|
|
779 |
stInputCell.bcmpEq = false;
|
|
780 |
stInputCell.bcmpLt = false;
|
|
781 |
}
|
|
782 |
|
|
783 |
if (clickCounterCMP > 2)
|
|
784 |
{
|
|
785 |
clickCounterCMP = 1;
|
|
786 |
stInputCell.bcmpEq = false;
|
|
787 |
stInputCell.bcmpLt = false;
|
|
788 |
}
|
|
789 |
lastCMP = LParam;
|
|
790 |
curTaskState = 'B'; break;
|
|
791 |
case 0x0f:
|
|
792 |
if ((lastLParam == 0x03) || (lastLParam == 0x06) || (lastLParam == 0x07) || (lastLParam == 0x08) || (lastLParam == 0x09))
|
|
793 |
{
|
|
794 |
stInputCell.OP = CMTerm2View::typeNO;
|
|
795 |
stInputCell.bnot = false;
|
|
796 |
stInputCell.bpp = false;
|
|
797 |
stInputCell.bpn = false;
|
|
798 |
clickCounter = 0;
|
|
799 |
clickCounterNot = 0;
|
|
800 |
clickCounterDF = 0;
|
|
801 |
clickCounterD = 0;
|
|
802 |
clickCounterF = 0;
|
|
803 |
}
|
|
804 |
lastLParam = 0x22; // define op para; for translate to -/-
|
|
805 |
stInputCell.bcmpLt = true;
|
|
806 |
if (lastCMP != LParam)
|
|
807 |
{
|
|
808 |
clickCounterCMP++;
|
|
809 |
}
|
|
810 |
else
|
|
811 |
{
|
|
812 |
clickCounterCMP = 1;
|
|
813 |
stInputCell.bcmpEq = false;
|
|
814 |
stInputCell.bcmpGt = false;
|
|
815 |
}
|
|
816 |
|
|
817 |
if (clickCounterCMP > 2)
|
|
818 |
{
|
|
819 |
clickCounterCMP = 1;
|
|
820 |
stInputCell.bcmpEq = false;
|
|
821 |
stInputCell.bcmpGt = false;
|
|
822 |
}
|
|
823 |
lastCMP = LParam; //record key num = > <
|
|
824 |
curTaskState = 'B'; break;
|
|
825 |
default:
|
|
826 |
break;
|
|
827 |
}
|
|
828 |
}
|
|
829 |
|
|
830 |
break;
|
|
831 |
case 'C':
|
|
832 |
// str = strOp + _T(" ") + strParam;
|
|
833 |
if (HParam == 0x01) //operator 1
|
|
834 |
{
|
|
835 |
stInputCell.bnot = false;
|
|
836 |
stInputCell.bpp = false;
|
|
837 |
stInputCell.bpn = false;
|
|
838 |
stInputCell.bcmpEq = false;
|
|
839 |
stInputCell.bcmpLt = false;
|
|
840 |
stInputCell.bcmpGt = false;
|
|
841 |
stInputCell.bDouble = false;
|
|
842 |
stInputCell.bFloat1 = false;
|
|
843 |
stInputCell.bFloat = false;
|
|
844 |
stInputCell.bFloat1 = false;
|
|
845 |
stInputCell.bLeftLineUp = false;
|
|
846 |
stInputCell.brightLineUp = false;
|
|
847 |
|
|
848 |
if ((LParam >= 0x01) && (LParam <= 0x0f))
|
|
849 |
{
|
|
850 |
|
|
851 |
if ((LParam == 0x08) || (LParam ==0x09))
|
|
852 |
{
|
|
853 |
clickCounter = 0;
|
|
854 |
clickCounterNot = 0;
|
|
855 |
clickCounterCMP = 0;
|
|
856 |
clickCounterD = 0;
|
|
857 |
clickCounterF = 0;
|
|
858 |
}
|
|
859 |
else
|
|
860 |
{
|
|
861 |
if (lastLParam != LParam)
|
|
862 |
{
|
|
863 |
clickCounter = 0;
|
|
864 |
clickCounterNot = 0;
|
|
865 |
clickCounterDF = 0;
|
|
866 |
clickCounterCMP = 0;
|
|
867 |
clickCounterD = 0;
|
|
868 |
clickCounterF = 0;
|
|
869 |
}
|
|
870 |
}
|
|
871 |
|
|
872 |
}
|
|
873 |
if ((lastLParam == 0x14) && ((LParam == 0x10) || (LParam == 0x11) || (LParam == 0x12))) //from not to updown
|
|
874 |
{
|
|
875 |
clickCounter = 1;
|
|
876 |
clickCounterNot = 0;
|
|
877 |
clickCounterDF = 0;
|
|
878 |
clickCounterCMP = 0;
|
|
879 |
clickCounterD = 0;
|
|
880 |
clickCounterF = 0;
|
|
881 |
|
|
882 |
}
|
|
883 |
if ((lastLParam == 0x10) && ((LParam == 0x13) || (LParam == 0x14))) //from up to not
|
|
884 |
{
|
|
885 |
clickCounter = 0;
|
|
886 |
clickCounterNot = 1;
|
|
887 |
clickCounterDF = 0;
|
|
888 |
clickCounterCMP = 0;
|
|
889 |
clickCounterD = 0;
|
|
890 |
clickCounterF = 0;
|
|
891 |
|
|
892 |
}
|
|
893 |
if ((lastLParam == 0x11) && ((LParam == 0x13) || (LParam == 0x14))) //from down to not
|
|
894 |
{
|
|
895 |
clickCounter = 0;
|
|
896 |
clickCounterNot = 1;
|
|
897 |
clickCounterDF = 0;
|
|
898 |
clickCounterCMP = 0;
|
|
899 |
clickCounterD = 0;
|
|
900 |
clickCounterF = 0;
|
|
901 |
}
|
|
902 |
if ((lastLParam == 0x13) && ((LParam == 0x10) || (LParam == 0x11) || (LParam == 0x12))) //not
|
|
903 |
{
|
|
904 |
clickCounter = 0;
|
|
905 |
clickCounterNot = 0;
|
|
906 |
clickCounterDF = 0;
|
|
907 |
clickCounterCMP = 0;
|
|
908 |
clickCounterD = 0;
|
|
909 |
clickCounterF = 0;
|
|
910 |
|
|
911 |
}
|
|
912 |
if ((lastLParam == 0x10) && ((LParam == 0x13) || (LParam == 0x14))) //updown
|
|
913 |
{
|
|
914 |
clickCounter = 0;
|
|
915 |
clickCounterNot = 0;
|
|
916 |
clickCounterDF = 0;
|
|
917 |
clickCounterCMP = 0;
|
|
918 |
clickCounterD = 0;
|
|
919 |
clickCounterF = 0;
|
|
920 |
|
|
921 |
}
|
|
922 |
if ((lastLParam == 0x11) && ((LParam == 0x13) || (LParam == 0x14))) //updown
|
|
923 |
{
|
|
924 |
clickCounter = 0;
|
|
925 |
clickCounterNot = 0;
|
|
926 |
clickCounterDF = 0;
|
|
927 |
clickCounterCMP = 0;
|
|
928 |
clickCounterD = 0;
|
|
929 |
clickCounterF = 0;
|
|
930 |
}
|
|
931 |
if ((lastLParam == 0x15) && ((LParam == 0x16) || (LParam == 0x18)))
|
|
932 |
{
|
|
933 |
clickCounter = 0;
|
|
934 |
clickCounterNot = 0;
|
|
935 |
clickCounterDF = 0;
|
|
936 |
clickCounterCMP = 0;
|
|
937 |
clickCounterD = 0;
|
|
938 |
clickCounterF = 1;
|
|
939 |
}
|
|
940 |
if ((lastLParam == 0x17) && ((LParam == 0x16) || (LParam == 0x18)))
|
|
941 |
{
|
|
942 |
clickCounter = 0;
|
|
943 |
clickCounterNot = 0;
|
|
944 |
clickCounterDF = 0;
|
|
945 |
clickCounterCMP = 0;
|
|
946 |
clickCounterD = 0;
|
|
947 |
clickCounterF = 1;
|
|
948 |
}
|
|
949 |
if ((lastLParam == 0x16) && ((LParam == 0x15) || (LParam == 0x17)))
|
|
950 |
{
|
|
951 |
clickCounter = 0;
|
|
952 |
clickCounterNot = 0;
|
|
953 |
clickCounterDF = 0;
|
|
954 |
clickCounterCMP = 0;
|
|
955 |
clickCounterD = 1;
|
|
956 |
clickCounterF = 0;
|
|
957 |
}
|
|
958 |
if ((lastLParam == 0x18) && ((LParam == 0x15) || (LParam == 0x17)))
|
|
959 |
{
|
|
960 |
clickCounter = 0;
|
|
961 |
clickCounterNot = 0;
|
|
962 |
clickCounterDF = 0;
|
|
963 |
clickCounterCMP = 0;
|
|
964 |
clickCounterD = 1;
|
|
965 |
clickCounterF = 0;
|
|
966 |
}
|
|
967 |
switch (LParam)
|
|
968 |
{
|
|
969 |
case 0x01:
|
|
970 |
stInputCell.OP = CMTerm2View::typeNO; stInputCell.param = 0x10; //0x10 define para null
|
|
971 |
|
|
972 |
lastLParam = LParam;
|
|
973 |
curTaskState = 'B';
|
|
974 |
break;
|
|
975 |
case 0x02:
|
|
976 |
stInputCell.OP = CMTerm2View::typeNO; stInputCell.param = 0x10;
|
|
977 |
stInputCell.bLeftLineUp = true;
|
|
978 |
stInputCell.brightLineUp = true;
|
|
979 |
lastLParam = LParam;
|
|
980 |
curTaskState = 'B';
|
|
981 |
break;
|
|
982 |
case 0x03:
|
|
983 |
stInputCell.OP = CMTerm2View::typeOUT; stInputCell.param = 0x10;
|
|
984 |
lastLParam = LParam;
|
|
985 |
curTaskState = 'B';
|
|
986 |
break;
|
|
987 |
/*case 4:
|
|
988 |
strOp = _T("(MC)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
989 |
case 5:
|
|
990 |
strOp = _T("(MCE)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;*/
|
|
991 |
case 0x06:
|
|
992 |
stInputCell.OP = CMTerm2View::typeSET; stInputCell.param = 0x10; ;lastLParam = LParam;curTaskState = 'B'; break;
|
|
993 |
case 0x07:
|
|
994 |
stInputCell.OP = CMTerm2View::typeRESET; stInputCell.param = 0x10; ;lastLParam = LParam;curTaskState = 'B'; break;
|
|
995 |
case 0x08:
|
|
996 |
stInputCell.OP = CMTerm2View::typeDF;;stInputCell.param = 0x10;
|
|
997 |
lastLParam = LParam;
|
|
998 |
curTaskState = 'A';
|
|
999 |
break;
|
|
1000 |
case 0x09:
|
|
1001 |
stInputCell.OP = CMTerm2View::typeDF_;stInputCell.param = 0x10;
|
|
1002 |
|
|
1003 |
lastLParam = LParam;
|
|
1004 |
curTaskState = 'A';
|
|
1005 |
break;
|
|
1006 |
case 0x0a:
|
|
1007 |
strOp = _T("(ED)");strParam = "";lastLParam = LParam;curTaskState = 'A'; break;
|
|
1008 |
case 0x0b:
|
|
1009 |
stInputCell.OP = CMTerm2View::typeTM;stInputCell.param = 0x10;
|
|
1010 |
|
|
1011 |
lastLParam = LParam;
|
|
1012 |
curTaskState = 'B';
|
|
1013 |
break;
|
|
1014 |
case 0x10:
|
|
1015 |
stInputCell.bpp = true;
|
|
1016 |
stInputCell.bpn = false;
|
|
1017 |
break;
|
|
1018 |
case 0x11:
|
|
1019 |
stInputCell.bpp = false;
|
|
1020 |
stInputCell.bpn = true;
|
|
1021 |
break;
|
|
1022 |
case 0x12:
|
|
1023 |
stInputCell.bpp = false;
|
|
1024 |
stInputCell.bpn = false;
|
|
1025 |
break;
|
|
1026 |
case 0x13:
|
|
1027 |
switch (lastLParam)
|
|
1028 |
{
|
|
1029 |
case 0x03:
|
|
1030 |
case 0x06:
|
|
1031 |
case 0x07:
|
|
1032 |
case 0x15:
|
|
1033 |
case 0x17:
|
|
1034 |
case 0x16:
|
|
1035 |
case 0x18:
|
|
1036 |
case 0x20:
|
|
1037 |
case 0x21:
|
|
1038 |
case 0x22:
|
|
1039 |
stInputCell.OP = CMTerm2View::typeNOT;
|
|
1040 |
clickCounterNot = 0;
|
|
1041 |
|
|
1042 |
curTaskState = 'A';
|
|
1043 |
default:
|
|
1044 |
break;
|
|
1045 |
}
|
|
1046 |
switch (lastLParam)
|
|
1047 |
{
|
|
1048 |
case 0x01:
|
|
1049 |
stInputCell.OP = CMTerm2View::typeNC;break;
|
|
1050 |
case 0x02:
|
|
1051 |
stInputCell.OP = CMTerm2View::typeNC;
|
|
1052 |
stInputCell.bLeftLineUp = true;
|
|
1053 |
stInputCell.brightLineUp = true;
|
|
1054 |
break;
|
|
1055 |
default:
|
|
1056 |
break;
|
|
1057 |
}
|
|
1058 |
lastLParam = LParam;
|
|
1059 |
stInputCell.bnot = true;
|
|
1060 |
|
|
1061 |
break;
|
|
1062 |
case 0x14:
|
|
1063 |
stInputCell.bnot = false;
|
|
1064 |
break;
|
|
1065 |
case 0x15:
|
|
1066 |
stInputCell.bDouble = true;
|
|
1067 |
stInputCell.bDouble1 = false;
|
|
1068 |
stInputCell.bFloat = false;
|
|
1069 |
stInputCell.bFloat1 = false;
|
|
1070 |
stInputCell.param = 0x10;lastLParam = LParam;curTaskState = 'B';
|
|
1071 |
break;
|
|
1072 |
case 0x17:
|
|
1073 |
stInputCell.bDouble = false;
|
|
1074 |
stInputCell.bDouble1 = true;
|
|
1075 |
stInputCell.bFloat = false;
|
|
1076 |
stInputCell.bFloat1 = false;
|
|
1077 |
stInputCell.param = 0x10;lastLParam = LParam;curTaskState = 'B';
|
|
1078 |
break;
|
|
1079 |
case 0x16:
|
|
1080 |
stInputCell.bDouble = false;
|
|
1081 |
stInputCell.bDouble1 = false;
|
|
1082 |
stInputCell.bFloat = true;
|
|
1083 |
stInputCell.bFloat1 = false;
|
|
1084 |
lastLParam = LParam;stInputCell.param = 0x10;curTaskState = 'B';
|
|
1085 |
break;
|
|
1086 |
case 0x18:
|
|
1087 |
stInputCell.bDouble = false;
|
|
1088 |
stInputCell.bDouble1 = false;
|
|
1089 |
stInputCell.bFloat = false;
|
|
1090 |
stInputCell.bFloat1 = true;
|
|
1091 |
lastLParam = LParam;stInputCell.param = 0x10;curTaskState = 'B';
|
|
1092 |
break;
|
|
1093 |
default:
|
|
1094 |
break;
|
|
1095 |
}
|
|
1096 |
}
|
|
1097 |
else if (HParam == 0x2)
|
|
1098 |
{
|
|
1099 |
switch (LParam)
|
|
1100 |
{
|
|
1101 |
case 1:
|
|
1102 |
stInputCell.param = KLCoilTypeX;curTaskState = 'C'; break;
|
|
1103 |
case 2:
|
|
1104 |
stInputCell.param = KLCoilTypeY;curTaskState = 'C'; break;
|
|
1105 |
case 3:
|
|
1106 |
stInputCell.param = KLCoilTypeR;curTaskState = 'C'; break;
|
|
1107 |
case 4:
|
|
1108 |
stInputCell.param = KLCoilTypeLR; curTaskState = 'C';break;
|
|
1109 |
case 5:
|
|
1110 |
strParam = _T(" P");curTaskState = 'C'; break;
|
|
1111 |
case 6:
|
|
1112 |
stInputCell.param = KLCoilTypeT; curTaskState = 'C';break;
|
|
1113 |
case 7:
|
|
1114 |
stInputCell.param = KLCoilTypeC;curTaskState = 'C'; break;
|
|
1115 |
case 8:
|
|
1116 |
strParam = _T(" E");curTaskState = 'C'; break;
|
|
1117 |
case 9:
|
|
1118 |
stInputCell.param = OP_TMX;curTaskState = 'C'; break;
|
|
1119 |
case 0x0a:
|
|
1120 |
stInputCell.param = OP_TMY;curTaskState = 'C'; break;
|
|
1121 |
case 0x0b:
|
|
1122 |
stInputCell.param = OP_TMR;curTaskState = 'C'; break;
|
|
1123 |
case 0x0c:
|
|
1124 |
stInputCell.param = OP_TML;curTaskState = 'C'; break;
|
|
1125 |
case 0x0d:
|
|
1126 |
if ((lastLParam == 0x03) || (lastLParam == 0x06) || (lastLParam == 0x07) || (lastLParam == 0x08) || (lastLParam == 0x09))
|
|
1127 |
{
|
|
1128 |
stInputCell.OP = CMTerm2View::typeNO;
|
|
1129 |
stInputCell.bnot = false;
|
|
1130 |
stInputCell.bpp = false;
|
|
1131 |
stInputCell.bpn = false;
|
|
1132 |
clickCounter = 0;
|
|
1133 |
clickCounterNot = 0;
|
|
1134 |
clickCounterDF = 0;
|
|
1135 |
clickCounterD = 0;
|
|
1136 |
clickCounterF = 0;
|
|
1137 |
}
|
|
1138 |
lastLParam = 0x20;
|
|
1139 |
stInputCell.bcmpEq = true;
|
|
1140 |
if (lastCMP != LParam)
|
|
1141 |
{
|
|
1142 |
clickCounterCMP++;
|
|
1143 |
}
|
|
1144 |
else
|
|
1145 |
{
|
|
1146 |
clickCounterCMP = 1;
|
|
1147 |
stInputCell.bcmpGt = false;
|
|
1148 |
stInputCell.bcmpLt = false;
|
|
1149 |
}
|
|
1150 |
if (clickCounterCMP > 2)
|
|
1151 |
{
|
|
1152 |
clickCounterCMP = 1;
|
|
1153 |
stInputCell.bcmpGt = false;
|
|
1154 |
stInputCell.bcmpLt = false;
|
|
1155 |
}
|
|
1156 |
lastCMP = LParam;
|
|
1157 |
curTaskState = 'B'; break;
|
|
1158 |
case 0x0e:
|
|
1159 |
if ((lastLParam == 0x03) || (lastLParam == 0x06) || (lastLParam == 0x07) || (lastLParam == 0x08) || (lastLParam == 0x09))
|
|
1160 |
{
|
|
1161 |
stInputCell.OP = CMTerm2View::typeNO;
|
|
1162 |
stInputCell.bnot = false;
|
|
1163 |
stInputCell.bpp = false;
|
|
1164 |
stInputCell.bpn = false;
|
|
1165 |
clickCounter = 0;
|
|
1166 |
clickCounterNot = 0;
|
|
1167 |
clickCounterDF = 0;
|
|
1168 |
clickCounterD = 0;
|
|
1169 |
clickCounterF = 0;
|
|
1170 |
}
|
|
1171 |
lastLParam = 0x21;
|
|
1172 |
stInputCell.bcmpGt = true;
|
|
1173 |
if (lastCMP != LParam)
|
|
1174 |
{
|
|
1175 |
clickCounterCMP = 1;
|
|
1176 |
clickCounterCMP++;
|
|
1177 |
}
|
|
1178 |
else
|
|
1179 |
{
|
|
1180 |
stInputCell.bcmpEq = false;
|
|
1181 |
stInputCell.bcmpLt = false;
|
|
1182 |
}
|
|
1183 |
if (clickCounterCMP > 2)
|
|
1184 |
{
|
|
1185 |
clickCounterCMP = 1;
|
|
1186 |
stInputCell.bcmpEq = false;
|
|
1187 |
stInputCell.bcmpLt = false;
|
|
1188 |
}
|
|
1189 |
lastCMP = LParam;
|
|
1190 |
curTaskState = 'B'; break;
|
|
1191 |
case 0x0f:
|
|
1192 |
if ((lastLParam == 0x03) || (lastLParam == 0x06) || (lastLParam == 0x07) || (lastLParam == 0x08) || (lastLParam == 0x09))
|
|
1193 |
{
|
|
1194 |
stInputCell.OP = CMTerm2View::typeNO;
|
|
1195 |
stInputCell.bnot = false;
|
|
1196 |
stInputCell.bpp = false;
|
|
1197 |
stInputCell.bpn = false;
|
|
1198 |
clickCounter = 0;
|
|
1199 |
clickCounterNot = 0;
|
|
1200 |
clickCounterDF = 0;
|
|
1201 |
clickCounterD = 0;
|
|
1202 |
clickCounterF = 0;
|
|
1203 |
}
|
|
1204 |
lastLParam = 0x22;
|
|
1205 |
stInputCell.bcmpLt = true;
|
|
1206 |
if (lastCMP!= LParam)
|
|
1207 |
{
|
|
1208 |
clickCounterCMP++;
|
|
1209 |
}
|
|
1210 |
else
|
|
1211 |
{
|
|
1212 |
clickCounterCMP = 1;
|
|
1213 |
stInputCell.bcmpEq = false;
|
|
1214 |
stInputCell.bcmpGt = false;
|
|
1215 |
}
|
|
1216 |
if (clickCounterCMP > 2)
|
|
1217 |
{
|
|
1218 |
clickCounterCMP = 1;
|
|
1219 |
stInputCell.bcmpEq = false;
|
|
1220 |
stInputCell.bcmpGt = false;
|
|
1221 |
}
|
|
1222 |
lastCMP = LParam;
|
|
1223 |
curTaskState = 'B'; break;
|
|
1224 |
default:
|
|
1225 |
break;
|
|
1226 |
}
|
|
1227 |
}
|
|
1228 |
else if (HParam == 0x3)
|
|
1229 |
{
|
|
1230 |
switch (LParam)
|
|
1231 |
{
|
|
1232 |
case 0:
|
|
1233 |
strNumTemp = _T("0");curTaskState = 'D'; break;
|
|
1234 |
case 1:
|
|
1235 |
strNumTemp = _T("1");curTaskState = 'D'; break;
|
|
1236 |
case 2:
|
|
1237 |
strNumTemp = _T("2");curTaskState = 'D'; break;
|
|
1238 |
case 3:
|
|
1239 |
strNumTemp = _T("3"); curTaskState = 'D';break;
|
|
1240 |
case 4:
|
|
1241 |
strNumTemp = _T("4");curTaskState = 'D'; break;
|
|
1242 |
case 5:
|
|
1243 |
strNumTemp = _T("5");curTaskState = 'D'; break;
|
|
1244 |
case 6:
|
|
1245 |
strNumTemp = _T("6"); curTaskState = 'D';break;
|
|
1246 |
case 7:
|
|
1247 |
strNumTemp = _T("7");curTaskState = 'D'; break;
|
|
1248 |
case 8:
|
|
1249 |
strNumTemp = _T("8");curTaskState = 'D'; break;
|
|
1250 |
case 9:
|
|
1251 |
strNumTemp = _T("9");curTaskState = 'D'; break;
|
|
1252 |
case 0x0A:
|
|
1253 |
if ((stInputCell.param == KLCoilTypeT) || (stInputCell.param == KLCoilTypeC))
|
|
1254 |
; //state not change
|
|
1255 |
else
|
|
1256 |
{
|
|
1257 |
strNumTemp = _T("A");curTaskState = 'D';
|
|
1258 |
}
|
|
1259 |
break;
|
|
1260 |
case 0x0B:
|
|
1261 |
if ((stInputCell.param == KLCoilTypeT) || (stInputCell.param == KLCoilTypeC))
|
|
1262 |
;
|
|
1263 |
else
|
|
1264 |
{
|
|
1265 |
strNumTemp = _T("B");curTaskState = 'D';
|
|
1266 |
}
|
|
1267 |
break;
|
|
1268 |
case 0x0C:
|
|
1269 |
if ((stInputCell.param == KLCoilTypeT) || (stInputCell.param == KLCoilTypeC))
|
|
1270 |
;
|
|
1271 |
else
|
|
1272 |
{
|
|
1273 |
strNumTemp = _T("C"); curTaskState = 'D';
|
|
1274 |
}
|
|
1275 |
break;
|
|
1276 |
case 0x0D:
|
|
1277 |
if ((stInputCell.param == KLCoilTypeT) || (stInputCell.param == KLCoilTypeC))
|
|
1278 |
;
|
|
1279 |
else
|
|
1280 |
{
|
|
1281 |
strNumTemp = _T("D");curTaskState = 'D';
|
|
1282 |
}
|
|
1283 |
break;
|
|
1284 |
|
|
1285 |
case 0x0E:
|
|
1286 |
if ((stInputCell.param == KLCoilTypeT) || (stInputCell.param == KLCoilTypeC))
|
|
1287 |
;
|
|
1288 |
else
|
|
1289 |
{
|
|
1290 |
strNumTemp = _T("E");curTaskState = 'D';
|
|
1291 |
}
|
|
1292 |
break;
|
|
1293 |
case 0x0F:
|
|
1294 |
if ((stInputCell.param == KLCoilTypeT) || (stInputCell.param == KLCoilTypeC))
|
|
1295 |
;
|
|
1296 |
else
|
|
1297 |
{
|
|
1298 |
strNumTemp = _T("F");curTaskState = 'D';
|
|
1299 |
}
|
|
1300 |
break;
|
|
1301 |
default:
|
|
1302 |
break;
|
|
1303 |
}
|
|
1304 |
|
|
1305 |
if (stInputCell.num.GetLength() < 4)
|
|
1306 |
{
|
|
1307 |
stInputCell.num.Append(strNumTemp);
|
|
1308 |
}
|
|
1309 |
else
|
|
1310 |
{
|
|
1311 |
stInputCell.num = stInputCell.num.Right(stInputCell.num.GetLength() - 1);
|
|
1312 |
stInputCell.num.Append(strNumTemp);
|
|
1313 |
}
|
|
1314 |
}
|
|
1315 |
|
|
1316 |
break;
|
|
1317 |
case 'D':
|
|
1318 |
if (HParam == 0x1) //operator 1
|
|
1319 |
{
|
|
1320 |
stInputCell.bnot = false;
|
|
1321 |
stInputCell.bpp = false;
|
|
1322 |
stInputCell.bpn = false;
|
|
1323 |
stInputCell.bcmpEq = false;
|
|
1324 |
stInputCell.bcmpLt = false;
|
|
1325 |
stInputCell.bcmpGt = false;
|
|
1326 |
stInputCell.bDouble = false;
|
|
1327 |
stInputCell.bDouble1 = false;
|
|
1328 |
stInputCell.bFloat = false;
|
|
1329 |
stInputCell.bFloat1 = false;
|
|
1330 |
stInputCell.bLeftLineUp = false;
|
|
1331 |
stInputCell.brightLineUp = false;
|
|
1332 |
|
|
1333 |
|
|
1334 |
if ((LParam >= 0x01) && (LParam <= 0x0f))
|
|
1335 |
{
|
|
1336 |
|
|
1337 |
stInputCell.num.Empty();
|
|
1338 |
if ((LParam == 0x08) || (LParam == 0x09))
|
|
1339 |
{
|
|
1340 |
clickCounter = 0;
|
|
1341 |
clickCounterNot = 0;
|
|
1342 |
clickCounterCMP = 0;
|
|
1343 |
clickCounterD = 0;
|
|
1344 |
clickCounterF = 0;
|
|
1345 |
}
|
|
1346 |
else
|
|
1347 |
{
|
|
1348 |
if (lastLParam != LParam)
|
|
1349 |
{
|
|
1350 |
clickCounter = 0;
|
|
1351 |
clickCounterNot = 0;
|
|
1352 |
clickCounterDF = 0;
|
|
1353 |
clickCounterCMP = 0;
|
|
1354 |
clickCounterD = 0;
|
|
1355 |
clickCounterF = 0;
|
|
1356 |
}
|
|
1357 |
}
|
|
1358 |
}
|
|
1359 |
if ((lastLParam == 0x14) && ((LParam == 0x10) || (LParam == 0x11) || (LParam == 0x12))) //from not to updown
|
|
1360 |
{
|
|
1361 |
clickCounter = 1;
|
|
1362 |
clickCounterNot = 0;
|
|
1363 |
clickCounterDF = 0;
|
|
1364 |
clickCounterCMP = 0;
|
|
1365 |
clickCounterD = 0;
|
|
1366 |
clickCounterF = 0;
|
|
1367 |
|
|
1368 |
}
|
|
1369 |
if ((lastLParam == 0x10) && ((LParam == 0x13) || (LParam == 0x14))) //from up to not
|
|
1370 |
{
|
|
1371 |
clickCounter = 0;
|
|
1372 |
clickCounterNot = 1;
|
|
1373 |
clickCounterDF = 0;
|
|
1374 |
clickCounterCMP = 0;
|
|
1375 |
clickCounterD = 0;
|
|
1376 |
clickCounterF = 0;
|
|
1377 |
|
|
1378 |
}
|
|
1379 |
if ((lastLParam == 0x11) && ((LParam == 0x13) || (LParam == 0x14))) //from down to not
|
|
1380 |
{
|
|
1381 |
clickCounter = 0;
|
|
1382 |
clickCounterNot = 1;
|
|
1383 |
clickCounterDF = 0;
|
|
1384 |
clickCounterCMP = 0;
|
|
1385 |
clickCounterD = 0;
|
|
1386 |
clickCounterF = 0;
|
|
1387 |
}
|
|
1388 |
|
|
1389 |
if ((lastLParam == 0x13) && ((LParam == 0x10) || (LParam == 0x11) || (LParam == 0x12))) //not
|
|
1390 |
{
|
|
1391 |
clickCounter = 0;
|
|
1392 |
clickCounterNot = 0;
|
|
1393 |
clickCounterDF = 0;
|
|
1394 |
clickCounterCMP = 0;
|
|
1395 |
clickCounterD = 0;
|
|
1396 |
clickCounterF = 0;
|
|
1397 |
|
|
1398 |
}
|
|
1399 |
if ((lastLParam == 0x10) && ((LParam == 0x13) || (LParam == 0x14))) //updown
|
|
1400 |
{
|
|
1401 |
clickCounter = 0;
|
|
1402 |
clickCounterNot = 0;
|
|
1403 |
clickCounterDF = 0;
|
|
1404 |
clickCounterCMP = 0;
|
|
1405 |
clickCounterD = 0;
|
|
1406 |
clickCounterF = 0;
|
|
1407 |
|
|
1408 |
}
|
|
1409 |
if ((lastLParam == 0x11) && ((LParam == 0x13) || (LParam == 0x14))) //updown
|
|
1410 |
{
|
|
1411 |
clickCounter = 0;
|
|
1412 |
clickCounterNot = 0;
|
|
1413 |
clickCounterDF = 0;
|
|
1414 |
clickCounterCMP = 0;
|
|
1415 |
clickCounterD = 0;
|
|
1416 |
clickCounterF = 0;
|
|
1417 |
}
|
|
1418 |
if ((lastLParam == 0x15) && ((LParam == 0x16) || (LParam == 0x18)))
|
|
1419 |
{
|
|
1420 |
clickCounter = 0;
|
|
1421 |
clickCounterNot = 0;
|
|
1422 |
clickCounterDF = 0;
|
|
1423 |
clickCounterCMP = 0;
|
|
1424 |
clickCounterD = 0;
|
|
1425 |
clickCounterF = 1;
|
|
1426 |
}
|
|
1427 |
if ((lastLParam == 0x17) && ((LParam == 0x16) || (LParam == 0x18)))
|
|
1428 |
{
|
|
1429 |
clickCounter = 0;
|
|
1430 |
clickCounterNot = 0;
|
|
1431 |
clickCounterDF = 0;
|
|
1432 |
clickCounterCMP = 0;
|
|
1433 |
clickCounterD = 0;
|
|
1434 |
clickCounterF = 1;
|
|
1435 |
}
|
|
1436 |
if ((lastLParam == 0x16) && ((LParam == 0x15) || (LParam == 0x17)))
|
|
1437 |
{
|
|
1438 |
clickCounter = 0;
|
|
1439 |
clickCounterNot = 0;
|
|
1440 |
clickCounterDF = 0;
|
|
1441 |
clickCounterCMP = 0;
|
|
1442 |
clickCounterD = 1;
|
|
1443 |
clickCounterF = 0;
|
|
1444 |
}
|
|
1445 |
if ((lastLParam == 0x18) && ((LParam == 0x15) || (LParam == 0x17)))
|
|
1446 |
{
|
|
1447 |
clickCounter = 0;
|
|
1448 |
clickCounterNot = 0;
|
|
1449 |
clickCounterDF = 0;
|
|
1450 |
clickCounterCMP = 0;
|
|
1451 |
clickCounterD = 1;
|
|
1452 |
clickCounterF = 0;
|
|
1453 |
}
|
|
1454 |
switch (LParam)
|
|
1455 |
{
|
|
1456 |
case 0x01:
|
|
1457 |
stInputCell.OP = CMTerm2View::typeNO; stInputCell.param = 0x10; //0x10 define para null
|
|
1458 |
|
|
1459 |
lastLParam = LParam;
|
|
1460 |
curTaskState = 'B';
|
|
1461 |
break;
|
|
1462 |
case 0x02:
|
|
1463 |
stInputCell.OP = CMTerm2View::typeNO; stInputCell.param = 0x10;
|
|
1464 |
stInputCell.bLeftLineUp = true;
|
|
1465 |
stInputCell.brightLineUp = true;
|
|
1466 |
lastLParam = LParam;
|
|
1467 |
curTaskState = 'B';
|
|
1468 |
break;
|
|
1469 |
case 0x03:
|
|
1470 |
stInputCell.OP = CMTerm2View::typeOUT; stInputCell.param = 0x10;
|
|
1471 |
|
|
1472 |
lastLParam = LParam;
|
|
1473 |
curTaskState = 'B';
|
|
1474 |
break;
|
|
1475 |
/*case 4:
|
|
1476 |
strOp = _T("(MC)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
1477 |
case 5:
|
|
1478 |
strOp = _T("(MCE)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;*/
|
|
1479 |
case 0x06:
|
|
1480 |
stInputCell.OP = CMTerm2View::typeSET; stInputCell.param = 0x10; ;lastLParam = LParam;curTaskState = 'B'; break;
|
|
1481 |
case 0x07:
|
|
1482 |
stInputCell.OP = CMTerm2View::typeRESET; stInputCell.param = 0x10; ;lastLParam = LParam;curTaskState = 'B'; break;
|
|
1483 |
case 0x08:
|
|
1484 |
stInputCell.OP = CMTerm2View::typeDF;stInputCell.param = 0x10;
|
|
1485 |
|
|
1486 |
lastLParam = LParam;
|
|
1487 |
curTaskState = 'A';
|
|
1488 |
break;
|
|
1489 |
case 0x09:
|
|
1490 |
stInputCell.OP = CMTerm2View::typeDF_;stInputCell.param = 0x10;
|
|
1491 |
|
|
1492 |
lastLParam = LParam;
|
|
1493 |
curTaskState = 'A';
|
|
1494 |
break;
|
|
1495 |
case 0x0a:
|
|
1496 |
strOp = _T("(ED)");strParam = "";lastLParam = LParam;curTaskState = 'A'; break;
|
|
1497 |
case 0x0b:
|
|
1498 |
stInputCell.OP = CMTerm2View::typeTM;stInputCell.param = 0x10;
|
|
1499 |
|
|
1500 |
lastLParam = LParam;
|
|
1501 |
curTaskState = 'B';
|
|
1502 |
break;
|
|
1503 |
case 0x10:
|
|
1504 |
stInputCell.bpp = true;
|
|
1505 |
stInputCell.bpn = false;
|
|
1506 |
break;
|
|
1507 |
case 0x11:
|
|
1508 |
stInputCell.bpp = false;
|
|
1509 |
stInputCell.bpn = true;
|
|
1510 |
break;
|
|
1511 |
case 0x12:
|
|
1512 |
stInputCell.bpp = false;
|
|
1513 |
stInputCell.bpn = false;
|
|
1514 |
break;
|
|
1515 |
case 0x13:
|
|
1516 |
switch (lastLParam)
|
|
1517 |
{
|
|
1518 |
case 3:
|
|
1519 |
case 6:
|
|
1520 |
case 7:
|
|
1521 |
case 0x15:
|
|
1522 |
case 0x17:
|
|
1523 |
case 0x16:
|
|
1524 |
case 0x18:
|
|
1525 |
case 0x20:
|
|
1526 |
case 0x21:
|
|
1527 |
case 0x22:
|
|
1528 |
stInputCell.OP = CMTerm2View::typeNOT;
|
|
1529 |
clickCounterNot = 0;
|
|
1530 |
curTaskState = 'A';
|
|
1531 |
default:
|
|
1532 |
break;
|
|
1533 |
}
|
|
1534 |
switch (lastLParam)
|
|
1535 |
{
|
|
1536 |
case 0x01:
|
|
1537 |
stInputCell.OP = CMTerm2View::typeNC;break;
|
|
1538 |
case 0x02:
|
|
1539 |
stInputCell.OP = CMTerm2View::typeNC;
|
|
1540 |
stInputCell.bLeftLineUp = true;
|
|
1541 |
stInputCell.brightLineUp = true;
|
|
1542 |
break;
|
|
1543 |
default:
|
|
1544 |
break;
|
|
1545 |
}
|
|
1546 |
lastLParam = LParam;
|
|
1547 |
stInputCell.bnot = true;
|
|
1548 |
|
|
1549 |
break;
|
|
1550 |
case 0x14:
|
|
1551 |
stInputCell.bnot = false;
|
|
1552 |
break;
|
|
1553 |
case 0x15:
|
|
1554 |
stInputCell.bDouble = true;
|
|
1555 |
stInputCell.bDouble1 = false;
|
|
1556 |
stInputCell.bFloat = false;
|
|
1557 |
stInputCell.bFloat1 = false;
|
|
1558 |
stInputCell.param = 0x10;lastLParam = LParam;curTaskState = 'B';
|
|
1559 |
break;
|
|
1560 |
case 0x17:
|
|
1561 |
stInputCell.bDouble = false;
|
|
1562 |
stInputCell.bDouble1 = true;
|
|
1563 |
stInputCell.bFloat = false;
|
|
1564 |
stInputCell.bFloat1 = false;
|
|
1565 |
stInputCell.param = 0x10;lastLParam = LParam;curTaskState = 'B';
|
|
1566 |
break;
|
|
1567 |
case 0x16:
|
|
1568 |
stInputCell.bDouble = false;
|
|
1569 |
stInputCell.bDouble1 = false;
|
|
1570 |
stInputCell.bFloat = true;
|
|
1571 |
stInputCell.bFloat1 = false;
|
|
1572 |
lastLParam = LParam;stInputCell.param = 0x10;curTaskState = 'B';
|
|
1573 |
break;
|
|
1574 |
case 0x18:
|
|
1575 |
stInputCell.bDouble = false;
|
|
1576 |
stInputCell.bDouble1 = false;
|
|
1577 |
stInputCell.bFloat = false;
|
|
1578 |
stInputCell.bFloat1 = true;
|
|
1579 |
lastLParam = LParam;stInputCell.param = 0x10;curTaskState = 'B';
|
|
1580 |
break;
|
|
1581 |
default:
|
|
1582 |
break;
|
|
1583 |
}
|
|
1584 |
if(curTaskState != 'D')
|
|
1585 |
{
|
|
1586 |
stInputCell.num.Empty();
|
|
1587 |
}
|
|
1588 |
}
|
|
1589 |
else if (HParam == 0x2)
|
|
1590 |
{
|
|
1591 |
switch (LParam)
|
|
1592 |
{
|
|
1593 |
case 1:
|
|
1594 |
stInputCell.param = KLCoilTypeX;curTaskState = 'C'; break;
|
|
1595 |
case 2:
|
|
1596 |
stInputCell.param = KLCoilTypeY;curTaskState = 'C'; break;
|
|
1597 |
case 3:
|
|
1598 |
stInputCell.param = KLCoilTypeR;curTaskState = 'C'; break;
|
|
1599 |
case 4:
|
|
1600 |
stInputCell.param = KLCoilTypeLR; curTaskState = 'C';break;
|
|
1601 |
case 5:
|
|
1602 |
strParam = _T(" P");curTaskState = 'C'; break;
|
|
1603 |
case 6:
|
|
1604 |
stInputCell.param = KLCoilTypeT; curTaskState = 'C';break;
|
|
1605 |
case 7:
|
|
1606 |
stInputCell.param = KLCoilTypeC;curTaskState = 'C'; break;
|
|
1607 |
case 8:
|
|
1608 |
strParam = _T(" E");curTaskState = 'C'; break;
|
|
1609 |
case 9:
|
|
1610 |
stInputCell.param = OP_TMX;curTaskState = 'C'; break;
|
|
1611 |
case 0x0a:
|
|
1612 |
stInputCell.param = OP_TMY;curTaskState = 'C'; break;
|
|
1613 |
case 0x0b:
|
|
1614 |
stInputCell.param = OP_TMR;curTaskState = 'C'; break;
|
|
1615 |
case 0x0c:
|
|
1616 |
stInputCell.param = OP_TML;curTaskState = 'C'; break;
|
|
1617 |
case 0x0d:
|
|
1618 |
if ((lastLParam == 0x03) || (lastLParam == 0x06) || (lastLParam == 0x07) || (lastLParam == 0x08) || (lastLParam == 0x09))
|
|
1619 |
{
|
|
1620 |
stInputCell.OP = CMTerm2View::typeNO;
|
|
1621 |
stInputCell.bnot = false;
|
|
1622 |
stInputCell.bpp = false;
|
|
1623 |
stInputCell.bpn = false;
|
|
1624 |
clickCounter = 0;
|
|
1625 |
clickCounterNot = 0;
|
|
1626 |
clickCounterDF = 0;
|
|
1627 |
clickCounterD = 0;
|
|
1628 |
clickCounterF = 0;
|
|
1629 |
}
|
|
1630 |
lastLParam = 0x20;
|
|
1631 |
stInputCell.bcmpEq = true;
|
|
1632 |
if (lastCMP!= LParam)
|
|
1633 |
{
|
|
1634 |
clickCounterCMP++;
|
|
1635 |
}
|
|
1636 |
else
|
|
1637 |
{
|
|
1638 |
clickCounterCMP = 1;
|
|
1639 |
stInputCell.bcmpGt = false;
|
|
1640 |
stInputCell.bcmpLt = false;
|
|
1641 |
}
|
|
1642 |
|
|
1643 |
if (clickCounterCMP > 2)
|
|
1644 |
{
|
|
1645 |
clickCounterCMP = 1;
|
|
1646 |
stInputCell.bcmpGt = false;
|
|
1647 |
stInputCell.bcmpLt = false;
|
|
1648 |
}
|
|
1649 |
lastCMP = LParam;
|
|
1650 |
curTaskState = 'B'; break;
|
|
1651 |
case 0x0e:
|
|
1652 |
if ((lastLParam == 0x03) || (lastLParam == 0x06) || (lastLParam == 0x07) || (lastLParam == 0x08) || (lastLParam == 0x09))
|
|
1653 |
{
|
|
1654 |
stInputCell.OP = CMTerm2View::typeNO;
|
|
1655 |
stInputCell.bnot = false;
|
|
1656 |
stInputCell.bpp = false;
|
|
1657 |
stInputCell.bpn = false;
|
|
1658 |
clickCounter = 0;
|
|
1659 |
clickCounterNot = 0;
|
|
1660 |
clickCounterDF = 0;
|
|
1661 |
clickCounterD = 0;
|
|
1662 |
clickCounterF = 0;
|
|
1663 |
}
|
|
1664 |
lastLParam = 0x21;
|
|
1665 |
stInputCell.bcmpGt = true;
|
|
1666 |
if (lastCMP != LParam)
|
|
1667 |
{
|
|
1668 |
clickCounterCMP++;
|
|
1669 |
}
|
|
1670 |
else
|
|
1671 |
{
|
|
1672 |
clickCounterCMP = 1;
|
|
1673 |
stInputCell.bcmpEq = false;
|
|
1674 |
stInputCell.bcmpLt = false;
|
|
1675 |
}
|
|
1676 |
if (clickCounterCMP > 2)
|
|
1677 |
{
|
|
1678 |
clickCounterCMP = 1;
|
|
1679 |
stInputCell.bcmpEq = false;
|
|
1680 |
stInputCell.bcmpLt = false;
|
|
1681 |
}
|
|
1682 |
lastCMP = LParam;
|
|
1683 |
curTaskState = 'B'; break;
|
|
1684 |
case 0x0f:
|
|
1685 |
if ((lastLParam == 0x03) || (lastLParam == 0x06) || (lastLParam == 0x07) || (lastLParam == 0x08) || (lastLParam == 0x09))
|
|
1686 |
{
|
|
1687 |
stInputCell.OP = CMTerm2View::typeNO;
|
|
1688 |
stInputCell.bnot = false;
|
|
1689 |
stInputCell.bpp = false;
|
|
1690 |
stInputCell.bpn = false;
|
|
1691 |
clickCounter = 0;
|
|
1692 |
clickCounterNot = 0;
|
|
1693 |
clickCounterDF = 0;
|
|
1694 |
clickCounterD = 0;
|
|
1695 |
clickCounterF = 0;
|
|
1696 |
}
|
|
1697 |
lastLParam = 0x22;
|
|
1698 |
stInputCell.bcmpLt = true;
|
|
1699 |
if (lastCMP != LParam)
|
|
1700 |
{
|
|
1701 |
clickCounterCMP++;
|
|
1702 |
}
|
|
1703 |
else
|
|
1704 |
{
|
|
1705 |
clickCounterCMP = 1;
|
|
1706 |
stInputCell.bcmpEq = false;
|
|
1707 |
stInputCell.bcmpGt = false;
|
|
1708 |
}
|
|
1709 |
if (clickCounterCMP > 2)
|
|
1710 |
{
|
|
1711 |
clickCounterCMP = 1;
|
|
1712 |
stInputCell.bcmpEq = false;
|
|
1713 |
stInputCell.bcmpGt = false;
|
|
1714 |
}
|
|
1715 |
lastCMP = LParam;
|
|
1716 |
curTaskState = 'B'; break;
|
|
1717 |
default:
|
|
1718 |
break;
|
|
1719 |
}
|
|
1720 |
if (curTaskState != 'D')
|
|
1721 |
{
|
|
1722 |
stInputCell.num.Empty();
|
|
1723 |
}
|
|
1724 |
}
|
|
1725 |
else if (HParam == 0x3)
|
|
1726 |
{
|
|
1727 |
switch (LParam)
|
|
1728 |
{
|
|
1729 |
case 0:
|
|
1730 |
strNumTemp = _T("0");curTaskState = 'D'; break;
|
|
1731 |
case 1:
|
|
1732 |
strNumTemp = _T("1");curTaskState = 'D'; break;
|
|
1733 |
case 2:
|
|
1734 |
strNumTemp = _T("2");curTaskState = 'D'; break;
|
|
1735 |
case 3:
|
|
1736 |
strNumTemp = _T("3"); curTaskState = 'D';break;
|
|
1737 |
case 4:
|
|
1738 |
strNumTemp = _T("4");curTaskState = 'D'; break;
|
|
1739 |
case 5:
|
|
1740 |
strNumTemp = _T("5");curTaskState = 'D'; break;
|
|
1741 |
case 6:
|
|
1742 |
strNumTemp = _T("6"); curTaskState = 'D';break;
|
|
1743 |
case 7:
|
|
1744 |
strNumTemp = _T("7");curTaskState = 'D'; break;
|
|
1745 |
case 8:
|
|
1746 |
strNumTemp = _T("8");curTaskState = 'D'; break;
|
|
1747 |
case 9:
|
|
1748 |
strNumTemp = _T("9");curTaskState = 'D'; break;
|
|
1749 |
case 0x0A:
|
|
1750 |
if ((stInputCell.param == KLCoilTypeT) || (stInputCell.param == KLCoilTypeC))
|
|
1751 |
; //state not change
|
|
1752 |
else
|
|
1753 |
{
|
|
1754 |
strNumTemp = _T("A");curTaskState = 'D';
|
|
1755 |
}
|
|
1756 |
break;
|
|
1757 |
case 0x0B:
|
|
1758 |
if ((stInputCell.param == KLCoilTypeT) || (stInputCell.param == KLCoilTypeC))
|
|
1759 |
;
|
|
1760 |
else
|
|
1761 |
{
|
|
1762 |
strNumTemp = _T("B");curTaskState = 'D';
|
|
1763 |
}
|
|
1764 |
break;
|
|
1765 |
case 0x0C:
|
|
1766 |
if ((stInputCell.param == KLCoilTypeT) || (stInputCell.param == KLCoilTypeC))
|
|
1767 |
;
|
|
1768 |
else
|
|
1769 |
{
|
|
1770 |
strNumTemp = _T("C"); curTaskState = 'D';
|
|
1771 |
}
|
|
1772 |
break;
|
|
1773 |
case 0x0D:
|
|
1774 |
if ((stInputCell.param == KLCoilTypeT) || (stInputCell.param == KLCoilTypeC))
|
|
1775 |
;
|
|
1776 |
else
|
|
1777 |
{
|
|
1778 |
strNumTemp = _T("D");curTaskState = 'D';
|
|
1779 |
}
|
|
1780 |
break;
|
|
1781 |
|
|
1782 |
case 0x0E:
|
|
1783 |
if ((stInputCell.param == KLCoilTypeT) || (stInputCell.param == KLCoilTypeC))
|
|
1784 |
;
|
|
1785 |
else
|
|
1786 |
{
|
|
1787 |
strNumTemp = _T("E");curTaskState = 'D';
|
|
1788 |
}
|
|
1789 |
break;
|
|
1790 |
case 0x0F:
|
|
1791 |
if ((stInputCell.param == KLCoilTypeT) || (stInputCell.param == KLCoilTypeC))
|
|
1792 |
;
|
|
1793 |
else
|
|
1794 |
{
|
|
1795 |
strNumTemp = _T("F");curTaskState = 'D';
|
|
1796 |
}
|
|
1797 |
break;
|
|
1798 |
default:
|
|
1799 |
break;
|
|
1800 |
}
|
|
1801 |
|
|
1802 |
if (stInputCell.num.GetLength() < 4)
|
|
1803 |
{
|
|
1804 |
stInputCell.num.Append(strNumTemp);
|
|
1805 |
}
|
|
1806 |
else
|
|
1807 |
{
|
|
1808 |
stInputCell.num = stInputCell.num.Right(stInputCell.num.GetLength() - 1);
|
|
1809 |
stInputCell.num.Append(strNumTemp);
|
|
1810 |
|
|
1811 |
for (int i = 0;i < stInputCell.num.GetLength() ;i++)
|
|
1812 |
{
|
|
1813 |
if (stInputCell.num[i] == _T('0'))
|
|
1814 |
{
|
|
1815 |
;
|
|
1816 |
}
|
|
1817 |
else
|
|
1818 |
{
|
|
1819 |
flag = 1;break;
|
|
1820 |
}
|
|
1821 |
|
|
1822 |
}
|
|
1823 |
if (flag==0)
|
|
1824 |
{
|
|
1825 |
stInputCell.num.Empty();
|
|
1826 |
stInputCell.num.Append(_T("0"));
|
|
1827 |
}
|
|
1828 |
}
|
|
1829 |
int num = stInputCell.num.GetLength();
|
|
1830 |
for (int i = 0; i < num; i++)
|
|
1831 |
{
|
|
1832 |
int len1 = stInputCell.num.GetLength();
|
|
1833 |
if (len1 > 1 && stInputCell.num[0] == _T('0')) stInputCell.num = stInputCell.num.Right(stInputCell.num.GetLength() - 1);
|
|
1834 |
}
|
|
1835 |
|
|
1836 |
}
|
|
1837 |
|
|
1838 |
|
|
1839 |
break;
|
|
1840 |
} //end switch
|
|
1841 |
if (HParam==0x14)
|
|
1842 |
{
|
|
1843 |
bool editEndFlag = false; //********************************************************************************************************
|
|
1844 |
|
|
1845 |
switch (stInputCell.OP)
|
|
1846 |
{
|
|
1847 |
case CMTerm2View::typeNO:
|
|
1848 |
case CMTerm2View::typeNC:
|
|
1849 |
case CMTerm2View::typeOUT:
|
|
1850 |
case CMTerm2View::typeSET:
|
|
1851 |
case CMTerm2View::typeRESET:
|
|
1852 |
case CMTerm2View::typeTM:
|
|
1853 |
if (curTaskState == 'D')
|
|
1854 |
{
|
|
1855 |
editEndFlag = true;
|
|
1856 |
}
|
|
1857 |
case CMTerm2View::typeDF:
|
|
1858 |
case CMTerm2View::typeDF_:
|
|
1859 |
if (curTaskState == 'A')
|
|
1860 |
{
|
|
1861 |
editEndFlag = true;
|
|
1862 |
}
|
|
1863 |
default:
|
|
1864 |
break;
|
|
1865 |
}
|
|
1866 |
|
|
1867 |
if ((stInputCell.bcmpEq)||(stInputCell.bcmpGt)|| (stInputCell.bcmpLt))
|
|
1868 |
{
|
|
1869 |
editEndFlag = true;
|
|
1870 |
}
|
|
1871 |
|
|
1872 |
if (editEndFlag)
|
|
1873 |
{
|
|
1874 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
1875 |
p1->GetInputCell(stInputCell);
|
|
1876 |
}
|
|
1877 |
else
|
|
1878 |
{
|
|
1879 |
CMainFrame * p1 = (CMainFrame *)AfxGetMainWnd();
|
|
1880 |
CString str = _T("无法确定指令输入");
|
|
1881 |
//p1->m_wndStatusBar.GetStatusBarCtrl().SetBkColor(RGB(255, 0, 0));
|
|
1882 |
p1->m_wndStatusBar.SetPaneText(0, str);
|
|
1883 |
}
|
|
1884 |
|
|
1885 |
}
|
|
1886 |
|
|
1887 |
display(stInputCell);
|
|
1888 |
return 0;
|
|
1889 |
}
|
|
1890 |
|
|
1891 |
void CMyDlgBarInputShow::stInit()
|
|
1892 |
{
|
|
1893 |
stInputCell=
|
|
1894 |
{
|
|
1895 |
CMTerm2View::typeNO,
|
|
1896 |
false,
|
|
1897 |
false,
|
|
1898 |
false,
|
|
1899 |
false,
|
|
1900 |
false,
|
|
1901 |
false,
|
|
1902 |
false,
|
|
1903 |
false,
|
|
1904 |
false,
|
|
1905 |
false,
|
|
1906 |
false,
|
|
1907 |
false,
|
|
1908 |
0x10,
|
|
1909 |
_T("")
|
|
1910 |
};
|
|
1911 |
}
|
|
1912 |
|
|
1913 |
|
|
1914 |
int CMyDlgBarInputShow::display(tagInputCell stDisplayCell)
|
|
1915 |
{
|
|
1916 |
static CString strOp, strParam,strNum;
|
|
1917 |
static CString str;
|
|
1918 |
switch (stDisplayCell.OP)
|
|
1919 |
{
|
|
1920 |
case CMTerm2View::typeNO:
|
|
1921 |
if ((stInputCell.bLeftLineUp)&&(stInputCell.brightLineUp))
|
|
1922 |
{
|
|
1923 |
strOp = _T("└┤├┘");
|
|
1924 |
}
|
|
1925 |
else
|
|
1926 |
{
|
|
1927 |
strOp = _T("-| |-");
|
|
1928 |
}
|
|
1929 |
|
|
1930 |
break;
|
|
1931 |
case CMTerm2View::typeNC:
|
|
1932 |
if ((stInputCell.bLeftLineUp) && (stInputCell.brightLineUp))
|
|
1933 |
{
|
|
1934 |
strOp = _T("└┤/├┘");
|
|
1935 |
}
|
|
1936 |
else
|
|
1937 |
{
|
|
1938 |
strOp = _T("-|/|-");
|
|
1939 |
}
|
|
1940 |
|
|
1941 |
break;
|
|
1942 |
case CMTerm2View::typeOUT:
|
|
1943 |
strOp = _T("-[ ]");
|
|
1944 |
break;
|
|
1945 |
case CMTerm2View::typeSET:
|
|
1946 |
strOp = _T("-<S>");
|
|
1947 |
break;
|
|
1948 |
case CMTerm2View::typeRESET:
|
|
1949 |
strOp = _T("-<R>");
|
|
1950 |
break;
|
|
1951 |
case CMTerm2View::typeDF:
|
|
1952 |
strOp = _T("(DF)");
|
|
1953 |
break;
|
|
1954 |
case CMTerm2View::typeDF_:
|
|
1955 |
strOp = _T("(DF/)");
|
|
1956 |
break;
|
|
1957 |
case CMTerm2View::typeNOT:
|
|
1958 |
strOp = _T("-/-");
|
|
1959 |
break;
|
|
1960 |
case CMTerm2View::typeTM:
|
|
1961 |
strOp = _T("-[TM]");
|
|
1962 |
break;
|
|
1963 |
case CMTerm2View::typeCMP:
|
|
1964 |
break;
|
|
1965 |
default:
|
|
1966 |
break;
|
|
1967 |
}
|
|
1968 |
|
|
1969 |
if (stDisplayCell.bnot)
|
|
1970 |
{
|
|
1971 |
switch (stDisplayCell.OP)
|
|
1972 |
{
|
|
1973 |
case CMTerm2View::typeNO:
|
|
1974 |
if ((stInputCell.bLeftLineUp) && (stInputCell.brightLineUp))
|
|
1975 |
{
|
|
1976 |
strOp = _T("└┤/├┘");
|
|
1977 |
}
|
|
1978 |
else
|
|
1979 |
{
|
|
1980 |
strOp = _T("-|/|-");
|
|
1981 |
}
|
|
1982 |
break;
|
|
1983 |
case CMTerm2View::typeOUT:
|
|
1984 |
strOp = _T("-/-");
|
|
1985 |
break;
|
|
1986 |
case CMTerm2View::typeSET:
|
|
1987 |
strOp = _T("-/-");
|
|
1988 |
break;
|
|
1989 |
case CMTerm2View::typeRESET:
|
|
1990 |
strOp = _T("-/-");
|
|
1991 |
break;
|
|
1992 |
case CMTerm2View::typeDF:
|
|
1993 |
strOp = _T("(DF/)");
|
|
1994 |
break;
|
|
1995 |
case CMTerm2View::typeDF_:
|
|
1996 |
strOp = _T("(DF)");
|
|
1997 |
break;
|
|
1998 |
case CMTerm2View::typeNOT:
|
|
1999 |
strOp = _T("-/-");
|
|
2000 |
break;
|
|
2001 |
case CMTerm2View::typeTM:
|
|
2002 |
strOp = _T("-/-");
|
|
2003 |
break;
|
|
2004 |
default:
|
|
2005 |
break;
|
|
2006 |
}
|
|
2007 |
}
|
|
2008 |
if (stDisplayCell.bpp)
|
|
2009 |
{
|
|
2010 |
switch (stDisplayCell.OP)
|
|
2011 |
{
|
|
2012 |
case CMTerm2View::typeNO:
|
|
2013 |
if ((stInputCell.bLeftLineUp) && (stInputCell.brightLineUp))
|
|
2014 |
{
|
|
2015 |
strOp = _T("└┤↑├┘");
|
|
2016 |
}
|
|
2017 |
else
|
|
2018 |
{
|
|
2019 |
strOp = _T("-|↑|-");
|
|
2020 |
}
|
|
2021 |
break;
|
|
2022 |
case CMTerm2View::typeOUT:
|
|
2023 |
strOp = _T("-[↑]");
|
|
2024 |
break;
|
|
2025 |
default:
|
|
2026 |
break;
|
|
2027 |
}
|
|
2028 |
}
|
|
2029 |
if (stDisplayCell.bpn)
|
|
2030 |
{
|
|
2031 |
switch (stDisplayCell.OP)
|
|
2032 |
{
|
|
2033 |
case CMTerm2View::typeNO:
|
|
2034 |
if ((stInputCell.bLeftLineUp) && (stInputCell.brightLineUp))
|
|
2035 |
{
|
|
2036 |
strOp = _T("└┤↓├┘");
|
|
2037 |
}
|
|
2038 |
else
|
|
2039 |
{
|
|
2040 |
strOp = _T("-|↓|-");
|
|
2041 |
}
|
|
2042 |
break;
|
|
2043 |
case CMTerm2View::typeOUT:
|
|
2044 |
strOp = _T("-[↓]");
|
|
2045 |
break;
|
|
2046 |
default:
|
|
2047 |
break;
|
|
2048 |
}
|
|
2049 |
}
|
|
2050 |
|
|
2051 |
if (stDisplayCell.bDouble)
|
|
2052 |
{
|
|
2053 |
switch (stDisplayCell.OP)
|
|
2054 |
{
|
|
2055 |
case CMTerm2View::typeNO:
|
|
2056 |
if ((stInputCell.bLeftLineUp) && (stInputCell.brightLineUp))
|
|
2057 |
{
|
|
2058 |
strOp = _T("└┤├┘D");
|
|
2059 |
}
|
|
2060 |
else
|
|
2061 |
{
|
|
2062 |
strOp = _T("-| |-D");
|
|
2063 |
}
|
|
2064 |
break;
|
|
2065 |
case CMTerm2View::typeOUT:
|
|
2066 |
strOp = _T("-| |-D");
|
|
2067 |
break;
|
|
2068 |
case CMTerm2View::typeSET:
|
|
2069 |
strOp = _T("-| |-D");
|
|
2070 |
break;
|
|
2071 |
case CMTerm2View::typeRESET:
|
|
2072 |
strOp = _T("-| |-D");
|
|
2073 |
break;
|
|
2074 |
case CMTerm2View::typeDF:
|
|
2075 |
strOp = _T("-| |-D");
|
|
2076 |
break;
|
|
2077 |
case CMTerm2View::typeDF_:
|
|
2078 |
strOp = _T("-| |-D");
|
|
2079 |
break;
|
|
2080 |
case CMTerm2View::typeNOT:
|
|
2081 |
strOp = _T("-| |-D");
|
|
2082 |
break;
|
|
2083 |
case CMTerm2View::typeTM:
|
|
2084 |
strOp = _T("-| |-D");
|
|
2085 |
break;
|
|
2086 |
default:
|
|
2087 |
break;
|
|
2088 |
}
|
|
2089 |
}
|
|
2090 |
|
|
2091 |
|
|
2092 |
if (stDisplayCell.bDouble1)
|
|
2093 |
{
|
|
2094 |
switch (stDisplayCell.OP)
|
|
2095 |
{
|
|
2096 |
case CMTerm2View::typeNO:
|
|
2097 |
if ((stInputCell.bLeftLineUp) && (stInputCell.brightLineUp))
|
|
2098 |
{
|
|
2099 |
strOp = _T("└┤├┘");
|
|
2100 |
}
|
|
2101 |
else
|
|
2102 |
{
|
|
2103 |
strOp = _T("-| |-");
|
|
2104 |
}
|
|
2105 |
break;
|
|
2106 |
case CMTerm2View::typeOUT:
|
|
2107 |
strOp = _T("-| |-");
|
|
2108 |
break;
|
|
2109 |
case CMTerm2View::typeSET:
|
|
2110 |
strOp = _T("-| |-");
|
|
2111 |
break;
|
|
2112 |
case CMTerm2View::typeRESET:
|
|
2113 |
strOp = _T("-| |-");
|
|
2114 |
break;
|
|
2115 |
case CMTerm2View::typeDF:
|
|
2116 |
strOp = _T("-| |-");
|
|
2117 |
break;
|
|
2118 |
case CMTerm2View::typeDF_:
|
|
2119 |
strOp = _T("-| |-");
|
|
2120 |
break;
|
|
2121 |
case CMTerm2View::typeNOT:
|
|
2122 |
strOp = _T("-| |-");
|
|
2123 |
break;
|
|
2124 |
case CMTerm2View::typeTM:
|
|
2125 |
strOp = _T("-| |-");
|
|
2126 |
break;
|
|
2127 |
default:
|
|
2128 |
break;
|
|
2129 |
}
|
|
2130 |
}
|
|
2131 |
|
|
2132 |
if (stDisplayCell.bFloat)
|
|
2133 |
{
|
|
2134 |
switch (stDisplayCell.OP)
|
|
2135 |
{
|
|
2136 |
case CMTerm2View::typeNO:
|
|
2137 |
if ((stInputCell.bLeftLineUp) && (stInputCell.brightLineUp))
|
|
2138 |
{
|
|
2139 |
strOp = _T("└┤├┘F");
|
|
2140 |
}
|
|
2141 |
else
|
|
2142 |
{
|
|
2143 |
strOp = _T("-| |-F");
|
|
2144 |
}
|
|
2145 |
break;
|
|
2146 |
case CMTerm2View::typeOUT:
|
|
2147 |
strOp = _T("-| |-F");
|
|
2148 |
break;
|
|
2149 |
case CMTerm2View::typeSET:
|
|
2150 |
strOp = _T("-| |-F");
|
|
2151 |
break;
|
|
2152 |
case CMTerm2View::typeRESET:
|
|
2153 |
strOp = _T("-| |-F");
|
|
2154 |
break;
|
|
2155 |
case CMTerm2View::typeDF:
|
|
2156 |
strOp = _T("-| |-F");
|
|
2157 |
break;
|
|
2158 |
case CMTerm2View::typeDF_:
|
|
2159 |
strOp = _T("-| |-F");
|
|
2160 |
break;
|
|
2161 |
case CMTerm2View::typeNOT:
|
|
2162 |
strOp = _T("-| |-F");
|
|
2163 |
break;
|
|
2164 |
case CMTerm2View::typeTM:
|
|
2165 |
strOp = _T("-| |-F");
|
|
2166 |
break;
|
|
2167 |
default:
|
|
2168 |
break;
|
|
2169 |
}
|
|
2170 |
}
|
|
2171 |
|
|
2172 |
if (stDisplayCell.bFloat1)
|
|
2173 |
{
|
|
2174 |
switch (stDisplayCell.OP)
|
|
2175 |
{
|
|
2176 |
case CMTerm2View::typeNO:
|
|
2177 |
if ((stInputCell.bLeftLineUp) && (stInputCell.brightLineUp))
|
|
2178 |
{
|
|
2179 |
strOp = _T("└┤├┘");
|
|
2180 |
}
|
|
2181 |
else
|
|
2182 |
{
|
|
2183 |
strOp = _T("-| |-");
|
|
2184 |
}
|
|
2185 |
case CMTerm2View::typeOUT:
|
|
2186 |
strOp = _T("-| |-");
|
|
2187 |
break;
|
|
2188 |
case CMTerm2View::typeSET:
|
|
2189 |
strOp = _T("-| |-");
|
|
2190 |
break;
|
|
2191 |
case CMTerm2View::typeRESET:
|
|
2192 |
strOp = _T("-| |-");
|
|
2193 |
break;
|
|
2194 |
case CMTerm2View::typeDF:
|
|
2195 |
strOp = _T("-| |-");
|
|
2196 |
break;
|
|
2197 |
case CMTerm2View::typeDF_:
|
|
2198 |
strOp = _T("-| |-");
|
|
2199 |
break;
|
|
2200 |
case CMTerm2View::typeNOT:
|
|
2201 |
strOp = _T("-| |-");
|
|
2202 |
break;
|
|
2203 |
case CMTerm2View::typeTM:
|
|
2204 |
strOp = _T("-| |-");
|
|
2205 |
break;
|
|
2206 |
default:
|
|
2207 |
break;
|
|
2208 |
}
|
|
2209 |
}
|
|
2210 |
switch (stDisplayCell.param)
|
|
2211 |
{
|
|
2212 |
case KLCoilTypeX:
|
|
2213 |
strParam = _T("X");
|
|
2214 |
break;
|
|
2215 |
case KLCoilTypeY:
|
|
2216 |
strParam = _T("Y");
|
|
2217 |
break;
|
|
2218 |
case KLCoilTypeR:
|
|
2219 |
strParam = _T("R");
|
|
2220 |
break;
|
|
2221 |
case KLCoilTypeLR:
|
|
2222 |
strParam = _T("L");
|
|
2223 |
break;
|
|
2224 |
case KLCoilTypeT:
|
|
2225 |
strParam = _T("T");
|
|
2226 |
break;
|
|
2227 |
case KLCoilTypeC:
|
|
2228 |
strParam = _T("C");
|
|
2229 |
break;
|
|
2230 |
case OP_TMX:
|
|
2231 |
if (strOp == _T("-[TM]"))
|
|
2232 |
strOp = "";
|
|
2233 |
strParam = _T("-[TMX]");
|
|
2234 |
break;
|
|
2235 |
case OP_TMY:
|
|
2236 |
if (strOp == _T("-[TM]"))
|
|
2237 |
strOp = "";
|
|
2238 |
strParam = _T("-[TMY]");
|
|
2239 |
break;
|
|
2240 |
case OP_TMR:
|
|
2241 |
if (strOp == _T("-[TM]"))
|
|
2242 |
strOp = "";
|
|
2243 |
strParam = _T("-[TMR]");
|
|
2244 |
break;
|
|
2245 |
case OP_TML:
|
|
2246 |
if (strOp == _T("-[TM]"))
|
|
2247 |
strOp = "";
|
|
2248 |
strParam = _T("-[TML]");
|
|
2249 |
break;
|
|
2250 |
default:
|
|
2251 |
strParam = " ";
|
|
2252 |
break;
|
|
2253 |
}
|
|
2254 |
|
|
2255 |
if ((stInputCell.bcmpEq)&&(!stInputCell.bcmpLt)&&(!stInputCell.bcmpGt))
|
|
2256 |
{
|
|
2257 |
strParam = "=";
|
|
2258 |
}
|
|
2259 |
if ((!stInputCell.bcmpEq) && (stInputCell.bcmpLt) && (!stInputCell.bcmpGt))
|
|
2260 |
{
|
|
2261 |
strParam = "<";
|
|
2262 |
}
|
|
2263 |
if ((!stInputCell.bcmpEq) && (!stInputCell.bcmpLt) && (stInputCell.bcmpGt))
|
|
2264 |
{
|
|
2265 |
strParam = ">";
|
|
2266 |
}
|
|
2267 |
if ((stInputCell.bcmpEq) && (stInputCell.bcmpLt))
|
|
2268 |
{
|
|
2269 |
strParam = "<=";
|
|
2270 |
}
|
|
2271 |
if ((stInputCell.bcmpEq) && (stInputCell.bcmpGt))
|
|
2272 |
{
|
|
2273 |
strParam = ">=";
|
|
2274 |
}
|
|
2275 |
if ((stInputCell.bcmpLt) && (stInputCell.bcmpGt))
|
|
2276 |
{
|
|
2277 |
strParam = "<>";
|
|
2278 |
}
|
|
2279 |
strNum = stDisplayCell.num;
|
|
2280 |
str = strOp + _T(" ") + strParam + " " + strNum;
|
|
2281 |
SetDlgItemText(IDC_EDIT_INPUT, str);
|
|
2282 |
return 0;
|
|
2283 |
}
|
|
2284 |
|
|
2285 |
int CMyDlgBarInputShow::SetDisplay1(int inputInfo)
|
|
2286 |
{
|
|
2287 |
// TODO: 在此处添加实现代码.
|
|
2288 |
/*
|
|
2289 |
static int clickCounter = 0;
|
|
2290 |
static int clickCounterDF = 0;
|
|
2291 |
static int clickCounterNot = 0;
|
|
2292 |
static char curTaskState = 'A';
|
|
2293 |
static int lastLParam = 0;
|
|
2294 |
static CString str, strStoreB, strStoreC, strNum;
|
|
2295 |
static CString strOp, strParam;
|
|
2296 |
|
|
2297 |
CString s1,strNumTemp;
|
|
2298 |
int para=0;
|
|
2299 |
int HParam, LParam;
|
|
2300 |
s1.Format(_T("is this window %d"), IsWindow(m_hWnd));
|
|
2301 |
SysLog(s1);
|
|
2302 |
// ChangeState(inputInfo>>16, lastTaskState, curTaskState);
|
|
2303 |
if (inputInfo == 0x00010008)
|
|
2304 |
{
|
|
2305 |
clickCounterDF++;
|
|
2306 |
if (clickCounterDF == 1) //DF redefine key value
|
|
2307 |
{
|
|
2308 |
|
|
2309 |
inputInfo = 0x00010008;
|
|
2310 |
}
|
|
2311 |
else if (clickCounterDF == 2)
|
|
2312 |
{
|
|
2313 |
inputInfo = 0x00010009;
|
|
2314 |
clickCounterDF = 0;
|
|
2315 |
}
|
|
2316 |
}
|
|
2317 |
if (inputInfo==0x00010010)
|
|
2318 |
{
|
|
2319 |
clickCounter++;
|
|
2320 |
|
|
2321 |
if (clickCounter == 1) //updown redefine key value
|
|
2322 |
{
|
|
2323 |
inputInfo = 0x00010010;
|
|
2324 |
}
|
|
2325 |
else if (clickCounter == 2)
|
|
2326 |
{
|
|
2327 |
inputInfo = 0x00010011;
|
|
2328 |
}
|
|
2329 |
else if (clickCounter == 3)
|
|
2330 |
{
|
|
2331 |
inputInfo = 0x00010012;
|
|
2332 |
clickCounter = 0;
|
|
2333 |
}
|
|
2334 |
}
|
|
2335 |
if (inputInfo == 0x00010013)
|
|
2336 |
{
|
|
2337 |
clickCounterNot++;
|
|
2338 |
if (clickCounterNot == 1) //NOT redefine key value
|
|
2339 |
{
|
|
2340 |
|
|
2341 |
inputInfo = 0x00010013;
|
|
2342 |
}
|
|
2343 |
else if (clickCounterNot == 2)
|
|
2344 |
{
|
|
2345 |
inputInfo = 0x00010014;
|
|
2346 |
clickCounterNot = 0;
|
|
2347 |
}
|
|
2348 |
}
|
|
2349 |
|
|
2350 |
HParam = inputInfo >> 16;
|
|
2351 |
LParam = inputInfo & 0xffff;
|
|
2352 |
|
|
2353 |
|
|
2354 |
switch (curTaskState)
|
|
2355 |
{
|
|
2356 |
case 'A':
|
|
2357 |
if (HParam == 0x1) //operator 1
|
|
2358 |
{
|
|
2359 |
switch (LParam)
|
|
2360 |
{
|
|
2361 |
case 1:
|
|
2362 |
strOp = _T("-| |-"); strParam = "";
|
|
2363 |
if (lastLParam != LParam)
|
|
2364 |
{
|
|
2365 |
clickCounter = 0;
|
|
2366 |
clickCounterNot = 0;
|
|
2367 |
}
|
|
2368 |
lastLParam = LParam;
|
|
2369 |
curTaskState = 'B';
|
|
2370 |
break;
|
|
2371 |
case 2:
|
|
2372 |
strOp = _T("└┤├┘");strParam = "";
|
|
2373 |
if (lastLParam != LParam)
|
|
2374 |
{
|
|
2375 |
clickCounter = 0;
|
|
2376 |
clickCounterNot = 0;
|
|
2377 |
}
|
|
2378 |
lastLParam = LParam;
|
|
2379 |
curTaskState = 'B';
|
|
2380 |
break;
|
|
2381 |
case 3:
|
|
2382 |
strOp = _T("-[ ]");strParam = "";
|
|
2383 |
if (lastLParam != LParam)
|
|
2384 |
{
|
|
2385 |
clickCounter = 0;
|
|
2386 |
clickCounterNot = 0;
|
|
2387 |
}
|
|
2388 |
lastLParam = LParam;
|
|
2389 |
curTaskState = 'B';
|
|
2390 |
break;
|
|
2391 |
case 4:
|
|
2392 |
strOp = _T("(MC)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2393 |
case 5:
|
|
2394 |
strOp = _T("(MCE)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2395 |
case 6:
|
|
2396 |
strOp = _T("-<S>");strParam = "";lastLParam = LParam;curTaskState = 'B'; break;
|
|
2397 |
case 7:
|
|
2398 |
strOp = _T("-<R>");strParam = "";lastLParam = LParam;curTaskState = 'B'; break;
|
|
2399 |
case 8:
|
|
2400 |
strOp = _T("(DF)");strParam = "";
|
|
2401 |
if (lastLParam != LParam)
|
|
2402 |
{
|
|
2403 |
clickCounterNot = 0;
|
|
2404 |
}
|
|
2405 |
lastLParam = LParam;
|
|
2406 |
curTaskState = 'A';
|
|
2407 |
break;
|
|
2408 |
case 9:
|
|
2409 |
strOp = _T("(DF/)");strParam = "";
|
|
2410 |
if (lastLParam != LParam)
|
|
2411 |
{
|
|
2412 |
clickCounterNot = 0;
|
|
2413 |
}
|
|
2414 |
lastLParam = LParam;
|
|
2415 |
curTaskState = 'A';
|
|
2416 |
break;
|
|
2417 |
case 0x0a:
|
|
2418 |
strOp = _T("(ED)");strParam = "";lastLParam = LParam;curTaskState = 'A'; break;
|
|
2419 |
case 0x0b:
|
|
2420 |
strOp = _T("-[TMX]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2421 |
case 0x0c:
|
|
2422 |
strOp = _T("-[TMY]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2423 |
case 0x0d:
|
|
2424 |
strOp = _T("-[TMR]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2425 |
case 0x0e:
|
|
2426 |
strOp = _T("-[TML]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2427 |
case 0x0f:
|
|
2428 |
strOp = _T("-[CT]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2429 |
case 0x10:
|
|
2430 |
switch (lastLParam)
|
|
2431 |
{
|
|
2432 |
case 1:
|
|
2433 |
strOp = _T("-|↑|-");strParam = "";curTaskState = 'B'; break;
|
|
2434 |
case 2:
|
|
2435 |
strOp = _T("└┤↑├┘");strParam = "";curTaskState = 'B'; break;
|
|
2436 |
case 3:
|
|
2437 |
strOp = _T("-[↑]"); strParam = "";curTaskState = 'B';break;
|
|
2438 |
default:
|
|
2439 |
break;
|
|
2440 |
}
|
|
2441 |
break;
|
|
2442 |
case 0x11:
|
|
2443 |
switch (lastLParam)
|
|
2444 |
{
|
|
2445 |
case 1:
|
|
2446 |
strOp = _T("-|↓|-");strParam = "";curTaskState = 'B'; break;
|
|
2447 |
case 2:
|
|
2448 |
strOp = _T("└┤↓├┘");strParam = "";curTaskState = 'B'; break;
|
|
2449 |
case 3:
|
|
2450 |
strOp = _T("-[↓]");strParam = "";curTaskState = 'B'; break;
|
|
2451 |
default:
|
|
2452 |
break;
|
|
2453 |
}
|
|
2454 |
break;
|
|
2455 |
case 0x12:
|
|
2456 |
switch (lastLParam)
|
|
2457 |
{
|
|
2458 |
case 1:
|
|
2459 |
strOp = _T("-| |-");strParam = "";curTaskState = 'B'; break;
|
|
2460 |
case 2:
|
|
2461 |
strOp = _T("└┤├┘");strParam = "";curTaskState = 'B'; break;
|
|
2462 |
case 3:
|
|
2463 |
strOp = _T("-[ ]");strParam = "";curTaskState = 'B'; break;
|
|
2464 |
default:
|
|
2465 |
break;
|
|
2466 |
}
|
|
2467 |
break;
|
|
2468 |
case 0x13:
|
|
2469 |
switch (lastLParam)
|
|
2470 |
{
|
|
2471 |
case 1:
|
|
2472 |
strOp = _T("-|/|-");strParam = "";curTaskState = 'B'; break;
|
|
2473 |
case 2:
|
|
2474 |
strOp = _T("└┤/├┘");strParam = "";curTaskState = 'B'; break;
|
|
2475 |
case 8:
|
|
2476 |
strOp = _T("(DF/)");strParam = "";curTaskState = 'A'; break;
|
|
2477 |
case 9:
|
|
2478 |
strOp = _T("(DF)");strParam = "";curTaskState = 'A'; break;
|
|
2479 |
case 3:
|
|
2480 |
case 4:
|
|
2481 |
case 5:
|
|
2482 |
case 6:
|
|
2483 |
case 7:
|
|
2484 |
case 0xa:
|
|
2485 |
case 0xb:
|
|
2486 |
case 0xc:
|
|
2487 |
case 0xd:
|
|
2488 |
case 0xe:
|
|
2489 |
case 0xf:
|
|
2490 |
strOp = _T("- / -");strParam = "";curTaskState = 'A';break;
|
|
2491 |
default:
|
|
2492 |
break;
|
|
2493 |
}
|
|
2494 |
break;
|
|
2495 |
case 0x14:
|
|
2496 |
switch (lastLParam)
|
|
2497 |
{
|
|
2498 |
case 1:
|
|
2499 |
strOp = _T("-| |-");strParam = "";curTaskState = 'B'; break;
|
|
2500 |
case 2:
|
|
2501 |
strOp = _T("└┤├┘"); strParam = "";curTaskState = 'B';break;
|
|
2502 |
case 8:
|
|
2503 |
strOp = _T("(DF)");strParam = "";curTaskState = 'A'; break;
|
|
2504 |
case 9:
|
|
2505 |
strOp = _T("(DF/)");strParam = "";curTaskState = 'A'; break;
|
|
2506 |
case 3:
|
|
2507 |
case 4:
|
|
2508 |
case 5:
|
|
2509 |
case 6:
|
|
2510 |
case 7:
|
|
2511 |
case 0xa:
|
|
2512 |
case 0xb:
|
|
2513 |
case 0xc:
|
|
2514 |
case 0xd:
|
|
2515 |
case 0xe:
|
|
2516 |
case 0xf:
|
|
2517 |
strOp = _T("- / -");strParam = "";curTaskState = 'A';break;
|
|
2518 |
default:
|
|
2519 |
break;
|
|
2520 |
}
|
|
2521 |
break;
|
|
2522 |
default:
|
|
2523 |
break;
|
|
2524 |
}
|
|
2525 |
}
|
|
2526 |
str = strOp;
|
|
2527 |
break;
|
|
2528 |
case 'B':
|
|
2529 |
str = strOp;
|
|
2530 |
if (HParam == 0x1) //operator 1
|
|
2531 |
{
|
|
2532 |
switch (LParam)
|
|
2533 |
{
|
|
2534 |
case 1:
|
|
2535 |
strOp = _T("-| |-"); strParam = "";
|
|
2536 |
if (lastLParam != LParam)
|
|
2537 |
{
|
|
2538 |
clickCounter = 0;
|
|
2539 |
clickCounterNot = 0;
|
|
2540 |
}
|
|
2541 |
lastLParam = LParam;
|
|
2542 |
curTaskState = 'B';
|
|
2543 |
break;
|
|
2544 |
case 2:
|
|
2545 |
strOp = _T("└┤├┘");strParam = "";
|
|
2546 |
if (lastLParam != LParam)
|
|
2547 |
{
|
|
2548 |
clickCounter = 0;
|
|
2549 |
clickCounterNot = 0;
|
|
2550 |
}
|
|
2551 |
lastLParam = LParam;
|
|
2552 |
curTaskState = 'B';
|
|
2553 |
break;
|
|
2554 |
case 3:
|
|
2555 |
strOp = _T("-[ ]");strParam = "";
|
|
2556 |
if (lastLParam != LParam)
|
|
2557 |
{
|
|
2558 |
clickCounter = 0;
|
|
2559 |
clickCounterNot = 0;
|
|
2560 |
}
|
|
2561 |
lastLParam = LParam;
|
|
2562 |
curTaskState = 'B';
|
|
2563 |
break;
|
|
2564 |
case 4:
|
|
2565 |
strOp = _T("(MC)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2566 |
case 5:
|
|
2567 |
strOp = _T("(MCE)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2568 |
case 6:
|
|
2569 |
strOp = _T("-<S>");strParam = "";lastLParam = LParam;curTaskState = 'B'; break;
|
|
2570 |
case 7:
|
|
2571 |
strOp = _T("-<R>");strParam = "";lastLParam = LParam;curTaskState = 'B'; break;
|
|
2572 |
case 8:
|
|
2573 |
strOp = _T("(DF)");strParam = "";
|
|
2574 |
if (lastLParam != LParam)
|
|
2575 |
{
|
|
2576 |
clickCounterNot = 0;
|
|
2577 |
}
|
|
2578 |
lastLParam = LParam;
|
|
2579 |
curTaskState = 'A';
|
|
2580 |
break;
|
|
2581 |
case 9:
|
|
2582 |
strOp = _T("(DF/)");strParam = "";
|
|
2583 |
if (lastLParam != LParam)
|
|
2584 |
{
|
|
2585 |
clickCounterNot = 0;
|
|
2586 |
}
|
|
2587 |
lastLParam = LParam;
|
|
2588 |
curTaskState = 'A';
|
|
2589 |
break;
|
|
2590 |
case 0x0a:
|
|
2591 |
strOp = _T("(ED)");strParam = "";lastLParam = LParam;curTaskState = 'A'; break;
|
|
2592 |
case 0x0b:
|
|
2593 |
strOp = _T("-[TMX]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2594 |
case 0x0c:
|
|
2595 |
strOp = _T("-[TMY]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2596 |
case 0x0d:
|
|
2597 |
strOp = _T("-[TMR]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2598 |
case 0x0e:
|
|
2599 |
strOp = _T("-[TML]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2600 |
case 0x0f:
|
|
2601 |
strOp = _T("-[CT]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2602 |
case 0x10:
|
|
2603 |
switch (lastLParam)
|
|
2604 |
{
|
|
2605 |
case 1:
|
|
2606 |
strOp = _T("-|↑|-");strParam = "";curTaskState = 'B'; break;
|
|
2607 |
case 2:
|
|
2608 |
strOp = _T("└┤↑├┘");strParam = "";curTaskState = 'B'; break;
|
|
2609 |
case 3:
|
|
2610 |
strOp = _T("-[↑]"); strParam = "";curTaskState = 'B';break;
|
|
2611 |
default:
|
|
2612 |
break;
|
|
2613 |
}
|
|
2614 |
break;
|
|
2615 |
case 0x11:
|
|
2616 |
switch (lastLParam)
|
|
2617 |
{
|
|
2618 |
case 1:
|
|
2619 |
strOp = _T("-|↓|-");strParam = "";curTaskState = 'B'; break;
|
|
2620 |
case 2:
|
|
2621 |
strOp = _T("└┤↓├┘");strParam = "";curTaskState = 'B'; break;
|
|
2622 |
case 3:
|
|
2623 |
strOp = _T("-[↓]");strParam = "";curTaskState = 'B'; break;
|
|
2624 |
default:
|
|
2625 |
break;
|
|
2626 |
}
|
|
2627 |
break;
|
|
2628 |
case 0x12:
|
|
2629 |
switch (lastLParam)
|
|
2630 |
{
|
|
2631 |
case 1:
|
|
2632 |
strOp = _T("-| |-");strParam = "";curTaskState = 'B'; break;
|
|
2633 |
case 2:
|
|
2634 |
strOp = _T("└┤├┘");strParam = "";curTaskState = 'B'; break;
|
|
2635 |
case 3:
|
|
2636 |
strOp = _T("-[ ]");strParam = "";curTaskState = 'B'; break;
|
|
2637 |
default:
|
|
2638 |
break;
|
|
2639 |
}
|
|
2640 |
break;
|
|
2641 |
case 0x13:
|
|
2642 |
switch (lastLParam)
|
|
2643 |
{
|
|
2644 |
case 1:
|
|
2645 |
strOp = _T("-|/|-");strParam = "";curTaskState = 'B'; break;
|
|
2646 |
case 2:
|
|
2647 |
strOp = _T("└┤/├┘");strParam = "";curTaskState = 'B'; break;
|
|
2648 |
case 8:
|
|
2649 |
strOp = _T("(DF/)");strParam = "";curTaskState = 'A'; break;
|
|
2650 |
case 9:
|
|
2651 |
strOp = _T("(DF)");strParam = "";curTaskState = 'A'; break;
|
|
2652 |
case 3:
|
|
2653 |
case 4:
|
|
2654 |
case 5:
|
|
2655 |
case 6:
|
|
2656 |
case 7:
|
|
2657 |
case 0xa:
|
|
2658 |
case 0xb:
|
|
2659 |
case 0xc:
|
|
2660 |
case 0xd:
|
|
2661 |
case 0xe:
|
|
2662 |
case 0xf:
|
|
2663 |
strOp = _T("- / -");strParam = "";curTaskState = 'A';break;
|
|
2664 |
default:
|
|
2665 |
break;
|
|
2666 |
}
|
|
2667 |
break;
|
|
2668 |
case 0x14:
|
|
2669 |
switch (lastLParam)
|
|
2670 |
{
|
|
2671 |
case 1:
|
|
2672 |
strOp = _T("-| |-");strParam = "";curTaskState = 'B'; break;
|
|
2673 |
case 2:
|
|
2674 |
strOp = _T("└┤├┘"); strParam = "";curTaskState = 'B';break;
|
|
2675 |
case 8:
|
|
2676 |
strOp = _T("(DF)");strParam = "";curTaskState = 'A'; break;
|
|
2677 |
case 9:
|
|
2678 |
strOp = _T("(DF/)");strParam = "";curTaskState = 'A'; break;
|
|
2679 |
case 3:
|
|
2680 |
case 4:
|
|
2681 |
case 5:
|
|
2682 |
case 6:
|
|
2683 |
case 7:
|
|
2684 |
case 0xa:
|
|
2685 |
case 0xb:
|
|
2686 |
case 0xc:
|
|
2687 |
case 0xd:
|
|
2688 |
case 0xe:
|
|
2689 |
case 0xf:
|
|
2690 |
strOp = _T("- / -");strParam = "";curTaskState = 'A';break;
|
|
2691 |
default:
|
|
2692 |
break;
|
|
2693 |
}
|
|
2694 |
break;
|
|
2695 |
default:
|
|
2696 |
break;
|
|
2697 |
}
|
|
2698 |
}
|
|
2699 |
else if (HParam == 0x2)
|
|
2700 |
{
|
|
2701 |
switch (LParam)
|
|
2702 |
{
|
|
2703 |
case 1:
|
|
2704 |
strParam =_T(" X");curTaskState = 'C'; break;
|
|
2705 |
case 2:
|
|
2706 |
strParam = _T(" Y");curTaskState = 'C'; break;
|
|
2707 |
case 3:
|
|
2708 |
strParam = _T(" R");curTaskState = 'C'; break;
|
|
2709 |
case 4:
|
|
2710 |
strParam = _T(" L"); curTaskState = 'C';break;
|
|
2711 |
case 5:
|
|
2712 |
strParam = _T(" P");curTaskState = 'C'; break;
|
|
2713 |
case 6:
|
|
2714 |
strParam = _T(" T"); curTaskState = 'C';break;
|
|
2715 |
case 7:
|
|
2716 |
strParam = _T(" C");curTaskState = 'C'; break;
|
|
2717 |
case 8:
|
|
2718 |
strParam = _T(" E");curTaskState = 'C'; break;
|
|
2719 |
default:
|
|
2720 |
break;
|
|
2721 |
}
|
|
2722 |
}
|
|
2723 |
|
|
2724 |
|
|
2725 |
str = strOp + _T(" ") + strParam;
|
|
2726 |
break;
|
|
2727 |
case 'C':
|
|
2728 |
// str = strOp + _T(" ") + strParam;
|
|
2729 |
if (HParam == 0x1) //operator 1
|
|
2730 |
{
|
|
2731 |
switch (LParam)
|
|
2732 |
{
|
|
2733 |
case 1:
|
|
2734 |
strOp = _T("-| |-"); strParam = "";
|
|
2735 |
if (lastLParam != LParam)
|
|
2736 |
{
|
|
2737 |
clickCounter = 0;
|
|
2738 |
clickCounterNot = 0;
|
|
2739 |
}
|
|
2740 |
lastLParam = LParam;
|
|
2741 |
curTaskState = 'B';
|
|
2742 |
break;
|
|
2743 |
case 2:
|
|
2744 |
strOp = _T("└┤├┘");strParam = "";
|
|
2745 |
if (lastLParam != LParam)
|
|
2746 |
{
|
|
2747 |
clickCounter = 0;
|
|
2748 |
clickCounterNot = 0;
|
|
2749 |
}
|
|
2750 |
lastLParam = LParam;
|
|
2751 |
curTaskState = 'B';
|
|
2752 |
break;
|
|
2753 |
case 3:
|
|
2754 |
strOp = _T("-[ ]");strParam = "";
|
|
2755 |
if (lastLParam != LParam)
|
|
2756 |
{
|
|
2757 |
clickCounter = 0;
|
|
2758 |
clickCounterNot = 0;
|
|
2759 |
}
|
|
2760 |
lastLParam = LParam;
|
|
2761 |
curTaskState = 'B';
|
|
2762 |
break;
|
|
2763 |
case 4:
|
|
2764 |
strOp = _T("(MC)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2765 |
case 5:
|
|
2766 |
strOp = _T("(MCE)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2767 |
case 6:
|
|
2768 |
strOp = _T("-<S>");strParam = "";lastLParam = LParam;curTaskState = 'B'; break;
|
|
2769 |
case 7:
|
|
2770 |
strOp = _T("-<R>");strParam = "";lastLParam = LParam;curTaskState = 'B'; break;
|
|
2771 |
case 8:
|
|
2772 |
strOp = _T("(DF)");strParam = "";
|
|
2773 |
if (lastLParam != LParam)
|
|
2774 |
{
|
|
2775 |
clickCounterNot = 0;
|
|
2776 |
}
|
|
2777 |
lastLParam = LParam;
|
|
2778 |
curTaskState = 'A';
|
|
2779 |
break;
|
|
2780 |
case 9:
|
|
2781 |
strOp = _T("(DF/)");strParam = "";
|
|
2782 |
if (lastLParam != LParam)
|
|
2783 |
{
|
|
2784 |
clickCounterNot = 0;
|
|
2785 |
}
|
|
2786 |
lastLParam = LParam;
|
|
2787 |
curTaskState = 'A';
|
|
2788 |
break;
|
|
2789 |
case 0x0a:
|
|
2790 |
strOp = _T("(ED)");strParam = "";lastLParam = LParam;curTaskState = 'A'; break;
|
|
2791 |
case 0x0b:
|
|
2792 |
strOp = _T("-[TMX]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2793 |
case 0x0c:
|
|
2794 |
strOp = _T("-[TMY]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2795 |
case 0x0d:
|
|
2796 |
strOp = _T("-[TMR]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2797 |
case 0x0e:
|
|
2798 |
strOp = _T("-[TML]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2799 |
case 0x0f:
|
|
2800 |
strOp = _T("-[CT]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
2801 |
case 0x10:
|
|
2802 |
switch (lastLParam)
|
|
2803 |
{
|
|
2804 |
case 1:
|
|
2805 |
strOp = _T("-|↑|-");strParam = "";curTaskState = 'B'; break;
|
|
2806 |
case 2:
|
|
2807 |
strOp = _T("└┤↑├┘");strParam = "";curTaskState = 'B'; break;
|
|
2808 |
case 3:
|
|
2809 |
strOp = _T("-[↑]"); strParam = "";curTaskState = 'B';break;
|
|
2810 |
default:
|
|
2811 |
break;
|
|
2812 |
}
|
|
2813 |
break;
|
|
2814 |
case 0x11:
|
|
2815 |
switch (lastLParam)
|
|
2816 |
{
|
|
2817 |
case 1:
|
|
2818 |
strOp = _T("-|↓|-");strParam = "";curTaskState = 'B'; break;
|
|
2819 |
case 2:
|
|
2820 |
strOp = _T("└┤↓├┘");strParam = "";curTaskState = 'B'; break;
|
|
2821 |
case 3:
|
|
2822 |
strOp = _T("-[↓]");strParam = "";curTaskState = 'B'; break;
|
|
2823 |
default:
|
|
2824 |
break;
|
|
2825 |
}
|
|
2826 |
break;
|
|
2827 |
case 0x12:
|
|
2828 |
switch (lastLParam)
|
|
2829 |
{
|
|
2830 |
case 1:
|
|
2831 |
strOp = _T("-| |-");strParam = "";curTaskState = 'B'; break;
|
|
2832 |
case 2:
|
|
2833 |
strOp = _T("└┤├┘");strParam = "";curTaskState = 'B'; break;
|
|
2834 |
case 3:
|
|
2835 |
strOp = _T("-[ ]");strParam = "";curTaskState = 'B'; break;
|
|
2836 |
default:
|
|
2837 |
break;
|
|
2838 |
}
|
|
2839 |
break;
|
|
2840 |
case 0x13:
|
|
2841 |
switch (lastLParam)
|
|
2842 |
{
|
|
2843 |
case 1:
|
|
2844 |
strOp = _T("-|/|-");strParam = "";curTaskState = 'B'; break;
|
|
2845 |
case 2:
|
|
2846 |
strOp = _T("└┤/├┘");strParam = "";curTaskState = 'B'; break;
|
|
2847 |
case 8:
|
|
2848 |
strOp = _T("(DF/)");strParam = "";curTaskState = 'A'; break;
|
|
2849 |
case 9:
|
|
2850 |
strOp = _T("(DF)");strParam = "";curTaskState = 'A'; break;
|
|
2851 |
case 3:
|
|
2852 |
case 4:
|
|
2853 |
case 5:
|
|
2854 |
case 6:
|
|
2855 |
case 7:
|
|
2856 |
case 0xa:
|
|
2857 |
case 0xb:
|
|
2858 |
case 0xc:
|
|
2859 |
case 0xd:
|
|
2860 |
case 0xe:
|
|
2861 |
case 0xf:
|
|
2862 |
strOp = _T("- / -");strParam = "";curTaskState = 'A';break;
|
|
2863 |
default:
|
|
2864 |
break;
|
|
2865 |
}
|
|
2866 |
break;
|
|
2867 |
case 0x14:
|
|
2868 |
switch (lastLParam)
|
|
2869 |
{
|
|
2870 |
case 1:
|
|
2871 |
strOp = _T("-| |-");strParam = "";curTaskState = 'B'; break;
|
|
2872 |
case 2:
|
|
2873 |
strOp = _T("└┤├┘"); strParam = "";curTaskState = 'B';break;
|
|
2874 |
case 8:
|
|
2875 |
strOp = _T("(DF)");strParam = "";curTaskState = 'A'; break;
|
|
2876 |
case 9:
|
|
2877 |
strOp = _T("(DF/)");strParam = "";curTaskState = 'A'; break;
|
|
2878 |
case 3:
|
|
2879 |
case 4:
|
|
2880 |
case 5:
|
|
2881 |
case 6:
|
|
2882 |
case 7:
|
|
2883 |
case 0xa:
|
|
2884 |
case 0xb:
|
|
2885 |
case 0xc:
|
|
2886 |
case 0xd:
|
|
2887 |
case 0xe:
|
|
2888 |
case 0xf:
|
|
2889 |
strOp = _T("- / -");strParam = "";curTaskState = 'A';break;
|
|
2890 |
default:
|
|
2891 |
break;
|
|
2892 |
}
|
|
2893 |
break;
|
|
2894 |
default:
|
|
2895 |
break;
|
|
2896 |
}
|
|
2897 |
}
|
|
2898 |
else if (HParam == 0x2)
|
|
2899 |
{
|
|
2900 |
switch (LParam)
|
|
2901 |
{
|
|
2902 |
case 1:
|
|
2903 |
strParam = _T(" X");curTaskState = 'C'; break;
|
|
2904 |
case 2:
|
|
2905 |
strParam = _T(" Y");curTaskState = 'C'; break;
|
|
2906 |
case 3:
|
|
2907 |
strParam = _T(" R");curTaskState = 'C'; break;
|
|
2908 |
case 4:
|
|
2909 |
strParam = _T(" L"); curTaskState = 'C';break;
|
|
2910 |
case 5:
|
|
2911 |
strParam = _T(" P");curTaskState = 'C'; break;
|
|
2912 |
case 6:
|
|
2913 |
strParam = _T(" T"); curTaskState = 'C';break;
|
|
2914 |
case 7:
|
|
2915 |
strParam = _T(" C");curTaskState = 'C'; break;
|
|
2916 |
case 8:
|
|
2917 |
strParam = _T(" E");curTaskState = 'C'; break;
|
|
2918 |
default:
|
|
2919 |
break;
|
|
2920 |
}
|
|
2921 |
}
|
|
2922 |
else if (HParam == 0x3)
|
|
2923 |
{
|
|
2924 |
switch (LParam)
|
|
2925 |
{
|
|
2926 |
case 0:
|
|
2927 |
strNumTemp = _T("0");curTaskState = 'D'; break;
|
|
2928 |
case 1:
|
|
2929 |
strNumTemp = _T("1");curTaskState = 'D'; break;
|
|
2930 |
case 2:
|
|
2931 |
strNumTemp = _T("2");curTaskState = 'D'; break;
|
|
2932 |
case 3:
|
|
2933 |
strNumTemp = _T("3"); curTaskState = 'D';break;
|
|
2934 |
case 4:
|
|
2935 |
strNumTemp = _T("4");curTaskState = 'D'; break;
|
|
2936 |
case 5:
|
|
2937 |
strNumTemp = _T("5");curTaskState = 'D'; break;
|
|
2938 |
case 6:
|
|
2939 |
strNumTemp = _T("6"); curTaskState = 'D';break;
|
|
2940 |
case 7:
|
|
2941 |
strNumTemp = _T("7");curTaskState = 'D'; break;
|
|
2942 |
case 8:
|
|
2943 |
strNumTemp = _T("8");curTaskState = 'D'; break;
|
|
2944 |
case 9:
|
|
2945 |
strNumTemp = _T("9");curTaskState = 'D'; break;
|
|
2946 |
case 0x0A:
|
|
2947 |
strNumTemp = _T("A");curTaskState = 'D'; break;
|
|
2948 |
case 0x0B:
|
|
2949 |
strNumTemp = _T("B");curTaskState = 'D'; break;
|
|
2950 |
case 0x0C:
|
|
2951 |
strNumTemp = _T("C"); curTaskState = 'D';break;
|
|
2952 |
case 0x0D:
|
|
2953 |
strNumTemp = _T("D");curTaskState = 'D'; break;
|
|
2954 |
case 0x0E:
|
|
2955 |
strNumTemp = _T("E");curTaskState = 'D'; break;
|
|
2956 |
case 0x0F:
|
|
2957 |
strNumTemp = _T("F");curTaskState = 'D'; break;
|
|
2958 |
default:
|
|
2959 |
break;
|
|
2960 |
}
|
|
2961 |
if (strNum.GetLength() < 4)
|
|
2962 |
{
|
|
2963 |
strNum.Append(strNumTemp);
|
|
2964 |
}
|
|
2965 |
else
|
|
2966 |
{
|
|
2967 |
strNum = strNum.Right(strNum.GetLength() - 1);
|
|
2968 |
strNum.Append(strNumTemp);
|
|
2969 |
}
|
|
2970 |
}
|
|
2971 |
|
|
2972 |
str = strOp + _T(" ") + strParam+ " " + strNum;
|
|
2973 |
break;
|
|
2974 |
case 'D':
|
|
2975 |
if (HParam == 0x1) //operator 1
|
|
2976 |
{
|
|
2977 |
switch (LParam)
|
|
2978 |
{
|
|
2979 |
case 1:
|
|
2980 |
strOp = _T("-| |-"); strParam = "";
|
|
2981 |
if (lastLParam != LParam)
|
|
2982 |
{
|
|
2983 |
clickCounter = 0;
|
|
2984 |
clickCounterNot = 0;
|
|
2985 |
}
|
|
2986 |
lastLParam = LParam;
|
|
2987 |
curTaskState = 'B';
|
|
2988 |
break;
|
|
2989 |
case 2:
|
|
2990 |
strOp = _T("└┤├┘");strParam = "";
|
|
2991 |
if (lastLParam != LParam)
|
|
2992 |
{
|
|
2993 |
clickCounter = 0;
|
|
2994 |
clickCounterNot = 0;
|
|
2995 |
}
|
|
2996 |
lastLParam = LParam;
|
|
2997 |
curTaskState = 'B';
|
|
2998 |
break;
|
|
2999 |
case 3:
|
|
3000 |
strOp = _T("-[ ]");strParam = "";
|
|
3001 |
if (lastLParam != LParam)
|
|
3002 |
{
|
|
3003 |
clickCounter = 0;
|
|
3004 |
clickCounterNot = 0;
|
|
3005 |
}
|
|
3006 |
lastLParam = LParam;
|
|
3007 |
curTaskState = 'B';
|
|
3008 |
break;
|
|
3009 |
case 4:
|
|
3010 |
strOp = _T("(MC)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
3011 |
case 5:
|
|
3012 |
strOp = _T("(MCE)");strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
3013 |
case 6:
|
|
3014 |
strOp = _T("-<S>");strParam = "";lastLParam = LParam;curTaskState = 'B'; break;
|
|
3015 |
case 7:
|
|
3016 |
strOp = _T("-<R>");strParam = "";lastLParam = LParam;curTaskState = 'B'; break;
|
|
3017 |
case 8:
|
|
3018 |
strOp = _T("(DF)");strParam = "";
|
|
3019 |
if (lastLParam != LParam)
|
|
3020 |
{
|
|
3021 |
clickCounterNot = 0;
|
|
3022 |
}
|
|
3023 |
lastLParam = LParam;
|
|
3024 |
curTaskState = 'A';
|
|
3025 |
break;
|
|
3026 |
case 9:
|
|
3027 |
strOp = _T("(DF/)");strParam = "";
|
|
3028 |
if (lastLParam != LParam)
|
|
3029 |
{
|
|
3030 |
clickCounterNot = 0;
|
|
3031 |
}
|
|
3032 |
lastLParam = LParam;
|
|
3033 |
curTaskState = 'A';
|
|
3034 |
break;
|
|
3035 |
case 0x0a:
|
|
3036 |
strOp = _T("(ED)");strParam = "";lastLParam = LParam;curTaskState = 'A'; break;
|
|
3037 |
case 0x0b:
|
|
3038 |
strOp = _T("-[TMX]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
3039 |
case 0x0c:
|
|
3040 |
strOp = _T("-[TMY]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
3041 |
case 0x0d:
|
|
3042 |
strOp = _T("-[TMR]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
3043 |
case 0x0e:
|
|
3044 |
strOp = _T("-[TML]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
3045 |
case 0x0f:
|
|
3046 |
strOp = _T("-[CT]-"); strParam = "";lastLParam = LParam;curTaskState = 'C'; break;
|
|
3047 |
case 0x10:
|
|
3048 |
switch (lastLParam)
|
|
3049 |
{
|
|
3050 |
case 1:
|
|
3051 |
strOp = _T("-|↑|-");strParam = "";curTaskState = 'B'; break;
|
|
3052 |
case 2:
|
|
3053 |
strOp = _T("└┤↑├┘");strParam = "";curTaskState = 'B'; break;
|
|
3054 |
case 3:
|
|
3055 |
strOp = _T("-[↑]"); strParam = "";curTaskState = 'B';break;
|
|
3056 |
default:
|
|
3057 |
break;
|
|
3058 |
}
|
|
3059 |
break;
|
|
3060 |
case 0x11:
|
|
3061 |
switch (lastLParam)
|
|
3062 |
{
|
|
3063 |
case 1:
|
|
3064 |
strOp = _T("-|↓|-");strParam = "";curTaskState = 'B'; break;
|
|
3065 |
case 2:
|
|
3066 |
strOp = _T("└┤↓├┘");strParam = "";curTaskState = 'B'; break;
|
|
3067 |
case 3:
|
|
3068 |
strOp = _T("-[↓]");strParam = "";curTaskState = 'B'; break;
|
|
3069 |
default:
|
|
3070 |
break;
|
|
3071 |
}
|
|
3072 |
break;
|
|
3073 |
case 0x12:
|
|
3074 |
switch (lastLParam)
|
|
3075 |
{
|
|
3076 |
case 1:
|
|
3077 |
strOp = _T("-| |-");strParam = "";curTaskState = 'B'; break;
|
|
3078 |
case 2:
|
|
3079 |
strOp = _T("└┤├┘");strParam = "";curTaskState = 'B'; break;
|
|
3080 |
case 3:
|
|
3081 |
strOp = _T("-[ ]");strParam = "";curTaskState = 'B'; break;
|
|
3082 |
default:
|
|
3083 |
break;
|
|
3084 |
}
|
|
3085 |
break;
|
|
3086 |
case 0x13:
|
|
3087 |
switch (lastLParam)
|
|
3088 |
{
|
|
3089 |
case 1:
|
|
3090 |
strOp = _T("-|/|-");strParam = "";curTaskState = 'B'; break;
|
|
3091 |
case 2:
|
|
3092 |
strOp = _T("└┤/├┘");strParam = "";curTaskState = 'B'; break;
|
|
3093 |
case 8:
|
|
3094 |
strOp = _T("(DF/)");strParam = "";curTaskState = 'A'; break;
|
|
3095 |
case 9:
|
|
3096 |
strOp = _T("(DF)");strParam = "";curTaskState = 'A'; break;
|
|
3097 |
case 3:
|
|
3098 |
case 4:
|
|
3099 |
case 5:
|
|
3100 |
case 6:
|
|
3101 |
case 7:
|
|
3102 |
case 0xa:
|
|
3103 |
case 0xb:
|
|
3104 |
case 0xc:
|
|
3105 |
case 0xd:
|
|
3106 |
case 0xe:
|
|
3107 |
case 0xf:
|
|
3108 |
strOp = _T("- / -");strParam = "";curTaskState = 'A';break;
|
|
3109 |
default:
|
|
3110 |
break;
|
|
3111 |
}
|
|
3112 |
break;
|
|
3113 |
case 0x14:
|
|
3114 |
switch (lastLParam)
|
|
3115 |
{
|
|
3116 |
case 1:
|
|
3117 |
strOp = _T("-| |-");strParam = "";curTaskState = 'B'; break;
|
|
3118 |
case 2:
|
|
3119 |
strOp = _T("└┤├┘"); strParam = "";curTaskState = 'B';break;
|
|
3120 |
case 8:
|
|
3121 |
strOp = _T("(DF)");strParam = "";curTaskState = 'A'; break;
|
|
3122 |
case 9:
|
|
3123 |
strOp = _T("(DF/)");strParam = "";curTaskState = 'A'; break;
|
|
3124 |
case 3:
|
|
3125 |
case 4:
|
|
3126 |
case 5:
|
|
3127 |
case 6:
|
|
3128 |
case 7:
|
|
3129 |
case 0xa:
|
|
3130 |
case 0xb:
|
|
3131 |
case 0xc:
|
|
3132 |
case 0xd:
|
|
3133 |
case 0xe:
|
|
3134 |
case 0xf:
|
|
3135 |
strOp = _T("- / -");strParam = "";curTaskState = 'A';break;
|
|
3136 |
default:
|
|
3137 |
break;
|
|
3138 |
}
|
|
3139 |
break;
|
|
3140 |
default:
|
|
3141 |
break;
|
|
3142 |
}
|
|
3143 |
strNum.Empty();
|
|
3144 |
}
|
|
3145 |
else if (HParam == 0x2)
|
|
3146 |
{
|
|
3147 |
switch (LParam)
|
|
3148 |
{
|
|
3149 |
case 1:
|
|
3150 |
strParam = _T(" X");curTaskState = 'C'; break;
|
|
3151 |
case 2:
|
|
3152 |
strParam = _T(" Y");curTaskState = 'C'; break;
|
|
3153 |
case 3:
|
|
3154 |
strParam = _T(" R");curTaskState = 'C'; break;
|
|
3155 |
case 4:
|
|
3156 |
strParam = _T(" L"); curTaskState = 'C';break;
|
|
3157 |
case 5:
|
|
3158 |
strParam = _T(" P");curTaskState = 'C'; break;
|
|
3159 |
case 6:
|
|
3160 |
strParam = _T(" T"); curTaskState = 'C';break;
|
|
3161 |
case 7:
|
|
3162 |
strParam = _T(" C");curTaskState = 'C'; break;
|
|
3163 |
case 8:
|
|
3164 |
strParam = _T(" E");curTaskState = 'C'; break;
|
|
3165 |
default:
|
|
3166 |
break;
|
|
3167 |
}
|
|
3168 |
strNum.Empty();
|
|
3169 |
}
|
|
3170 |
else if (HParam == 0x3)
|
|
3171 |
{
|
|
3172 |
switch (LParam)
|
|
3173 |
{
|
|
3174 |
case 0:
|
|
3175 |
strNumTemp = _T("0");curTaskState = 'D'; break;
|
|
3176 |
case 1:
|
|
3177 |
strNumTemp = _T("1");curTaskState = 'D'; break;
|
|
3178 |
case 2:
|
|
3179 |
strNumTemp = _T("2");curTaskState = 'D'; break;
|
|
3180 |
case 3:
|
|
3181 |
strNumTemp = _T("3"); curTaskState = 'D';break;
|
|
3182 |
case 4:
|
|
3183 |
strNumTemp = _T("4");curTaskState = 'D'; break;
|
|
3184 |
case 5:
|
|
3185 |
strNumTemp = _T("5");curTaskState = 'D'; break;
|
|
3186 |
case 6:
|
|
3187 |
strNumTemp = _T("6"); curTaskState = 'D';break;
|
|
3188 |
case 7:
|
|
3189 |
strNumTemp = _T("7");curTaskState = 'D'; break;
|
|
3190 |
case 8:
|
|
3191 |
strNumTemp = _T("8");curTaskState = 'D'; break;
|
|
3192 |
case 9:
|
|
3193 |
strNumTemp = _T("9");curTaskState = 'D'; break;
|
|
3194 |
case 0x0A:
|
|
3195 |
strNumTemp = _T("A");curTaskState = 'D'; break;
|
|
3196 |
case 0x0B:
|
|
3197 |
strNumTemp = _T("B");curTaskState = 'D'; break;
|
|
3198 |
case 0x0C:
|
|
3199 |
strNumTemp = _T("C"); curTaskState = 'D';break;
|
|
3200 |
case 0x0D:
|
|
3201 |
strNumTemp = _T("D");curTaskState = 'D'; break;
|
|
3202 |
case 0x0E:
|
|
3203 |
strNumTemp = _T("E");curTaskState = 'D'; break;
|
|
3204 |
case 0x0F:
|
|
3205 |
strNumTemp = _T("F");curTaskState = 'D'; break;
|
|
3206 |
default:
|
|
3207 |
break;
|
|
3208 |
}
|
|
3209 |
if (strNum.GetLength() < 4)
|
|
3210 |
{
|
|
3211 |
strNum.Append(strNumTemp);
|
|
3212 |
}
|
|
3213 |
else
|
|
3214 |
{
|
|
3215 |
strNum = strNum.Right(strNum.GetLength() - 1);
|
|
3216 |
strNum.Append(strNumTemp);
|
|
3217 |
}
|
|
3218 |
|
|
3219 |
}
|
|
3220 |
else if (HParam == 0x14)
|
|
3221 |
{
|
|
3222 |
strParam = "";
|
|
3223 |
strNum = "";
|
|
3224 |
curTaskState = 'A';
|
|
3225 |
strNum.Empty();
|
|
3226 |
}
|
|
3227 |
|
|
3228 |
str = strOp + _T(" ") + strParam + " " + strNum;
|
|
3229 |
break;
|
|
3230 |
}
|
|
3231 |
SetDlgItemText(IDC_EDIT_INPUT,str);
|
|
3232 |
// m_edit_input.SetWindowText(str); */
|
|
3233 |
return 0;
|
|
3234 |
}
|
|
3235 |
|