-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMoneyCharge.cs
More file actions
284 lines (261 loc) · 6.73 KB
/
Copy pathMoneyCharge.cs
File metadata and controls
284 lines (261 loc) · 6.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
using System;
// Token: 0x020000A8 RID: 168
public class MoneyCharge : mScreen, IActionListener
{
// Token: 0x0600075F RID: 1887 RVA: 0x00062B78 File Offset: 0x00060D78
public MoneyCharge()
{
this.w = GameCanvas.w - 20;
if (this.w > 320)
{
this.w = 320;
}
this.strPaint = mFont.tahoma_7b_green2.splitFontArray(mResources.pay_card, this.w - 20);
this.x = (GameCanvas.w - this.w) / 2;
this.y = GameCanvas.h - 150 - (this.strPaint.Length - 1) * 20;
this.h = 110 + (this.strPaint.Length - 1) * 20;
this.yP = this.y;
this.tfSerial = new TField();
this.tfSerial.name = mResources.SERI_NUM;
this.tfSerial.x = this.x + 10;
this.tfSerial.y = this.y + 35 + (this.strPaint.Length - 1) * 20;
this.yt = this.tfSerial.y;
this.tfSerial.width = this.w - 20;
this.tfSerial.height = mScreen.ITEM_HEIGHT + 2;
if (GameCanvas.isTouch)
{
this.tfSerial.isFocus = false;
}
else
{
this.tfSerial.isFocus = true;
}
this.tfSerial.setIputType(TField.INPUT_TYPE_ANY);
if (Main.isWindowsPhone)
{
this.tfSerial.showSubTextField = false;
}
if (Main.isIPhone)
{
this.tfSerial.isPaintMouse = false;
}
if (!GameCanvas.isTouch)
{
this.right = this.tfSerial.cmdClear;
}
this.tfCode = new TField();
this.tfCode.name = mResources.CARD_CODE;
this.tfCode.x = this.x + 10;
this.tfCode.y = this.tfSerial.y + 35;
this.tfCode.width = this.w - 20;
this.tfCode.height = mScreen.ITEM_HEIGHT + 2;
this.tfCode.isFocus = false;
this.tfCode.setIputType(TField.INPUT_TYPE_ANY);
if (Main.isWindowsPhone)
{
this.tfCode.showSubTextField = false;
}
if (Main.isIPhone)
{
this.tfCode.isPaintMouse = false;
}
this.left = new Command(mResources.CLOSE, this, 1, null);
this.center = new Command(mResources.pay_card2, this, 2, null);
if (GameCanvas.isTouch)
{
this.center.x = GameCanvas.w / 2 + 18;
this.left.x = GameCanvas.w / 2 - 85;
this.center.y = (this.left.y = this.y + this.h + 5);
}
this.freeAreaHeight = this.tfSerial.y - (4 * this.tfSerial.height - 10);
this.yP = this.tfSerial.y;
}
// Token: 0x06000760 RID: 1888 RVA: 0x00006A3D File Offset: 0x00004C3D
public static MoneyCharge gI()
{
if (MoneyCharge.instance == null)
{
MoneyCharge.instance = new MoneyCharge();
}
return MoneyCharge.instance;
}
// Token: 0x06000761 RID: 1889 RVA: 0x00062EAC File Offset: 0x000610AC
public override void switchToMe()
{
try
{
if ((int)mResources.language == 0)
{
GameMidlet.instance.platformRequest("http://ngocrongonline.com/");
}
if ((int)mResources.language == 2)
{
GameMidlet.instance.platformRequest("http://dragonball.indonaga.com/");
}
if ((int)mResources.language == 1)
{
GameMidlet.instance.platformRequest("http://world.teamobi.com/games-page-0.html");
}
}
catch (Exception ex)
{
}
}
// Token: 0x06000762 RID: 1890 RVA: 0x00003584 File Offset: 0x00001784
public void updateTfWhenOpenKb()
{
}
// Token: 0x06000763 RID: 1891 RVA: 0x00062F24 File Offset: 0x00061124
public override void paint(mGraphics g)
{
GameScr.gI().paint(g);
PopUp.paintPopUp(g, this.x, this.y, this.w, this.h, -1, true);
for (int i = 0; i < this.strPaint.Length; i++)
{
mFont.tahoma_7b_green2.drawString(g, this.strPaint[i], GameCanvas.w / 2, this.y + 15 + i * 20, mFont.CENTER);
}
this.tfSerial.paint(g);
this.tfCode.paint(g);
base.paint(g);
}
// Token: 0x06000764 RID: 1892 RVA: 0x00006A58 File Offset: 0x00004C58
public override void update()
{
GameScr.gI().update();
this.tfSerial.update();
this.tfCode.update();
if (Main.isWindowsPhone)
{
this.updateTfWhenOpenKb();
}
}
// Token: 0x06000765 RID: 1893 RVA: 0x00062FC4 File Offset: 0x000611C4
public override void keyPress(int keyCode)
{
if (this.tfSerial.isFocus)
{
this.tfSerial.keyPressed(keyCode);
}
else if (this.tfCode.isFocus)
{
this.tfCode.keyPressed(keyCode);
}
base.keyPress(keyCode);
}
// Token: 0x06000766 RID: 1894 RVA: 0x00063018 File Offset: 0x00061218
public override void updateKey()
{
if (GameCanvas.keyPressed[(!Main.isPC) ? 2 : 21])
{
this.focus--;
if (this.focus < 0)
{
this.focus = 1;
}
}
else if (GameCanvas.keyPressed[(!Main.isPC) ? 8 : 22])
{
this.focus++;
if (this.focus > 1)
{
this.focus = 1;
}
}
if (GameCanvas.keyPressed[(!Main.isPC) ? 2 : 21] || GameCanvas.keyPressed[(!Main.isPC) ? 8 : 22])
{
GameCanvas.clearKeyPressed();
if (this.focus == 1)
{
this.tfSerial.isFocus = false;
this.tfCode.isFocus = true;
if (!GameCanvas.isTouch)
{
this.right = this.tfCode.cmdClear;
}
}
else if (this.focus == 0)
{
this.tfSerial.isFocus = true;
this.tfCode.isFocus = false;
if (!GameCanvas.isTouch)
{
this.right = this.tfSerial.cmdClear;
}
}
else
{
this.tfSerial.isFocus = false;
this.tfCode.isFocus = false;
}
}
if (GameCanvas.isPointerJustRelease)
{
if (GameCanvas.isPointerHoldIn(this.tfSerial.x, this.tfSerial.y, this.tfSerial.width, this.tfSerial.height))
{
this.focus = 0;
}
else if (GameCanvas.isPointerHoldIn(this.tfCode.x, this.tfCode.y, this.tfCode.width, this.tfCode.height))
{
this.focus = 1;
}
}
base.updateKey();
GameCanvas.clearKeyPressed();
}
// Token: 0x06000767 RID: 1895 RVA: 0x00006A8A File Offset: 0x00004C8A
public void clearScreen()
{
MoneyCharge.instance = null;
}
// Token: 0x06000768 RID: 1896 RVA: 0x00063218 File Offset: 0x00061418
public void perform(int idAction, object p)
{
if (idAction == 1)
{
GameScr.instance.switchToMe();
this.clearScreen();
}
if (idAction == 2)
{
if (this.tfSerial.getText() == null || this.tfSerial.getText().Equals(string.Empty))
{
GameCanvas.startOKDlg(mResources.serial_blank);
return;
}
if (this.tfCode.getText() == null || this.tfCode.getText().Equals(string.Empty))
{
GameCanvas.startOKDlg(mResources.card_code_blank);
return;
}
Service.gI().sendCardInfo(this.tfSerial.getText(), this.tfCode.getText());
GameScr.instance.switchToMe();
this.clearScreen();
}
}
// Token: 0x04000E01 RID: 3585
public static MoneyCharge instance;
// Token: 0x04000E02 RID: 3586
public TField tfSerial;
// Token: 0x04000E03 RID: 3587
public TField tfCode;
// Token: 0x04000E04 RID: 3588
private int x;
// Token: 0x04000E05 RID: 3589
private int y;
// Token: 0x04000E06 RID: 3590
private int w;
// Token: 0x04000E07 RID: 3591
private int h;
// Token: 0x04000E08 RID: 3592
private string[] strPaint;
// Token: 0x04000E09 RID: 3593
private int focus;
// Token: 0x04000E0A RID: 3594
private int yt;
// Token: 0x04000E0B RID: 3595
private int freeAreaHeight;
// Token: 0x04000E0C RID: 3596
private int yy = GameCanvas.hh - mScreen.ITEM_HEIGHT - 5;
// Token: 0x04000E0D RID: 3597
private int yP;
}