-
Notifications
You must be signed in to change notification settings - Fork 532
/
AdvRichTextBox.Designer.cs
1529 lines (1409 loc) · 56.7 KB
/
AdvRichTextBox.Designer.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.Diagnostics;
using System.Drawing;
using System.IO;
using System.Net;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace 天若OCR文字识别
{
// Token: 0x02000002 RID: 2
[Description("Provides a user control that allows the user to edit HTML page.")]
[ClassInterface(ClassInterfaceType.AutoDispatch)]
public class AdvRichTextBox : UserControl
{
// Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
protected override void Dispose(bool disposing)
{
if (disposing && this.components != null)
{
this.components.Dispose();
}
base.Dispose(disposing);
}
// Token: 0x06000002 RID: 2 RVA: 0x00003078 File Offset: 0x00001278
public void InitializeComponent()
{
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(AdvRichTextBox));
this.font_宋体 = new ToolStripMenuItem();
this.font_楷体 = new ToolStripMenuItem();
this.font_黑体 = new ToolStripMenuItem();
this.font_微软雅黑 = new ToolStripMenuItem();
this.font_新罗马 = new ToolStripMenuItem();
this.zh_jp = new ToolStripMenuItem();
this.zh_ko = new ToolStripMenuItem();
this.zh_en = new ToolStripMenuItem();
this.mode_顶置 = new ToolStripMenuItem();
this.mode_正常 = new ToolStripMenuItem();
this.mode_合并 = new ToolStripMenuItem();
this.topmost = new ToolStripButton();
this.languagle = new ToolStripDropDownButton();
this.mode = new ToolStripDropDownButton();
this.Fontstyle = new ToolStripDropDownButton();
this.toolStripToolBar = new HelpRepaint.ToolStripEx();
this.toolStripButtonclose = new ToolStripButton();
this.toolStripButtonBold = new ToolStripButton();
this.toolStripButtonParagraph = new ToolStripButton();
this.toolStripButtonFind = new ToolStripButton();
this.toolStripButtonColor = new HelpRepaint.ColorPicker();
this.toolStripSeparatorFont = new ToolStripSeparator();
this.toolStripButtonFence = new ToolStripButton();
this.toolStripButtonSplit = new ToolStripButton();
this.toolStripButtoncheck = new ToolStripButton();
this.toolStripButtonIndent = new ToolStripButton();
this.toolStripSeparatorFormat = new ToolStripSeparator();
this.toolStripButtonLeft = new ToolStripButton();
this.toolStripButtonMerge = new ToolStripButton();
this.toolStripButtonVoice = new ToolStripButton();
this.toolStripButtonFull = new ToolStripButton();
this.toolStripSeparatorAlign = new ToolStripSeparator();
this.toolStripButtonspace = new ToolStripButton();
this.toolStripButtonR_arow = new ToolStripButton();
this.toolStripButtonSend = new ToolStripButton();
this.toolStripButtonTrans = new ToolStripButton();
this.toolStripButtonNote = new ToolStripButton();
this.richTextBox1 = new RichTextBoxEx();
this.toolStripToolBar.SuspendLayout();
base.SuspendLayout();
this.toolStripSeparatorFont.ForeColor = Color.White;
this.toolStripToolBar.GripStyle = ToolStripGripStyle.Hidden;
this.toolStripToolBar.Location = new Point(0, 0);
this.toolStripToolBar.Name = "toolStripToolBar";
this.toolStripToolBar.RenderMode = ToolStripRenderMode.System;
this.toolStripToolBar.Size = new Size(600, 25);
this.toolStripToolBar.TabIndex = 1;
this.toolStripToolBar.Click += this.toolStripToolBar_Click;
this.toolStripToolBar.Text = "Tool Bar";
this.toolStripToolBar.BackColor = Color.White;
this.toolStripToolBar.Renderer = new HelpRepaint.MenuItemRenderer();
this.toolStripButtonBold.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonBold.Image = (Image)componentResourceManager.GetObject("toolStripButtonBold.Image");
this.toolStripButtonBold.ImageTransparentColor = Color.Magenta;
this.toolStripButtonBold.Name = "toolStripButtonBold";
this.toolStripButtonBold.Size = new Size(23, 22);
this.toolStripButtonBold.Text = "加粗";
this.toolStripButtonBold.Click += this.toolStripButtonBold_Click;
this.toolStripButtonParagraph.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonParagraph.Image = (Image)componentResourceManager.GetObject("toolStripButtonParagraph.Image");
this.toolStripButtonParagraph.ImageTransparentColor = Color.Magenta;
this.toolStripButtonParagraph.Name = "toolStripButtonParagraph";
this.toolStripButtonParagraph.Size = new Size(23, 22);
this.toolStripButtonParagraph.Text = "依据位置自动分段\r\n仅支持搜狗接口\r\n适合段落识别\r\n图片越清晰越准确\r\n准确度98%以上";
this.toolStripButtonParagraph.Click += this.toolStripButtonParagraph_Click;
this.toolStripButtonParagraph.MouseDown += this.toolStripButtonParagraph_keydown;
this.toolStripButtonFind.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonFind.Image = (Image)componentResourceManager.GetObject("toolStripButtonFind.Image");
this.toolStripButtonFind.ImageTransparentColor = Color.Magenta;
this.toolStripButtonFind.Name = "toolStripButtonFind";
this.toolStripButtonFind.Size = new Size(23, 22);
this.toolStripButtonFind.Text = "查找\\替换";
this.toolStripButtonFind.Click += this.toolStripButtonFind_Click;
this.toolStripButtonColor.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonColor.Image = (Image)componentResourceManager.GetObject("toolStripButtonColor.Image");
this.toolStripButtonColor.ImageTransparentColor = Color.Magenta;
this.toolStripButtonColor.Name = "toolStripButtonColor";
this.toolStripButtonColor.Size = new Size(23, 22);
this.toolStripButtonColor.Text = "字体颜色";
this.toolStripButtonColor.Click += this.toolStripButtonColor_Click;
this.toolStripButtonLeft.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonLeft.Image = (Image)componentResourceManager.GetObject("toolStripButtonLeft.Image");
this.toolStripButtonLeft.ImageTransparentColor = Color.Magenta;
this.toolStripButtonLeft.Name = "toolStripButtonLeft";
this.toolStripButtonLeft.Size = new Size(23, 22);
this.toolStripButtonLeft.Text = "左对齐";
this.toolStripButtonLeft.Click += this.toolStripButtonLeft_Click;
this.toolStripButtonMerge.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonMerge.Image = (Image)componentResourceManager.GetObject("toolStripButtonMerge.Image");
this.toolStripButtonMerge.ImageTransparentColor = Color.Magenta;
this.toolStripButtonMerge.Name = "toolStripButtonMerge";
this.toolStripButtonMerge.Size = new Size(23, 22);
this.toolStripButtonMerge.Text = "将文本合并成一段";
this.toolStripButtonMerge.Click += this.toolStripButtonMerge_Click;
this.toolStripButtonMerge.MouseDown += this.toolStripButtonMerge_keydown;
this.toolStripButtonVoice.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonVoice.Image = (Image)componentResourceManager.GetObject("toolStripButtonVoice.Image");
this.toolStripButtonVoice.ImageTransparentColor = Color.Magenta;
this.toolStripButtonVoice.Name = "toolStripButtonVoice";
this.toolStripButtonVoice.Size = new Size(23, 22);
this.toolStripButtonVoice.Text = "朗读";
this.toolStripButtonVoice.Click += this.toolStripButtonVoice_Click;
this.toolStripButtonFull.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonFull.Image = (Image)componentResourceManager.GetObject("toolStripButtonFull.Image");
this.toolStripButtonFull.ImageTransparentColor = Color.Magenta;
this.toolStripButtonFull.Name = "toolStripButtonFull";
this.toolStripButtonFull.Size = new Size(23, 22);
this.toolStripButtonFull.Text = "两端对齐";
this.toolStripButtonFull.Click += this.toolStripButtonFull_Click;
this.toolStripButtonspace.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonspace.Image = (Image)componentResourceManager.GetObject("toolStripButtonspace.Image");
this.toolStripButtonspace.ImageTransparentColor = Color.Magenta;
this.toolStripButtonspace.Name = "toolStripButtonLine";
this.toolStripButtonspace.Size = new Size(23, 22);
this.toolStripButtonspace.Text = "首行缩进";
this.toolStripButtonspace.Click += this.toolStripButtonspace_Click;
this.toolStripButtonFence.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonFence.Image = (Image)componentResourceManager.GetObject("toolStripButtonFence.Image");
this.toolStripButtonFence.ImageTransparentColor = Color.Magenta;
this.toolStripButtonFence.Name = "toolStripButtonformat";
this.toolStripButtonFence.Size = new Size(23, 22);
this.toolStripButtonFence.Text = "截图时自动分栏\r\n多选区时无效\r\n单击显示分栏示意图";
this.toolStripButtonFence.Click += this.toolStripButtonFence_Click;
this.toolStripButtonFence.MouseDown += this.toolStripButtonFence_keydown;
this.toolStripButtonSend.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonSend.Image = (Image)componentResourceManager.GetObject("toolStripButtonSend.Image");
this.toolStripButtonSend.ImageTransparentColor = Color.Magenta;
this.toolStripButtonSend.Name = "toolStripButtonSend";
this.toolStripButtonSend.Size = new Size(23, 22);
this.toolStripButtonSend.Text = "复制/发送";
this.toolStripButtonSend.Click += this.toolStripButtonSend_Click;
this.toolStripButtonSplit.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonSplit.Image = (Image)componentResourceManager.GetObject("toolStripButtonSplit.Image");
this.toolStripButtonSplit.ImageTransparentColor = Color.Magenta;
this.toolStripButtonSplit.Name = "toolStripButtonSplit";
this.toolStripButtonSplit.Size = new Size(23, 22);
this.toolStripButtonSplit.Text = "按图片中的行进行拆分";
this.toolStripButtonSplit.Click += this.toolStripButtonSplit_Click;
this.toolStripButtonSplit.MouseDown += this.toolStripButtonSplit_keydown;
this.toolStripButtoncheck.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtoncheck.Image = (Image)componentResourceManager.GetObject("toolStripButtoncheck.Image");
this.toolStripButtoncheck.ImageTransparentColor = Color.Magenta;
this.toolStripButtoncheck.Name = "toolStripButtoncheck";
this.toolStripButtoncheck.Size = new Size(23, 22);
this.toolStripButtoncheck.Text = "检查文本是否有错别字";
this.toolStripButtoncheck.Click += this.toolStripButtoncheck_Click;
this.toolStripButtoncheck.MouseDown += this.toolStripButtoncheck_keydown;
this.toolStripButtonTrans.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonTrans.Image = (Image)componentResourceManager.GetObject("toolStripButtonTrans.Image");
this.toolStripButtonTrans.ImageTransparentColor = Color.Magenta;
this.toolStripButtonTrans.Name = "toolStripButtonTrans";
this.toolStripButtonTrans.Size = new Size(23, 22);
this.toolStripButtonTrans.Text = "翻译";
this.toolStripButtonTrans.Click += this.toolStripButtonTrans_Click;
this.toolStripButtonTrans.MouseDown += this.toolStripButtontrans_keydown;
this.toolStripButtonNote.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonNote.Image = (Image)componentResourceManager.GetObject("toolStripButtonNote.Image");
this.toolStripButtonNote.ImageTransparentColor = Color.Magenta;
this.toolStripButtonNote.Name = "toolStripButtonTrans";
this.toolStripButtonNote.Size = new Size(23, 22);
this.toolStripButtonNote.Text = "记录窗体";
this.toolStripButtonNote.Click += this.toolStripButtonNote_Click;
this.toolStripButtonclose.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStripButtonclose.Image = (Image)componentResourceManager.GetObject("toolStripButtonclose.Image");
this.toolStripButtonclose.ImageTransparentColor = Color.Magenta;
this.toolStripButtonclose.Name = "toolStripButtonclose";
this.toolStripButtonclose.Size = new Size(23, 22);
this.toolStripButtonclose.Text = "关闭";
this.toolStripButtonclose.Click += this.toolStripButtonclose_Click;
this.languagle.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.languagle.Image = (Image)componentResourceManager.GetObject("languagle.Image");
this.languagle.ImageTransparentColor = Color.Magenta;
this.languagle.Name = "toolStripButtonclose";
this.languagle.Size = new Size(23, 22);
this.languagle.Text = "选择翻译语言\r\n支持自动检测\r\n可以双向翻译";
this.zh_en.Text = "中⇆英";
this.zh_en.ForeColor = Color.Red;
this.zh_en.Click += this.zh_en_Click;
this.zh_jp.Text = "中⇆日";
this.zh_jp.ForeColor = Color.Black;
this.zh_jp.Click += this.zh_jp_Click;
this.zh_ko.Text = "中⇆韩";
this.zh_ko.ForeColor = Color.Black;
this.zh_ko.Click += this.zh_ko_Click;
this.languagle.DropDownItems.Add(this.zh_en);
this.languagle.DropDownItems.Add(this.zh_jp);
this.languagle.DropDownItems.Add(this.zh_ko);
this.languagle.AutoSize = false;
((ToolStripDropDownMenu)this.languagle.DropDown).ShowImageMargin = false;
this.languagle.DropDown.BackColor = Color.White;
this.languagle.DropDown.AutoSize = false;
if (Program.factor == 1f)
{
this.languagle.DropDown.AutoSize = false;
}
else
{
this.languagle.DropDown.AutoSize = true;
}
this.languagle.DropDown.Width = Convert.ToInt32(55f);
this.languagle.DropDown.Height = Convert.ToInt32(70f);
this.languagle.ShowDropDownArrow = false;
this.topmost.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.topmost.Image = (Image)componentResourceManager.GetObject("mode.Image");
this.topmost.ImageTransparentColor = Color.Magenta;
this.topmost.Name = "toolStripButtonclose";
this.topmost.Size = new Size(23, 22);
this.topmost.Text = "顶置";
this.topmost.MouseDown += this.topmost_keydown;
this.Fontstyle.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.Fontstyle.Image = (Image)componentResourceManager.GetObject("Fontstyle.Image");
this.Fontstyle.ImageTransparentColor = Color.Magenta;
this.Fontstyle.Name = "toolStripButtonclose";
this.Fontstyle.Size = new Size(23, 22);
this.Fontstyle.Text = "字体";
this.Fontstyle.AutoSize = false;
((ToolStripDropDownMenu)this.Fontstyle.DropDown).ShowImageMargin = false;
this.Fontstyle.DropDown.BackColor = Color.White;
this.Fontstyle.DropDown.AutoSize = false;
if (Program.factor == 1f)
{
this.Fontstyle.DropDown.AutoSize = false;
}
else
{
this.Fontstyle.DropDown.AutoSize = true;
}
this.Fontstyle.DropDown.Width = Convert.ToInt32(123f);
this.Fontstyle.DropDown.Height = Convert.ToInt32(115f);
this.Fontstyle.ShowDropDownArrow = false;
this.font_宋体.Text = "宋体";
this.font_宋体.ForeColor = Color.Black;
this.font_宋体.Click += this.font_宋体c;
this.font_黑体.Text = "黑体";
this.font_黑体.ForeColor = Color.Black;
this.font_黑体.Click += this.font_黑体c;
this.font_楷体.Text = "楷体";
this.font_楷体.ForeColor = Color.Black;
this.font_楷体.Click += this.font_楷体c;
this.font_微软雅黑.Text = "微软雅黑";
this.font_微软雅黑.ForeColor = Color.Black;
this.font_微软雅黑.Click += this.font_微软雅黑c;
this.font_新罗马.Text = "Time New Roman";
this.font_新罗马.ForeColor = Color.Red;
this.font_新罗马.Click += this.font_新罗马c;
this.Fontstyle.DropDownItems.Add(this.font_宋体);
this.Fontstyle.DropDownItems.Add(this.font_黑体);
this.Fontstyle.DropDownItems.Add(this.font_楷体);
this.Fontstyle.DropDownItems.Add(this.font_微软雅黑);
this.Fontstyle.DropDownItems.Add(this.font_新罗马);
this.richTextBox1.Location = new Point(32, 13);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new Size(603, 457);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.DetectUrls = true;
this.richTextBox1.HideSelection = false;
this.richTextBox1.Text = "";
this.richTextBox1.BorderStyle = BorderStyle.None;
this.richTextBox1.Dock = DockStyle.Fill;
this.richTextBox1.Multiline = true;
this.richTextBox1.ScrollBars = RichTextBoxScrollBars.Vertical;
this.richTextBox1.KeyDown += this.richTextBox1_KeyDown;
this.richTextBox1.LinkClicked += this.richTextBox1_LinkClicked;
this.richTextBox1.MouseDown += this.richtextbox1_MouseDown;
this.richTextBox1.AllowDrop = true;
this.richTextBox1.MouseEnter += this.Form1_MouseEnter;
this.richTextBox1.DragEnter += this.Form1_DragEnter;
this.richTextBox1.DragDrop += this.Form1_DragDrop;
this.richTextBox1.SelectionAlignment = HelpRepaint.TextAlign.Justify;
this.richTextBox1.SetLine = "行高";
this.richTextBox1.Font = new Font("Times New Roman", 16f * Program.factor, GraphicsUnit.Pixel);
this.richTextBox1.LanguageOption = RichTextBoxLanguageOptions.UIFonts;
this.richTextBox1.TextChanged += this.richeditbox_TextChanged;
this.richTextBox1.Cursor = Cursors.IBeam;
this.indent_two(1);
this.mode.Font = new Font("微软雅黑", 9f * Program.factor, FontStyle.Regular);
this.languagle.Font = new Font("微软雅黑", 9f * Program.factor, FontStyle.Regular);
this.Fontstyle.Font = new Font("微软雅黑", 9f * Program.factor, FontStyle.Regular);
base.AutoScaleMode = AutoScaleMode.None;
base.Controls.Add(this.richTextBox1);
base.Controls.Add(this.toolStripToolBar);
base.Name = "richTextBox";
base.Text = "richTextBox";
base.Size = new Size(600, 300);
this.toolStripToolBar.ResumeLayout(false);
this.toolStripToolBar.PerformLayout();
base.ResumeLayout(false);
base.PerformLayout();
}
// Token: 0x06000003 RID: 3 RVA: 0x0000436C File Offset: 0x0000256C
public AdvRichTextBox()
{
this.toolspace = true;
this.toolFull = true;
this.c = new AdvRichTextBox.cmd(50);
this.Font = new Font(this.Font.Name, 9f / StaticValue.Dpifactor, this.Font.Style, this.Font.Unit, this.Font.GdiCharSet, this.Font.GdiVerticalFont);
this.InitializeComponent();
this.readIniFile();
this.richTextBox1.LanguageOption = RichTextBoxLanguageOptions.UIFonts;
}
// Token: 0x17000001 RID: 1
// (get) Token: 0x06000004 RID: 4 RVA: 0x0000206F File Offset: 0x0000026F
// (set) Token: 0x06000005 RID: 5 RVA: 0x00004400 File Offset: 0x00002600
public override string Text
{
get
{
return this.richTextBox1.Text;
}
set
{
this.richTextBox1.Font = new Font("Times New Roman", 16f * Program.factor, GraphicsUnit.Pixel);
this.richTextBox1.Text = value;
this.richTextBox1.Font = new Font("Times New Roman", 16f * Program.factor, GraphicsUnit.Pixel);
}
}
// Token: 0x06000006 RID: 6 RVA: 0x0000445C File Offset: 0x0000265C
public void toolStripButtonBold_Click(object sender, EventArgs e)
{
Font selectionFont = this.richTextBox1.SelectionFont;
if (selectionFont.Bold)
{
Font selectionFont2 = new Font(selectionFont, selectionFont.Style & ~FontStyle.Bold);
this.richTextBox1.SelectionFont = selectionFont2;
}
else
{
Font selectionFont3 = new Font(selectionFont, selectionFont.Style | FontStyle.Bold);
this.richTextBox1.SelectionFont = selectionFont3;
}
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
// Token: 0x06000007 RID: 7 RVA: 0x0000207C File Offset: 0x0000027C
public void toolStripButtonParagraph_Click(object sender, EventArgs e)
{
}
// Token: 0x06000008 RID: 8 RVA: 0x000044C4 File Offset: 0x000026C4
public void toolStripButtonFind_Click(object sender, EventArgs e)
{
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
ReplaceForm replaceForm = new ReplaceForm(this);
if (this.txt_flag == "天若幽心")
{
replaceForm.Text = "识别替换";
replaceForm.Location = base.PointToScreen(new Point((base.Width - replaceForm.Width) / 2, (base.Height - replaceForm.Height) / 2));
}
else
{
replaceForm.Text = "翻译替换";
replaceForm.Location = base.PointToScreen(new Point((base.Width - replaceForm.Width) / 2, (base.Height - replaceForm.Height) / 2));
}
replaceForm.Show(this);
}
// Token: 0x06000009 RID: 9 RVA: 0x0000207E File Offset: 0x0000027E
public void toolStripButtonColor_Click(object sender, EventArgs e)
{
this.richTextBox1.SelectionColor = this.toolStripButtonColor.SelectedColor;
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
// Token: 0x0600000A RID: 10 RVA: 0x00004574 File Offset: 0x00002774
public void toolStripButtonFence_Click(object sender, EventArgs e)
{
if (!File.Exists("cvextern.dll"))
{
MessageBox.Show("请从蓝奏网盘中下载cvextern.dll大小约25m,点击确定自动弹出网页。\r\n将下载后的文件与 天若OCR文字识别.exe 这个文件放在一起。");
Process.Start("https://www.lanzous.com/i1ab3vg");
return;
}
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
if (File.Exists("Data\\分栏预览图.jpg"))
{
Process process = new Process();
process.StartInfo.FileName = "Data\\分栏预览图.jpg";
process.StartInfo.Arguments = "rundl132.exe C://WINDOWS//system32//shimgvw.dll,ImageView";
process.Start();
process.Close();
}
}
// Token: 0x0600000B RID: 11 RVA: 0x000020A1 File Offset: 0x000002A1
public void toolStripButtonSplit_Click(object sender, EventArgs e)
{
this.richTextBox1.Text = StaticValue.v_Split;
Application.DoEvents();
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
// Token: 0x0600000C RID: 12 RVA: 0x000020C3 File Offset: 0x000002C3
public void toolStripButtoncheck_Click(object sender, EventArgs e)
{
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
new Thread(new ThreadStart(this.错别字检查API)).Start();
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
// Token: 0x0600000D RID: 13 RVA: 0x000020F1 File Offset: 0x000002F1
public void toolStripButtonIndent_Click(object sender, EventArgs e)
{
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
// Token: 0x0600000E RID: 14 RVA: 0x000020FE File Offset: 0x000002FE
public void toolStripButtonLeft_Click(object sender, EventArgs e)
{
this.richTextBox1.SelectAll();
this.richTextBox1.SelectionAlignment = HelpRepaint.TextAlign.Left;
this.richTextBox1.Select(0, 0);
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
// Token: 0x0600000F RID: 15 RVA: 0x000045EC File Offset: 0x000027EC
public void toolStripButtonMerge_Click(object sender, EventArgs e)
{
string text = this.richTextBox1.Text.TrimEnd(new char[]
{
'\n'
}).TrimEnd(new char[]
{
'\r'
}).TrimEnd(new char[]
{
'\n'
});
if (text.Split(Environment.NewLine.ToCharArray()).Length > 1)
{
string[] array = text.Split(Environment.NewLine.ToCharArray());
string text2 = "";
for (int i = 0; i < array.Length - 1; i++)
{
string str = array[i].Substring(array[i].Length - 1, 1);
string str2 = array[i + 1].Substring(0, 1);
if (AdvRichTextBox.contain_en(str) && AdvRichTextBox.contain_en(str2))
{
text2 = text2 + array[i] + " ";
}
else
{
text2 += array[i];
}
}
string str3 = text2.Substring(text2.Length - 1, 1);
string str4 = array[array.Length - 1].Substring(0, 1);
if (AdvRichTextBox.contain_en(str3) && AdvRichTextBox.contain_en(str4))
{
text2 = text2 + array[array.Length - 1] + " ";
}
else
{
text2 += array[array.Length - 1];
}
this.richTextBox1.Text = text2;
}
Application.DoEvents();
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
// Token: 0x06000010 RID: 16 RVA: 0x0000212F File Offset: 0x0000032F
public void toolStripButtonVoice_Click(object sender, EventArgs e)
{
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
HelpWin32.SendMessage(StaticValue.mainhandle, 786, 518);
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
// Token: 0x06000011 RID: 17 RVA: 0x0000215C File Offset: 0x0000035C
public void toolStripButtonFull_Click(object sender, EventArgs e)
{
this.richTextBox1.SelectAll();
this.richTextBox1.SelectionAlignment = HelpRepaint.TextAlign.Justify;
this.richTextBox1.Select(0, 0);
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
// Token: 0x06000012 RID: 18 RVA: 0x00004738 File Offset: 0x00002938
public void toolStripButtonspace_Click(object sender, EventArgs e)
{
if (this.toolspace)
{
this.richTextBox1.SelectAll();
this.indent_two(0);
this.richTextBox1.Select(0, 0);
this.toolspace = false;
}
else
{
this.richTextBox1.SelectAll();
this.indent_two(1);
this.richTextBox1.Select(0, 0);
this.toolspace = true;
}
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
// Token: 0x06000013 RID: 19 RVA: 0x000047A8 File Offset: 0x000029A8
public void toolStripButtonSend_Click(object sender, EventArgs e)
{
Clipboard.SetDataObject(this.richTextBox1.Text);
HelpWin32.SendMessage(HelpWin32.GetForegroundWindow(), 786, 530);
HelpWin32.keybd_event(Keys.ControlKey, 0, 0u, 0u);
HelpWin32.keybd_event(Keys.V, 0, 0u, 0u);
HelpWin32.keybd_event(Keys.V, 0, 2u, 0u);
HelpWin32.keybd_event(Keys.ControlKey, 0, 2u, 0u);
Fmflags fmflags = new Fmflags();
fmflags.Show();
fmflags.DrawStr("已复制");
}
// Token: 0x17000002 RID: 2
// (get) Token: 0x06000014 RID: 20 RVA: 0x0000218D File Offset: 0x0000038D
// (set) Token: 0x06000015 RID: 21 RVA: 0x0000219A File Offset: 0x0000039A
public ContextMenuStrip ContextMenuStrip1
{
get
{
return this.richTextBox1.ContextMenuStrip;
}
set
{
this.richTextBox1.ContextMenuStrip = value;
}
}
// Token: 0x17000003 RID: 3
// (set) Token: 0x06000016 RID: 22 RVA: 0x00004818 File Offset: 0x00002A18
public string Text_flag
{
set
{
this.txt_flag = value;
if (this.txt_flag == "天若幽心")
{
this.toolStripToolBar.Items.AddRange(new ToolStripItem[]
{
this.topmost,
this.Fontstyle,
this.toolStripButtonBold,
this.toolStripButtonColor,
this.toolStripButtonLeft,
this.toolStripButtonFull,
this.toolStripButtonspace,
this.toolStripButtonVoice,
this.toolStripButtonFind,
this.toolStripButtonSend,
this.toolStripButtonNote,
this.toolStripButtonParagraph,
this.toolStripButtonFence,
this.toolStripButtonSplit,
this.toolStripButtonMerge,
this.toolStripButtoncheck,
this.toolStripButtonTrans
});
return;
}
this.toolStripToolBar.Items.AddRange(new ToolStripItem[]
{
this.languagle,
this.Fontstyle,
this.toolStripButtonBold,
this.toolStripButtonColor,
this.toolStripButtonLeft,
this.toolStripButtonFull,
this.toolStripButtonspace,
this.toolStripButtonVoice,
this.toolStripButtonFind,
this.toolStripButtonSend,
this.toolStripButtonclose
});
}
}
// Token: 0x06000017 RID: 23 RVA: 0x000021A8 File Offset: 0x000003A8
public void toolStripButtonclose_Click(object sender, EventArgs e)
{
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
HelpWin32.SendMessage(HelpWin32.GetForegroundWindow(), 786, 511);
}
// Token: 0x06000018 RID: 24 RVA: 0x000021CA File Offset: 0x000003CA
public void toolStripButtonTrans_Click(object sender, EventArgs e)
{
HelpWin32.SendMessage(StaticValue.mainhandle, 786, 512);
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
// Token: 0x06000019 RID: 25 RVA: 0x0000207C File Offset: 0x0000027C
public void toolStripToolBar_Click(object sender, EventArgs e)
{
}
// Token: 0x0600001A RID: 26 RVA: 0x00004978 File Offset: 0x00002B78
private void zh_en_Click(object sender, EventArgs e)
{
this.zh_en.ForeColor = Color.Red;
this.zh_jp.ForeColor = Color.Black;
this.zh_ko.ForeColor = Color.Black;
StaticValue.zh_en = true;
StaticValue.zh_jp = false;
StaticValue.zh_ko = false;
HelpWin32.SendMessage(StaticValue.mainhandle, 786, 512);
}
// Token: 0x0600001B RID: 27 RVA: 0x000049DC File Offset: 0x00002BDC
private void zh_jp_Click(object sender, EventArgs e)
{
this.zh_en.ForeColor = Color.Black;
this.zh_jp.ForeColor = Color.Red;
this.zh_ko.ForeColor = Color.Black;
StaticValue.zh_en = false;
StaticValue.zh_jp = true;
StaticValue.zh_ko = false;
HelpWin32.SendMessage(StaticValue.mainhandle, 786, 512);
}
// Token: 0x0600001C RID: 28 RVA: 0x00004A40 File Offset: 0x00002C40
private void zh_ko_Click(object sender, EventArgs e)
{
this.zh_en.ForeColor = Color.Black;
this.zh_jp.ForeColor = Color.Black;
this.zh_ko.ForeColor = Color.Red;
StaticValue.zh_en = false;
StaticValue.zh_jp = false;
StaticValue.zh_ko = true;
HelpWin32.SendMessage(StaticValue.mainhandle, 786, 512);
}
// Token: 0x0600001D RID: 29 RVA: 0x00004AA4 File Offset: 0x00002CA4
public void font_宋体c(object sender, EventArgs e)
{
this.font_宋体.ForeColor = Color.Red;
this.font_黑体.ForeColor = Color.Black;
this.font_楷体.ForeColor = Color.Black;
this.font_微软雅黑.ForeColor = Color.Black;
this.font_新罗马.ForeColor = Color.Black;
string text = this.richTextBox1.Text;
this.richTextBox1.Text = "";
Font font = new Font("宋体", 16f * Program.factor, GraphicsUnit.Pixel);
this.richTextBox1.Font = font;
this.richTextBox1.Text = text;
}
// Token: 0x0600001E RID: 30 RVA: 0x00004B4C File Offset: 0x00002D4C
public void font_黑体c(object sender, EventArgs e)
{
this.font_宋体.ForeColor = Color.Black;
this.font_黑体.ForeColor = Color.Red;
this.font_楷体.ForeColor = Color.Black;
this.font_微软雅黑.ForeColor = Color.Black;
this.font_新罗马.ForeColor = Color.Black;
string text = this.richTextBox1.Text;
this.richTextBox1.Text = "";
Font font = new Font("黑体", 16f * Program.factor, GraphicsUnit.Pixel);
this.richTextBox1.Font = font;
this.richTextBox1.Text = text;
}
// Token: 0x0600001F RID: 31 RVA: 0x00004BF4 File Offset: 0x00002DF4
public void font_楷体c(object sender, EventArgs e)
{
this.font_宋体.ForeColor = Color.Black;
this.font_黑体.ForeColor = Color.Black;
this.font_楷体.ForeColor = Color.Red;
this.font_微软雅黑.ForeColor = Color.Black;
this.font_新罗马.ForeColor = Color.Black;
string text = this.richTextBox1.Text;
this.richTextBox1.Text = "";
Font font = new Font("STKaiti", 16f * Program.factor, GraphicsUnit.Pixel);
this.richTextBox1.Font = font;
this.richTextBox1.Text = text;
}
// Token: 0x06000020 RID: 32 RVA: 0x00004C9C File Offset: 0x00002E9C
public void font_微软雅黑c(object sender, EventArgs e)
{
this.font_宋体.ForeColor = Color.Black;
this.font_黑体.ForeColor = Color.Black;
this.font_楷体.ForeColor = Color.Black;
this.font_微软雅黑.ForeColor = Color.Red;
this.font_新罗马.ForeColor = Color.Black;
string text = this.richTextBox1.Text;
this.richTextBox1.Text = "";
Font font = new Font("微软雅黑", 16f * Program.factor, GraphicsUnit.Pixel);
this.richTextBox1.Font = font;
this.richTextBox1.Text = text;
}
// Token: 0x06000021 RID: 33 RVA: 0x00004D44 File Offset: 0x00002F44
public void font_新罗马c(object sender, EventArgs e)
{
this.font_宋体.ForeColor = Color.Black;
this.font_黑体.ForeColor = Color.Black;
this.font_楷体.ForeColor = Color.Black;
this.font_微软雅黑.ForeColor = Color.Black;
this.font_新罗马.ForeColor = Color.Red;
string text = this.richTextBox1.Text;
this.richTextBox1.Text = "";
Font font = new Font("Times New Roman", 16f * Program.factor, GraphicsUnit.Pixel);
this.richTextBox1.Font = font;
this.richTextBox1.Text = text;
}
// Token: 0x06000022 RID: 34 RVA: 0x00004DEC File Offset: 0x00002FEC
public void indent_two(int fla)
{
Font font = new Font(this.Font.Name, 9f * Program.factor, this.Font.Style, this.Font.Unit, this.Font.GdiCharSet, this.Font.GdiVerticalFont);
Graphics graphics = base.CreateGraphics();
SizeF sizeF = graphics.MeasureString("中", font);
this.richTextBox1.SelectionIndent = (int)sizeF.Width * 2 * fla;
this.richTextBox1.SelectionHangingIndent = -(int)sizeF.Width * 2 * fla;
graphics.Dispose();
}
// Token: 0x06000023 RID: 35 RVA: 0x000021EC File Offset: 0x000003EC
private void richeditbox_TextChanged(object sender, EventArgs e)
{
this.c.execute(this.richTextBox1.Text);
}
// Token: 0x06000024 RID: 36 RVA: 0x00002204 File Offset: 0x00000404
private void richTextBox1_LinkClicked(object sender, LinkClickedEventArgs e)
{
Process.Start(e.LinkText);
}
// Token: 0x17000004 RID: 4
// (get) Token: 0x06000025 RID: 37 RVA: 0x00002212 File Offset: 0x00000412
public string SelectText
{
get
{
return this.richTextBox1.SelectedText;
}
}
// Token: 0x06000026 RID: 38 RVA: 0x00004E88 File Offset: 0x00003088
private void richTextBox1_KeyDown(object sender, KeyEventArgs e)
{
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
if (e.Control && e.KeyCode == Keys.V)
{
e.SuppressKeyPress = true;
this.richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Text));
}
if (e.Control && e.KeyCode == Keys.Z)
{
this.c.undo();
this.richTextBox1.Text = this.c.Record;
}
if (e.Control && e.KeyCode == Keys.Y)
{
this.c.redo();
this.richTextBox1.Text = this.c.Record;
}
if (e.Control && e.KeyCode == Keys.F)
{
ReplaceForm replaceForm = new ReplaceForm(this);
if (this.txt_flag == "天若幽心")
{
replaceForm.Text = "识别替换";
replaceForm.Location = base.PointToScreen(new Point((base.Width - replaceForm.Width) / 2, (base.Height - replaceForm.Height) / 2));
}
else
{
replaceForm.Text = "翻译替换";
replaceForm.Location = base.PointToScreen(new Point((base.Width - replaceForm.Width) / 2, (base.Height - replaceForm.Height) / 2));
}
replaceForm.Show(this);
}
}
// Token: 0x17000005 RID: 5
// (set) Token: 0x06000027 RID: 39 RVA: 0x0000221F File Offset: 0x0000041F
public string Find
{
set
{
new Thread(new ThreadStart(this.错别字检查API)).Start();
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
}
// Token: 0x06000028 RID: 40 RVA: 0x00004FE4 File Offset: 0x000031E4
public void 错别字检查API()
{
this.richTextBox1.SelectAll();
this.richTextBox1.SelectionColor = Color.Black;
this.richTextBox1.Select(0, 0);
try
{
JArray jarray = JArray.Parse(((JObject)JsonConvert.DeserializeObject(this.Post_Html("http://www.cuobiezi.net/api/v1/zh_spellcheck/client/pos/json", "{\"check_mode\": \"value2\",\"content\": \"" + this.richTextBox1.Text + "\", \"content2\": \"value1\", \"doc_type\": \"value2\",\"method\": \"value2\",\"return_format\": \"value2\",\"username\": \"tianruoyouxin\"}")))["Cases"].ToString());
for (int i = 0; i < jarray.Count; i++)
{
JObject jobject = JObject.Parse(jarray[i].ToString());
int start = 0;
int length = this.richTextBox1.Text.Length;
for (int num = this.richTextBox1.Find(jobject["Error"].ToString(), start, length, RichTextBoxFinds.None); num != -1; num = this.richTextBox1.Find(jobject["Error"].ToString(), start, length, RichTextBoxFinds.None))
{
this.richTextBox1.SelectionColor = Color.Red;
start = num + jobject["Error"].ToString().Length;
}
}
this.richTextBox1.Select(0, 0);
}
catch
{
this.richTextBox1.Select(0, 0);
}
}
// Token: 0x06000029 RID: 41 RVA: 0x00005148 File Offset: 0x00003348
public string Post_Html(string url, string post_str)
{
byte[] bytes = Encoding.UTF8.GetBytes(post_str);
string result = "";
HttpWebRequest httpWebRequest = WebRequest.Create(url) as HttpWebRequest;
httpWebRequest.Method = "POST";
httpWebRequest.Timeout = 3000;
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
httpWebRequest.Headers.Add("Accept-Encoding: gzip, deflate");
httpWebRequest.Headers.Add("Accept-Language: zh-CN,en,*");
try
{
using (Stream requestStream = httpWebRequest.GetRequestStream())
{
requestStream.Write(bytes, 0, bytes.Length);
}
Stream responseStream = ((HttpWebResponse)httpWebRequest.GetResponse()).GetResponseStream();
StreamReader streamReader = new StreamReader(responseStream, Encoding.GetEncoding("utf-8"));
result = streamReader.ReadToEnd();
responseStream.Close();
streamReader.Close();
httpWebRequest.Abort();
}
catch
{
}
return result;
}
// Token: 0x0600002A RID: 42 RVA: 0x00002242 File Offset: 0x00000442
public void richtextbox1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
}
// Token: 0x0600002B RID: 43 RVA: 0x0000225C File Offset: 0x0000045C
public void toolStripButtonNote_Click(object sender, EventArgs e)
{
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
HelpWin32.SendMessage(StaticValue.mainhandle, 786, 520);
HelpWin32.SetForegroundWindow(StaticValue.mainhandle);
}
// Token: 0x0600002C RID: 44 RVA: 0x0000207C File Offset: 0x0000027C
private void Form1_MouseEnter(object sender, EventArgs e)
{
}
// Token: 0x0600002D RID: 45 RVA: 0x00002289 File Offset: 0x00000489
private void Form1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effect = DragDropEffects.All;
return;
}
e.Effect = DragDropEffects.None;
}
// Token: 0x0600002E RID: 46 RVA: 0x00005234 File Offset: 0x00003434
private void Form1_DragDrop(object sender, DragEventArgs e)
{
try
{
StaticValue.image_OCR = Image.FromFile((e.Data.GetData(DataFormats.FileDrop, false) as string[])[0]);
HelpWin32.SendMessage(StaticValue.mainhandle, 786, 580);
}
catch (Exception)
{
MessageBox.Show("文件格式不正确!", "提醒");
}
}
// Token: 0x0600002F RID: 47 RVA: 0x000022B0 File Offset: 0x000004B0
public static bool contain_en(string str)
{
return Regex.IsMatch(str, "[a-zA-Z]");
}
// Token: 0x06000030 RID: 48 RVA: 0x000021EC File Offset: 0x000003EC
public void TextBox1TextChanged(object sender, EventArgs e)
{
this.c.execute(this.richTextBox1.Text);
}
// Token: 0x17000006 RID: 6
// (set) Token: 0x06000031 RID: 49 RVA: 0x000022BD File Offset: 0x000004BD
public new string Hide
{
set
{
this.richTextBox1.Focus();
this.mode.HideDropDown();
this.Fontstyle.HideDropDown();
this.languagle.HideDropDown();
}
}
// Token: 0x06000032 RID: 50 RVA: 0x000052A0 File Offset: 0x000034A0
public void toolStripButtonSplit_keydown(object sender, MouseEventArgs e)
{
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(AdvRichTextBox));
if (e.Button == MouseButtons.Right)
{
if (!this.splitcolor)
{
this.toolStripButtonSplit.Image = (Image)componentResourceManager.GetObject("toolStripButtonSplit_2.Image");
this.toolStripButtonMerge.Image = (Image)componentResourceManager.GetObject("toolStripButtonMerge.Image");
this.splitcolor = true;
this.mergecolor = false;
StaticValue.set_拆分 = true;
StaticValue.set_合并 = false;
inihelp.SetValue("工具栏", "拆分", "True");
inihelp.SetValue("工具栏", "合并", "False");
return;
}
if (this.splitcolor)
{
this.toolStripButtonMerge.Image = (Image)componentResourceManager.GetObject("toolStripButtonMerge.Image");
this.toolStripButtonSplit.Image = (Image)componentResourceManager.GetObject("toolStripButtonSplit.Image");
this.splitcolor = false;
this.mergecolor = false;
StaticValue.set_拆分 = false;
StaticValue.set_合并 = false;
inihelp.SetValue("工具栏", "合并", "False");
inihelp.SetValue("工具栏", "拆分", "False");
}
}
}
// Token: 0x06000033 RID: 51 RVA: 0x000053D4 File Offset: 0x000035D4
public void toolStripButtonMerge_keydown(object sender, MouseEventArgs e)
{
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(AdvRichTextBox));
if (e.Button == MouseButtons.Right)
{
if (!this.mergecolor)
{
this.toolStripButtonMerge.Image = (Image)componentResourceManager.GetObject("toolStripButtonMerge_2.Image");
this.toolStripButtonSplit.Image = (Image)componentResourceManager.GetObject("toolStripButtonSplit.Image");
this.splitcolor = false;
this.mergecolor = true;
StaticValue.set_拆分 = false;
StaticValue.set_合并 = true;
inihelp.SetValue("工具栏", "合并", "True");