-
Notifications
You must be signed in to change notification settings - Fork 531
/
Copy pathHelpRepaint.cs
2084 lines (1916 loc) · 59.4 KB
/
HelpRepaint.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
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace 天若OCR文字识别
{
// Token: 0x02000017 RID: 23
public class HelpRepaint
{
// Token: 0x02000018 RID: 24
public class ColorItemx
{
// Token: 0x060001C8 RID: 456 RVA: 0x00002D23 File Offset: 0x00000F23
public ColorItemx(string name, Color clr)
{
this.Name = name;
this.ItemColor = clr;
}
// Token: 0x1700001A RID: 26
// (get) Token: 0x060001C9 RID: 457 RVA: 0x0001B564 File Offset: 0x00019764
// (set) Token: 0x060001CA RID: 458 RVA: 0x00002D3D File Offset: 0x00000F3D
public Color ItemColor
{
get
{
return this.color;
}
set
{
this.color = value;
}
}
// Token: 0x1700001B RID: 27
// (get) Token: 0x060001CB RID: 459 RVA: 0x0001B57C File Offset: 0x0001977C
// (set) Token: 0x060001CC RID: 460 RVA: 0x00002D47 File Offset: 0x00000F47
public string Name
{
get
{
return this.name;
}
set
{
this.name = value;
}
}
// Token: 0x0400017F RID: 383
public string name;
// Token: 0x04000180 RID: 384
public Color color;
}
// Token: 0x02000019 RID: 25
public class HWColorPicker : HelpRepaint.FloatLayerBase
{
// Token: 0x1700001C RID: 28
// (get) Token: 0x060001CD RID: 461 RVA: 0x0001B594 File Offset: 0x00019794
public Color SelectedColor
{
get
{
return this.selectedColor;
}
}
// Token: 0x1700001D RID: 29
// (get) Token: 0x060001CE RID: 462 RVA: 0x0001B5AC File Offset: 0x000197AC
// (set) Token: 0x060001CF RID: 463 RVA: 0x00002D51 File Offset: 0x00000F51
[DefaultValue(true)]
[Description("是否显示颜色提示")]
public bool ShowTip
{
get
{
return this.showTip;
}
set
{
this.showTip = value;
}
}
// Token: 0x1700001E RID: 30
// (get) Token: 0x060001D0 RID: 464 RVA: 0x0001B5C4 File Offset: 0x000197C4
// (set) Token: 0x060001D1 RID: 465 RVA: 0x0001B5DC File Offset: 0x000197DC
[DefaultValue(typeof(Color), "255, 238, 194")]
[Description("高亮背景色")]
public Color HoverBKColor
{
get
{
return this.hoverBKColor;
}
set
{
bool flag = this.hoverBKColor != value;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
if (flag10)
{
bool flag11 = this.hoverBrush != null;
bool flag12 = flag11;
bool flag13 = flag12;
bool flag14 = flag13;
bool flag15 = flag14;
bool flag16 = flag15;
bool flag17 = flag16;
bool flag18 = flag17;
bool flag19 = flag18;
bool flag20 = flag19;
if (flag20)
{
this.hoverBrush.Dispose();
}
this.hoverBrush = new SolidBrush(value);
}
this.hoverBKColor = value;
}
}
// Token: 0x1700001F RID: 31
// (get) Token: 0x060001D2 RID: 466 RVA: 0x0001B670 File Offset: 0x00019870
public List<HelpRepaint.ColorItemx> ColorTable
{
get
{
return this.colorTable;
}
}
// Token: 0x060001D3 RID: 467 RVA: 0x0001B688 File Offset: 0x00019888
public HWColorPicker()
{
this.Font = new Font(this.Font.Name, 9f / StaticValue.Dpifactor, this.Font.Style, this.Font.Unit, this.Font.GdiCharSet, this.Font.GdiVerticalFont);
this.hoverItem = -1;
this.InitializeComponent();
this.InitColor();
this.CalcWindowSize();
this.sf = new StringFormat();
this.sf.Alignment = StringAlignment.Center;
this.sf.LineAlignment = StringAlignment.Center;
this.HoverBKColor = Color.FromArgb(255, 238, 194);
this.ShowTip = true;
}
// Token: 0x060001D4 RID: 468 RVA: 0x0001B750 File Offset: 0x00019950
public void CalcWindowSize()
{
int width = 152;
int height = 100;
base.Size = new Size(width, height);
}
// Token: 0x060001D5 RID: 469 RVA: 0x0001B778 File Offset: 0x00019978
public Rectangle CalcItemBound(int index)
{
bool flag = index < 0 || index > 40;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
if (flag10)
{
throw new ArgumentOutOfRangeException("index");
}
bool flag11 = index == 40;
bool flag12 = flag11;
bool flag13 = flag12;
bool flag14 = flag13;
bool flag15 = flag14;
bool flag16 = flag15;
bool flag17 = flag16;
bool flag18 = flag17;
bool flag19 = flag18;
bool flag20 = flag19;
Rectangle result;
if (flag20)
{
result = Rectangle.FromLTRB(0, 0, 0, 0);
}
else
{
result = new Rectangle(index % 8 * 18 + 3, index / 8 * 18 + 3, 18, 18);
}
return result;
}
// Token: 0x060001D6 RID: 470 RVA: 0x0001B824 File Offset: 0x00019A24
public int GetIndexFromPoint(Point point)
{
int result;
if (point.X <= 3 || point.X >= base.Width - 3 || point.Y <= 3 || point.Y >= base.Height - 3)
{
result = -1;
}
else
{
int num = (point.Y - 3) / 18;
if (num > 4)
{
result = 40;
}
else
{
int num2 = (point.X - 3) / 18;
result = num * 8 + num2;
}
}
return result;
}
// Token: 0x060001D7 RID: 471 RVA: 0x0001B8A0 File Offset: 0x00019AA0
public void SelectColor(Color clr)
{
this.selectedColor = clr;
bool flag = this.SelectedColorChanged != null;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
if (flag10)
{
this.SelectedColorChanged(this.ctl_T, EventArgs.Empty);
}
base.Hide();
}
// Token: 0x060001D8 RID: 472 RVA: 0x0001B900 File Offset: 0x00019B00
public void DrawItem(DrawItemEventArgs e)
{
Rectangle bounds = e.Bounds;
bounds.Inflate(-1, -1);
e.DrawBackground();
bool flag = (e.State & DrawItemState.HotLight) > DrawItemState.None;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
if (flag10)
{
e.Graphics.FillRectangle(this.hoverBrush, bounds);
e.Graphics.DrawRectangle(Pens.Black, bounds);
}
bool flag11 = e.Index == 40;
bool flag12 = !flag11;
bool flag13 = flag12;
bool flag14 = flag13;
bool flag15 = flag14;
bool flag16 = flag15;
bool flag17 = flag16;
bool flag18 = flag17;
bool flag19 = flag18;
bool flag20 = flag19;
if (flag20)
{
Rectangle bounds2 = e.Bounds;
bounds2.Inflate(-3, -3);
using (Brush brush = new SolidBrush(this.ColorTable[e.Index].ItemColor))
{
e.Graphics.FillRectangle(brush, bounds2);
}
e.Graphics.DrawRectangle(Pens.Gray, bounds2);
}
}
// Token: 0x060001D9 RID: 473 RVA: 0x0001BA2C File Offset: 0x00019C2C
public void HWColorPicker_Paint(object sender, PaintEventArgs e)
{
e.Graphics.DrawRectangle(Pens.LightGray, 0, 0, 150, 98);
for (int i = 0; i < 40; i++)
{
DrawItemEventArgs e2 = new DrawItemEventArgs(e.Graphics, this.Font, this.CalcItemBound(i), i, DrawItemState.Default, this.ForeColor, this.BackColor);
this.DrawItem(e2);
}
}
// Token: 0x060001DA RID: 474 RVA: 0x0001BA98 File Offset: 0x00019C98
public void HWColorPicker_MouseMove(object sender, MouseEventArgs e)
{
int indexFromPoint = this.GetIndexFromPoint(e.Location);
if (indexFromPoint != this.hoverItem)
{
Graphics graphics = base.CreateGraphics();
if (this.hoverItem != -1)
{
this.DrawItem(new DrawItemEventArgs(graphics, this.Font, this.CalcItemBound(this.hoverItem), this.hoverItem, DrawItemState.Default));
}
if (indexFromPoint <= 40)
{
if (indexFromPoint != -1)
{
if (this.ShowTip)
{
this.ShowToolTip(indexFromPoint);
}
this.DrawItem(new DrawItemEventArgs(graphics, this.Font, this.CalcItemBound(indexFromPoint), indexFromPoint, DrawItemState.Default | DrawItemState.HotLight));
}
graphics.Dispose();
this.hoverItem = indexFromPoint;
}
}
}
// Token: 0x060001DB RID: 475 RVA: 0x0001BB4C File Offset: 0x00019D4C
public void HWColorPicker_MouseClick(object sender, MouseEventArgs e)
{
int indexFromPoint = this.GetIndexFromPoint(e.Location);
if (indexFromPoint != -1 && indexFromPoint != 40)
{
this.SelectedColored = this.colorTable[indexFromPoint].ItemColor;
base.DialogResult = DialogResult.OK;
}
}
// Token: 0x060001DC RID: 476 RVA: 0x0001BB98 File Offset: 0x00019D98
public void ShowToolTip(int index)
{
bool flag = index == 40;
bool flag2 = !flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
if (flag10)
{
this.tip.SetToolTip(this, this.ColorTable[index].Name);
}
}
// Token: 0x060001DD RID: 477 RVA: 0x0001BBF0 File Offset: 0x00019DF0
public void InitColor()
{
this.colorTable = new List<HelpRepaint.ColorItemx>();
this.colorTable.AddRange(new HelpRepaint.ColorItemx[]
{
new HelpRepaint.ColorItemx("黑色", Color.FromArgb(0, 0, 0)),
new HelpRepaint.ColorItemx("褐色", Color.FromArgb(153, 51, 0)),
new HelpRepaint.ColorItemx("橄榄色", Color.FromArgb(51, 51, 0)),
new HelpRepaint.ColorItemx("深绿", Color.FromArgb(0, 51, 0)),
new HelpRepaint.ColorItemx("深青", Color.FromArgb(0, 51, 102)),
new HelpRepaint.ColorItemx("深蓝", Color.FromArgb(0, 0, 128)),
new HelpRepaint.ColorItemx("靛蓝", Color.FromArgb(51, 51, 153)),
new HelpRepaint.ColorItemx("灰色-80%", Color.FromArgb(51, 51, 51)),
new HelpRepaint.ColorItemx("深红", Color.FromArgb(128, 0, 0)),
new HelpRepaint.ColorItemx("橙色", Color.FromArgb(255, 102, 0)),
new HelpRepaint.ColorItemx("深黄", Color.FromArgb(128, 128, 0)),
new HelpRepaint.ColorItemx("绿色", Color.FromArgb(0, 128, 0)),
new HelpRepaint.ColorItemx("青色", Color.FromArgb(0, 128, 128)),
new HelpRepaint.ColorItemx("蓝色", Color.FromArgb(0, 0, 255)),
new HelpRepaint.ColorItemx("蓝灰", Color.FromArgb(102, 102, 153)),
new HelpRepaint.ColorItemx("灰色-50%", Color.FromArgb(128, 128, 128)),
new HelpRepaint.ColorItemx("红色", Color.FromArgb(255, 0, 0)),
new HelpRepaint.ColorItemx("浅橙", Color.FromArgb(255, 153, 0)),
new HelpRepaint.ColorItemx("酸橙", Color.FromArgb(153, 204, 0)),
new HelpRepaint.ColorItemx("海绿", Color.FromArgb(51, 153, 102)),
new HelpRepaint.ColorItemx("水绿", Color.FromArgb(51, 204, 204)),
new HelpRepaint.ColorItemx("浅蓝", Color.FromArgb(51, 102, 255)),
new HelpRepaint.ColorItemx("紫罗兰", Color.FromArgb(128, 0, 128)),
new HelpRepaint.ColorItemx("灰色-40%", Color.FromArgb(153, 153, 153)),
new HelpRepaint.ColorItemx("粉红", Color.FromArgb(255, 0, 255)),
new HelpRepaint.ColorItemx("金色", Color.FromArgb(255, 204, 0)),
new HelpRepaint.ColorItemx("黄色", Color.FromArgb(255, 255, 0)),
new HelpRepaint.ColorItemx("鲜绿", Color.FromArgb(0, 255, 0)),
new HelpRepaint.ColorItemx("青绿", Color.FromArgb(0, 255, 255)),
new HelpRepaint.ColorItemx("天蓝", Color.FromArgb(0, 204, 255)),
new HelpRepaint.ColorItemx("梅红", Color.FromArgb(153, 51, 102)),
new HelpRepaint.ColorItemx("灰色-25%", Color.FromArgb(192, 192, 192)),
new HelpRepaint.ColorItemx("玫瑰红", Color.FromArgb(255, 153, 204)),
new HelpRepaint.ColorItemx("茶色", Color.FromArgb(255, 204, 153)),
new HelpRepaint.ColorItemx("浅黄", Color.FromArgb(255, 255, 204)),
new HelpRepaint.ColorItemx("浅绿", Color.FromArgb(204, 255, 204)),
new HelpRepaint.ColorItemx("浅青绿", Color.FromArgb(204, 255, 255)),
new HelpRepaint.ColorItemx("淡蓝", Color.FromArgb(153, 204, 255)),
new HelpRepaint.ColorItemx("淡紫", Color.FromArgb(204, 153, 255)),
new HelpRepaint.ColorItemx("白色", Color.FromArgb(255, 255, 255))
});
}
// Token: 0x060001DE RID: 478 RVA: 0x0001C0A8 File Offset: 0x0001A2A8
protected override void Dispose(bool disposing)
{
bool flag = disposing && this.components != null;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
if (flag10)
{
this.components.Dispose();
}
base.Dispose(disposing);
}
// Token: 0x060001DF RID: 479 RVA: 0x0001C100 File Offset: 0x0001A300
public void InitializeComponent()
{
this.components = new Container();
this.tip = new ToolTip(this.components);
base.SuspendLayout();
this.BackColor = Color.White;
base.AutoScaleMode = AutoScaleMode.None;
base.Name = "HWColorPicker";
base.Paint += this.HWColorPicker_Paint;
base.MouseClick += this.HWColorPicker_MouseClick;
base.MouseMove += this.HWColorPicker_MouseMove;
base.ClientSize = new Size(114, 115);
base.SizeGripStyle = SizeGripStyle.Hide;
base.ResumeLayout(false);
}
// Token: 0x17000020 RID: 32
// (get) Token: 0x060001E0 RID: 480 RVA: 0x00002D5B File Offset: 0x00000F5B
// (set) Token: 0x060001E1 RID: 481 RVA: 0x00002D63 File Offset: 0x00000F63
public Color SelectedColored { get; private set; }
// Token: 0x04000182 RID: 386
[CompilerGenerated]
private EventHandler SelectedColorChanged;
// Token: 0x04000183 RID: 387
public bool showTip;
// Token: 0x04000184 RID: 388
public Color selectedColor;
// Token: 0x04000185 RID: 389
public Color hoverBKColor;
// Token: 0x04000186 RID: 390
public List<HelpRepaint.ColorItemx> colorTable;
// Token: 0x04000187 RID: 391
public StringFormat sf;
// Token: 0x04000188 RID: 392
public int hoverItem;
// Token: 0x04000189 RID: 393
public Control ctl;
// Token: 0x0400018A RID: 394
public Brush hoverBrush;
// Token: 0x0400018B RID: 395
public IContainer components;
// Token: 0x0400018C RID: 396
public ToolTip tip;
// Token: 0x0400018D RID: 397
public ToolStripButton ctl_T;
}
// Token: 0x0200001A RID: 26
public class MenuItemRenderer : ToolStripProfessionalRenderer
{
// Token: 0x060001E2 RID: 482 RVA: 0x0001C1AC File Offset: 0x0001A3AC
public MenuItemRenderer()
{
this.textFont = new Font("微软雅黑", 9f / StaticValue.Dpifactor, FontStyle.Regular, GraphicsUnit.Point, 0);
this.menuItemSelectedColor = Color.White;
this.menuItemBorderColor = Color.White;
this.menuItemSelectedColor = Color.White;
this.menuItemBorderColor = Color.LightSlateGray;
}
// Token: 0x060001E3 RID: 483 RVA: 0x0001C20C File Offset: 0x0001A40C
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e)
{
bool isOnDropDown = e.Item.IsOnDropDown;
bool flag = isOnDropDown;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
if (flag9)
{
bool flag10 = e.Item.Selected && e.Item.Enabled;
bool flag11 = flag10;
bool flag12 = flag11;
bool flag13 = flag12;
bool flag14 = flag13;
bool flag15 = flag14;
bool flag16 = flag15;
bool flag17 = flag16;
bool flag18 = flag17;
bool flag19 = flag18;
if (flag19)
{
this.DrawMenuDropDownItemHighlight(e);
}
}
else
{
base.OnRenderMenuItemBackground(e);
}
}
// Token: 0x060001E4 RID: 484 RVA: 0x0001C2A4 File Offset: 0x0001A4A4
public void DrawMenuDropDownItemHighlight(ToolStripItemRenderEventArgs e)
{
Rectangle rect = default(Rectangle);
rect = new Rectangle(2, 0, (int)e.Graphics.VisibleClipBounds.Width - 36, (int)e.Graphics.VisibleClipBounds.Height - 1);
using (Pen pen = new Pen(this.menuItemBorderColor))
{
e.Graphics.DrawRectangle(pen, rect);
}
}
// Token: 0x060001E5 RID: 485 RVA: 0x0001C32C File Offset: 0x0001A52C
protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e)
{
ToolStrip toolStrip = e.ToolStrip;
e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
bool flag = e.ToolStrip is MenuStrip || e.ToolStrip is ToolStripDropDown;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
if (flag10)
{
e.Graphics.DrawRectangle(new Pen(Color.LightSlateGray), new Rectangle(0, 0, e.AffectedBounds.Width - 1, e.AffectedBounds.Height - 1));
}
else
{
bool flag11 = toolStrip != null;
bool flag12 = flag11;
bool flag13 = flag12;
bool flag14 = flag13;
bool flag15 = flag14;
bool flag16 = flag15;
bool flag17 = flag16;
bool flag18 = flag17;
bool flag19 = flag18;
bool flag20 = flag19;
if (flag20)
{
e.Graphics.DrawRectangle(new Pen(Color.White), new Rectangle(0, 0, e.AffectedBounds.Width - 1, e.AffectedBounds.Height - 1));
}
base.OnRenderToolStripBorder(e);
}
}
// Token: 0x060001E6 RID: 486 RVA: 0x0001C44C File Offset: 0x0001A64C
protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e)
{
Graphics graphics = e.Graphics;
graphics.SmoothingMode = SmoothingMode.HighQuality;
ToolStripItem item = e.Item;
bool selected = item.Selected;
bool flag = selected;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
if (flag9)
{
Pen pen = new Pen(Color.LightSlateGray);
Point[] points = new Point[]
{
new Point(0, 0),
new Point(item.Size.Width - 1, 0),
new Point(item.Size.Width - 1, item.Size.Height - 3),
new Point(0, item.Size.Height - 3),
new Point(0, 0)
};
graphics.DrawLines(pen, points);
}
else
{
base.OnRenderMenuItemBackground(e);
}
}
// Token: 0x060001E7 RID: 487 RVA: 0x0001C554 File Offset: 0x0001A754
protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e)
{
Graphics graphics = e.Graphics;
bool flag = e.ToolStrip is ToolStripDropDown;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
if (flag10)
{
LinearGradientBrush brush = new LinearGradientBrush(new Point(0, 0), new Point(e.Item.Width, 0), Color.LightGray, Color.FromArgb(0, Color.LightGray));
graphics.FillRectangle(brush, new Rectangle(33, e.Item.Height / 2, e.Item.Width / 4 * 3, 1));
}
}
// Token: 0x060001E8 RID: 488 RVA: 0x0001C5FC File Offset: 0x0001A7FC
protected override void OnRenderDropDownButtonBackground(ToolStripItemRenderEventArgs e)
{
ToolStripItem item = e.Item;
Graphics graphics = e.Graphics;
graphics.SmoothingMode = SmoothingMode.HighQuality;
ToolStripItem item2 = e.Item;
bool selected = item.Selected;
bool flag = selected;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
if (flag9)
{
Pen pen = new Pen(Color.LightSlateGray);
Point[] points = new Point[]
{
new Point(0, 0),
new Point(item.Size.Width - 1, 0),
new Point(item.Size.Width - 1, item.Size.Height - 3),
new Point(0, item.Size.Height - 3),
new Point(0, 0)
};
graphics.DrawLines(pen, points);
}
else
{
base.OnRenderMenuItemBackground(e);
}
}
// Token: 0x0400018E RID: 398
public Font textFont;
// Token: 0x0400018F RID: 399
public Color menuItemSelectedColor;
// Token: 0x04000190 RID: 400
public Color menuItemBorderColor;
}
// Token: 0x0200001B RID: 27
public class MenuItemRendererT : ToolStripProfessionalRenderer
{
// Token: 0x060001E9 RID: 489 RVA: 0x0001C70C File Offset: 0x0001A90C
public MenuItemRendererT()
{
this.textFont = new Font("微软雅黑", 9f / StaticValue.Dpifactor, FontStyle.Regular, GraphicsUnit.Point, 0);
this.menuItemSelectedColor = Color.White;
this.menuItemBorderColor = Color.White;
this.menuItemSelectedColor = Color.White;
this.menuItemBorderColor = Color.LightSlateGray;
}
// Token: 0x060001EA RID: 490 RVA: 0x0001C76C File Offset: 0x0001A96C
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e)
{
bool isOnDropDown = e.Item.IsOnDropDown;
bool flag = isOnDropDown;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
if (flag9)
{
bool flag10 = e.Item.Selected && e.Item.Enabled;
bool flag11 = flag10;
bool flag12 = flag11;
bool flag13 = flag12;
bool flag14 = flag13;
bool flag15 = flag14;
bool flag16 = flag15;
bool flag17 = flag16;
bool flag18 = flag17;
bool flag19 = flag18;
if (flag19)
{
this.DrawMenuDropDownItemHighlight(e);
}
}
else
{
base.OnRenderMenuItemBackground(e);
}
}
// Token: 0x060001EB RID: 491 RVA: 0x0001C804 File Offset: 0x0001AA04
public void DrawMenuDropDownItemHighlight(ToolStripItemRenderEventArgs e)
{
Rectangle rect = default(Rectangle);
rect = new Rectangle(2, 0, (int)e.Graphics.VisibleClipBounds.Width - 4, (int)e.Graphics.VisibleClipBounds.Height - 1);
using (Pen pen = new Pen(this.menuItemBorderColor))
{
e.Graphics.DrawRectangle(pen, rect);
}
}
// Token: 0x04000191 RID: 401
public Font textFont;
// Token: 0x04000192 RID: 402
public Color menuItemSelectedColor;
// Token: 0x04000193 RID: 403
public Color menuItemBorderColor;
}
// Token: 0x0200001C RID: 28
public class myWebBroswer : WebBrowser
{
// Token: 0x060001EC RID: 492 RVA: 0x0001C888 File Offset: 0x0001AA88
public override bool PreProcessMessage(ref Message msg)
{
bool flag = msg.Msg == 256 && (int)msg.WParam == 86 && Control.ModifierKeys == Keys.Control;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
if (flag10)
{
Clipboard.SetDataObject((string)Clipboard.GetDataObject().GetData(DataFormats.UnicodeText));
HelpWin32.keybd_event(Keys.ControlKey, 0, 0u, 0u);
HelpWin32.keybd_event(Keys.D9, 0, 0u, 0u);
HelpWin32.keybd_event(Keys.D9, 0, 2u, 0u);
HelpWin32.keybd_event(Keys.ControlKey, 0, 2u, 0u);
}
bool flag11 = msg.Msg == 256 && (int)msg.WParam == 67 && Control.ModifierKeys == Keys.Control;
bool flag12 = flag11;
bool flag13 = flag12;
bool flag14 = flag13;
bool flag15 = flag14;
bool flag16 = flag15;
bool flag17 = flag16;
bool flag18 = flag17;
bool flag19 = flag18;
bool flag20 = flag19;
if (flag20)
{
HelpWin32.keybd_event(Keys.ControlKey, 0, 0u, 0u);
HelpWin32.keybd_event(Keys.D8, 0, 0u, 0u);
HelpWin32.keybd_event(Keys.D8, 0, 2u, 0u);
HelpWin32.keybd_event(Keys.ControlKey, 0, 2u, 0u);
}
return base.PreProcessMessage(ref msg);
}
}
// Token: 0x0200001D RID: 29
[Description("ToolStripItem that allows selecting a color from a color picker control.")]
[DefaultEvent("SelectedColorChanged")]
[ToolboxBitmap(typeof(HelpRepaint.ToolStripColorPicker), "ToolStripColorPicker")]
[DefaultProperty("Color")]
[ToolboxItem(false)]
public class ToolStripColorPicker : ToolStripButton
{
// Token: 0x060001EE RID: 494 RVA: 0x0001C9BC File Offset: 0x0001ABBC
public Point GetOpenPoint()
{
bool flag = base.Owner == null;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
Point result;
if (flag10)
{
result = new Point(5, 5);
}
else
{
int num = 0;
foreach (object obj in base.Parent.Items)
{
ToolStripItem toolStripItem = (ToolStripItem)obj;
bool flag11 = toolStripItem == this;
bool flag12 = flag11;
bool flag13 = flag12;
bool flag14 = flag13;
bool flag15 = flag14;
bool flag16 = flag15;
bool flag17 = flag16;
bool flag18 = flag17;
bool flag19 = flag18;
bool flag20 = flag19;
if (flag20)
{
break;
}
num += toolStripItem.Width;
}
result = new Point(num, -4);
}
return result;
}
// Token: 0x17000021 RID: 33
// (get) Token: 0x060001EF RID: 495 RVA: 0x0001CAB8 File Offset: 0x0001ACB8
// (set) Token: 0x060001F0 RID: 496 RVA: 0x0000237B File Offset: 0x0000057B
public Point GetPoint
{
get
{
return this.GetOpenPoint();
}
set
{
}
}
}
// Token: 0x0200001E RID: 30
public class ToolStripEx : ToolStrip
{
// Token: 0x060001F2 RID: 498 RVA: 0x00002D7E File Offset: 0x00000F7E
protected override void WndProc(ref Message m)
{
if (m.Msg == 33 && base.CanFocus && !this.Focused)
{
base.Focus();
}
base.WndProc(ref m);
}
}
// Token: 0x0200001F RID: 31
public class FloatLayerBase : Form
{
// Token: 0x17000022 RID: 34
// (get) Token: 0x060001F4 RID: 500 RVA: 0x0001CAD0 File Offset: 0x0001ACD0
// (set) Token: 0x060001F5 RID: 501 RVA: 0x0001CAE8 File Offset: 0x0001ACE8
[DefaultValue(BorderStyle.Fixed3D)]
[Description("获取或设置边框类型。")]
public BorderStyle BorderType
{
get
{
return this._borderType;
}
set
{
bool flag = this._borderType != value;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
if (flag10)
{
this._borderType = value;
base.Invalidate();
}
}
}
// Token: 0x17000023 RID: 35
// (get) Token: 0x060001F6 RID: 502 RVA: 0x0001CB34 File Offset: 0x0001AD34
// (set) Token: 0x060001F7 RID: 503 RVA: 0x0001CB4C File Offset: 0x0001AD4C
[DefaultValue(Border3DStyle.RaisedInner)]
[Description("获取或设置三维边框样式。")]
public Border3DStyle Border3DStyle
{
get
{
return this._border3DStyle;
}
set
{
bool flag = this._border3DStyle != value;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
if (flag10)
{
this._border3DStyle = value;
base.Invalidate();
}
}
}
// Token: 0x17000024 RID: 36
// (get) Token: 0x060001F8 RID: 504 RVA: 0x0001CB98 File Offset: 0x0001AD98
// (set) Token: 0x060001F9 RID: 505 RVA: 0x0001CBB0 File Offset: 0x0001ADB0
[DefaultValue(ButtonBorderStyle.Solid)]
[Description("获取或设置线型边框样式。")]
public ButtonBorderStyle BorderSingleStyle
{
get
{
return this._borderSingleStyle;
}
set
{
bool flag = this._borderSingleStyle != value;
bool flag2 = flag;
bool flag3 = flag2;
bool flag4 = flag3;
bool flag5 = flag4;
bool flag6 = flag5;
bool flag7 = flag6;
bool flag8 = flag7;
bool flag9 = flag8;
bool flag10 = flag9;
if (flag10)
{
this._borderSingleStyle = value;
base.Invalidate();
}
}
}
// Token: 0x17000025 RID: 37
// (get) Token: 0x060001FA RID: 506 RVA: 0x0001CBFC File Offset: 0x0001ADFC
// (set) Token: 0x060001FB RID: 507 RVA: 0x0001CC14 File Offset: 0x0001AE14
[DefaultValue(typeof(Color), "DarkGray")]
[Description("获取或设置边框颜色(仅当边框类型为线型时有效)。")]
public Color BorderColor
{
get
{
return this._borderColor;
}
set
{