-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyUserSettings.cs
608 lines (532 loc) · 17.1 KB
/
MyUserSettings.cs
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.Windows.Forms;
using System.Configuration;
public class MyUserSettings : ApplicationSettingsBase
{
[UserScopedSetting()]
[DefaultSettingValue("DarkGray")]
public Color RTBMainBackColor
{
get { return ((Color)this["RTBMainBackColor"]);}
set {this["RTBMainBackColor"] = (Color)value;}
}
[UserScopedSetting()]
[DefaultSettingValue("White")]
public Color Color00
{
get { return ((Color)this["Color00"]); }
set { this["Color00"] = (Color)value; }
}
// string col = Color.DarkViolet.ToString(); // gets names
[UserScopedSetting()]
[DefaultSettingValue("Blue")]
public Color Color01
{
get { return ((Color)this["Color01"]); }
set { this["Color01"] = (Color)value; }
}
[UserScopedSetting()]
[DefaultSettingValue("Green")]
public Color Color02
{
get { return ((Color)this["Color02"]); }
set { this["Color02"] = (Color)value; }
}
[UserScopedSetting()]
[DefaultSettingValue("Red")]
public Color Color03
{
get { return ((Color)this["Color03"]); }
set { this["Color03"] = (Color)value; }
}
[UserScopedSetting()]
[DefaultSettingValue("Crimson")]
public Color Color04
{
get { return ((Color)this["Color04"]); }
set { this["Color04"] = (Color)value; }
}
[UserScopedSetting()]
[DefaultSettingValue("DarkViolet")] //
public Color Color05
{
get { return ((Color)this["Color05"]); }
set { this["Color05"] = (Color)value; }
}
[UserScopedSetting()]
[DefaultSettingValue("SaddleBrown")]
public Color Color06
{
get { return ((Color)this["Color06"]); }
set { this["Color06"] = (Color)value; }
}
[UserScopedSetting()]
[DefaultSettingValue("SlateGray")]
public Color Color07
{
get { return ((Color)this["Color07"]); }
set { this["Color07"] = (Color)value; }
}
[UserScopedSetting()]
[DefaultSettingValue("DodgerBlue")]
public Color Color08
{
get { return ((Color)this["Color08"]); }
set { this["Color08"] = (Color)value; }
}
[UserScopedSetting()]
[DefaultSettingValue("Olive")]
public Color Color09
{
get { return ((Color)this["Color09"]); }
set { this["Color09"] = (Color)value; }
}
[UserScopedSetting()]
[DefaultSettingValue("Yellow")]
public Color Color10
{
get { return ((Color)this["Color10"]); }
set { this["Color10"] = (Color)value; }
}
[UserScopedSetting()]
[DefaultSettingValue("Black")]
public Color Color11
{
get { return ((Color)this["Color11"]); }
set { this["Color11"] = (Color)value; }
}
[UserScopedSetting()]
[DefaultSettingValue("")]
public String FilePath
{
get { return ((String)this["FilePath"]); }
set { this["FilePath"] = (String)value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("600,100")]
public Point FrmMainLocation
{
get { return (Point)(this["FrmMainLocation"]); }
set { this["FrmMainLocation"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("950, 800")]
public Size FrmMainSize
{
get { return (Size)this["FrmMainSize"]; }
set { this["FrmMainSize"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("900,120")]
public Point FrmColorLocation
{
get { return (Point)(this["FrmColorLocation"]); }
set { this["FrmColorLocation"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("200,600")]
public Point FrmQuizLocation
{
get { return (Point)(this["FrmQuizLocation"]); }
set { this["FrmQuizLocation"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("1521, 858")] //1521, 858
public Size FrmQuizSize
{
get { return (Size)this["FrmQuizSize"]; }
set { this["FrmQuizSize"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValue("")]
public String TTS_Voice
{
get { return ((String)this["TTS_Voice"]); }
set { this["TTS_Voice"] = (String)value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValue("English")]
public String OCR_Language
{
get { return ((String)this["OCR_Language"]); }
set { this["OCR_Language"] = (String)value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("960,160")]
public Point FrmSectionLocation
{
get { return (Point)(this["FrmSectionLocation"]); }
set { this["FrmSectionLocation"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("200, 300")]
public Size FrmSectionSize
{
get { return (Size)this["FrmSectionSize"]; }
set { this["FrmSectionSize"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("700,120")]
public Point FrmTTSLocation
{
get { return (Point)(this["FrmTTSLocation"]); }
set { this["FrmTTSLocation"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("true")]
public Boolean FrmMainInit
{
get { return (Boolean)(this["FrmMainInit"]); }
set { this["FrmMainInit"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("true")]
public Boolean FrmColorInit
{
get { return (Boolean)(this["FrmColorInit"]); }
set { this["FrmColorInit"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("true")]
public Boolean FrmQuizInit
{
get { return (Boolean)(this["FrmQuizInit"]); }
set { this["FrmQuizInit"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("true")]
public Boolean FrmSectionInit
{
get { return (Boolean)(this["FrmSectionInit"]); }
set { this["FrmSectionInit"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("0")]
public int CursorPosition
{
get { return (int)(this["CursorPosition"]); }
set { this["CursorPosition"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("true")]
public Boolean FrmMainWordWrap
{
get { return (Boolean)(this["FrmMainWordWrap"]); }
set { this["FrmMainWordWrap"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("true")]
public Boolean Italics
{
get { return (Boolean)(this["Italics"]); }
set { this["Italics"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("Black")]
public Color FrmMainTextForecolor
{
get { return (Color)(this["FrmMainTextForecolor"]); }
set { this["FrmMainTextForecolor"] = value; }
}
[UserScopedSettingAttribute()] // Global Standard BackColor for all RichTextBoxes
[DefaultSettingValueAttribute("Color.FromArgb(169, 169, 169)")]
public Color backColorStd
{
get { return (Color)(this["backColorStd"]); }
set { this["backColorStd"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("false")]
public Boolean PrintCanceled
{
get { return (Boolean)(this["PrintCanceled"]); }
set { this["PrintCanceled"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("false")]
public Boolean BoolRTBModified
{
get { return (Boolean)(this["BoolRTBModified"]); }
set { this["BoolRTBModified"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String StrSetUserAgreed
{
get { return (String)(this["StrSetUserAgreed"]); }
set { this["StrSetUserAgreed"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("false")]
public Boolean UserHasAgreed
{
get { return (Boolean)(this["UserHasAgreed"]); }
set { this["UserHasAgreed"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("true")]
public Boolean FrmOptionsOpenFromLastLocation
{
get { return (Boolean)(this["FrmOptionsOpenFromLastLocation"]); }
set { this["FrmOptionsOpenFromLastLocation"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("false")]
public Boolean FrmOptionsOptOutOfFutureChangeFontWarnings
{
get { return (Boolean)(this["FrmOptionsOptOutOfFutureChangeFontWarnings"]); }
set { this["FrmOptionsOptOutOfFutureChangeFontWarnings"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("04/24/2022")]
public String StrBuildDate
{
get { return (String)(this["StrBuildDate"]); }
set { this["StrBuildDate"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("7.0")]
public String BuildVersion
{
get { return (String)(this["BuildVersion"]); }
set { this["BuildVersion"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath01
{
get { return (String)(this["FilePath01"]); }
set { this["FilePath01"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath02
{
get { return (String)(this["FilePath02"]); }
set { this["FilePath02"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath03
{
get { return (String)(this["FilePath03"]); }
set { this["FilePath03"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath04
{
get { return (String)(this["FilePath04"]); }
set { this["FilePath04"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath05
{
get { return (String)(this["FilePath05"]); }
set { this["FilePath05"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath06
{
get { return (String)(this["FilePath06"]); }
set { this["FilePath06"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath07
{
get { return (String)(this["FilePath07"]); }
set { this["FilePath07"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath08
{
get { return (String)(this["FilePath08"]); }
set { this["FilePath08"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath09
{
get { return (String)(this["FilePath09"]); }
set { this["FilePath09"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath10
{
get { return (String)(this["FilePath10"]); }
set { this["FilePath10"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath11
{
get { return (String)(this["FilePath11"]); }
set { this["FilePath11"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath12
{
get { return (String)(this["FilePath12"]); }
set { this["FilePath12"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath13
{
get { return (String)(this["FilePath13"]); }
set { this["FilePath13"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath14
{
get { return (String)(this["FilePath14"]); }
set { this["FilePath14"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath15
{
get { return (String)(this["FilePath15"]); }
set { this["FilePath15"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath16
{
get { return (String)(this["FilePath16"]); }
set { this["FilePath16"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath17
{
get { return (String)(this["FilePath17"]); }
set { this["FilePath17"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath18
{
get { return (String)(this["FilePath18"]); }
set { this["FilePath18"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath19
{
get { return (String)(this["FilePath19"]); }
set { this["FilePath19"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath20
{
get { return (String)(this["FilePath20"]); }
set { this["FilePath20"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("")]
public String FilePath21
{
get { return (String)(this["FilePath21"]); }
set { this["FilePath21"] = value; }
}
// Text to speech setting
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("-4")]
public int TTS_Speed
{
get { return (int)(this["TTS_Speed"]); }
set { this["TTS_Speed"] = value; }
}
// Search time limit for FrmColor
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("20")]
public int searchTimeLimit
{
get { return (int)(this["searchTimeLimit"]); }
set { this["searchTimeLimit"] = value; }
}
// Font for RTBMain
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("Times New Roman")]
public string RTBMainFontName
{
get { return (string)(this["RTBMainFontName"]); }
set { this["RTBMainFontName"] = value; }
}
// Font Size for RTBMain
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("22")]
public int RTBMainFontSize
{
get { return (int)(this["RTBMainFontSize"]); }
set { this["RTBMainFontSize"] = value; }
}
// Font for FrmQuiz's RTBQuestion and RTBAnswer
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("Times New Roman")]
public string FrmQuizFontName
{
get { return (string)(this["FrmQuizFontName"]); }
set { this["FrmQuizFontName"] = value; }
}
// Font Size for FrmQuiz's RTBQuestion and RTBAnswer
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("22")]
public int FrmQuizFontSize
{
get { return (int)(this["FrmQuizFontSize"]); }
set { this["FrmQuizFontSize"] = Convert.ToInt32(value); }
}
// For preserving Combo Box cmbLanguage setting in FrmOCR
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("English")]
public string cmbLanguageForFrmOCR
{
get { return (string)(this["cmbLanguageForFrmOCR"]); }
set { this["cmbLanguageForFrmOCR"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("true")]
public Boolean chkAddClear
{
get { return (Boolean)(this["chkAddClear"]); }
set { this["chkAddClear"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("true")]
public Boolean chkClearQuizTitle
{
get { return (Boolean)(this["chkClearQuizTitle"]); }
set { this["chkClearQuizTitle"] = value; }
}
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("true")]
public Boolean chkShuffle
{
get { return (Boolean)(this["chkShuffle"]); }
set { this["chkShuffle"] = value; }
}
// lastFolderPathToOCRImage
[UserScopedSettingAttribute()]
[DefaultSettingValueAttribute("English")]
public string lastFolderPathToOCRImage
{
get { return (string)(this["lastFolderPathToOCRImage"]); }
set { this["lastFolderPathToOCRImage"] = value; }
}
}
// //public static Font font = new Font("Times New Roman", 18, FontStyle.Regular);