@@ -85,14 +85,17 @@ public class EditorDialog : Form
85
85
private System . Windows . Forms . Label bookmarkLineLabel ;
86
86
private System . Windows . Forms . Label modifiedLineLabel ;
87
87
private System . Windows . Forms . Label highlightBackLabel ;
88
+ private System . Windows . Forms . Label highlightWordBackLabel ;
88
89
private System . Windows . Forms . Button printMarginButton ;
89
90
private System . Windows . Forms . Button bookmarkLineButton ;
90
91
private System . Windows . Forms . Button modifiedLineButton ;
91
92
private System . Windows . Forms . Button highlightBackButton ;
93
+ private System . Windows . Forms . Button highlightWordBackButton ;
92
94
private System . Windows . Forms . TextBox printMarginTextBox ;
93
95
private System . Windows . Forms . TextBox bookmarkLineTextBox ;
94
96
private System . Windows . Forms . TextBox modifiedLineTextBox ;
95
97
private System . Windows . Forms . TextBox highlightBackTextBox ;
98
+ private System . Windows . Forms . TextBox highlightWordBackTextBox ;
96
99
private System . Windows . Forms . Button debugLineButton ;
97
100
private System . Windows . Forms . Button errorLineButton ;
98
101
private System . Windows . Forms . Button disabledLineButton ;
@@ -177,6 +180,9 @@ private void InitializeComponent()
177
180
this . highlightBackButton = new System . Windows . Forms . Button ( ) ;
178
181
this . highlightBackLabel = new System . Windows . Forms . Label ( ) ;
179
182
this . highlightBackTextBox = new System . Windows . Forms . TextBox ( ) ;
183
+ this . highlightWordBackButton = new System . Windows . Forms . Button ( ) ;
184
+ this . highlightWordBackLabel = new System . Windows . Forms . Label ( ) ;
185
+ this . highlightWordBackTextBox = new System . Windows . Forms . TextBox ( ) ;
180
186
this . modifiedLineButton = new System . Windows . Forms . Button ( ) ;
181
187
this . modifiedLineLabel = new System . Windows . Forms . Label ( ) ;
182
188
this . modifiedLineTextBox = new System . Windows . Forms . TextBox ( ) ;
@@ -205,7 +211,7 @@ private void InitializeComponent()
205
211
// okButton
206
212
//
207
213
this . okButton . FlatStyle = System . Windows . Forms . FlatStyle . System ;
208
- this . okButton . Location = new System . Drawing . Point ( 431 , 534 ) ;
214
+ this . okButton . Location = new System . Drawing . Point ( 431 , 562 ) ;
209
215
this . okButton . Name = "okButton" ;
210
216
this . okButton . Size = new System . Drawing . Size ( 93 , 29 ) ;
211
217
this . okButton . TabIndex = 1 ;
@@ -217,7 +223,7 @@ private void InitializeComponent()
217
223
//
218
224
this . applyButton . Enabled = false ;
219
225
this . applyButton . FlatStyle = System . Windows . Forms . FlatStyle . System ;
220
- this . applyButton . Location = new System . Drawing . Point ( 640 , 534 ) ;
226
+ this . applyButton . Location = new System . Drawing . Point ( 640 , 562 ) ;
221
227
this . applyButton . Name = "applyButton" ;
222
228
this . applyButton . Size = new System . Drawing . Size ( 93 , 29 ) ;
223
229
this . applyButton . TabIndex = 3 ;
@@ -227,23 +233,23 @@ private void InitializeComponent()
227
233
//
228
234
// exportButton
229
235
//
230
- this . exportButton . Location = new System . Drawing . Point ( 238 , 534 ) ;
236
+ this . exportButton . Location = new System . Drawing . Point ( 238 , 562 ) ;
231
237
this . exportButton . Name = "exportButton" ;
232
238
this . exportButton . Size = new System . Drawing . Size ( 35 , 29 ) ;
233
239
this . exportButton . TabIndex = 8 ;
234
240
this . exportButton . Click += new System . EventHandler ( this . ExportLanguagesClick ) ;
235
241
//
236
242
// revertButton
237
243
//
238
- this . revertButton . Location = new System . Drawing . Point ( 285 , 534 ) ;
244
+ this . revertButton . Location = new System . Drawing . Point ( 285 , 562 ) ;
239
245
this . revertButton . Name = "revertButton" ;
240
246
this . revertButton . Size = new System . Drawing . Size ( 35 , 29 ) ;
241
247
this . revertButton . TabIndex = 9 ;
242
248
this . revertButton . Click += new System . EventHandler ( this . RevertLanguagesClick ) ;
243
249
//
244
250
// defaultButton
245
251
//
246
- this . defaultButton . Location = new System . Drawing . Point ( 332 , 534 ) ;
252
+ this . defaultButton . Location = new System . Drawing . Point ( 332 , 562 ) ;
247
253
this . defaultButton . Name = "defaultButton" ;
248
254
this . defaultButton . Size = new System . Drawing . Size ( 35 , 29 ) ;
249
255
this . defaultButton . TabIndex = 10 ;
@@ -253,7 +259,7 @@ private void InitializeComponent()
253
259
//
254
260
this . cancelButton . DialogResult = System . Windows . Forms . DialogResult . Cancel ;
255
261
this . cancelButton . FlatStyle = System . Windows . Forms . FlatStyle . System ;
256
- this . cancelButton . Location = new System . Drawing . Point ( 536 , 534 ) ;
262
+ this . cancelButton . Location = new System . Drawing . Point ( 536 , 562 ) ;
257
263
this . cancelButton . Name = "cancelButton" ;
258
264
this . cancelButton . Size = new System . Drawing . Size ( 93 , 29 ) ;
259
265
this . cancelButton . TabIndex = 2 ;
@@ -271,7 +277,7 @@ private void InitializeComponent()
271
277
this . itemListView . Location = new System . Drawing . Point ( 14 , 49 ) ;
272
278
this . itemListView . MultiSelect = false ;
273
279
this . itemListView . Name = "itemListView" ;
274
- this . itemListView . Size = new System . Drawing . Size ( 212 , 513 ) ;
280
+ this . itemListView . Size = new System . Drawing . Size ( 212 , 541 ) ;
275
281
this . itemListView . TabIndex = 5 ;
276
282
this . itemListView . UseCompatibleStateImageBehavior = false ;
277
283
this . itemListView . View = System . Windows . Forms . View . Details ;
@@ -293,7 +299,7 @@ private void InitializeComponent()
293
299
this . itemGroupBox . Controls . Add ( this . foregroundLabel ) ;
294
300
this . itemGroupBox . Controls . Add ( this . fontLabel ) ;
295
301
this . itemGroupBox . FlatStyle = System . Windows . Forms . FlatStyle . System ;
296
- this . itemGroupBox . Location = new System . Drawing . Point ( 238 , 319 ) ;
302
+ this . itemGroupBox . Location = new System . Drawing . Point ( 238 , 347 ) ;
297
303
this . itemGroupBox . Name = "itemGroupBox" ;
298
304
this . itemGroupBox . Size = new System . Drawing . Size ( 494 , 204 ) ;
299
305
this . itemGroupBox . TabIndex = 7 ;
@@ -598,6 +604,9 @@ private void InitializeComponent()
598
604
this . languageGroupBox . Controls . Add ( this . highlightBackButton ) ;
599
605
this . languageGroupBox . Controls . Add ( this . highlightBackLabel ) ;
600
606
this . languageGroupBox . Controls . Add ( this . highlightBackTextBox ) ;
607
+ this . languageGroupBox . Controls . Add ( this . highlightWordBackButton ) ;
608
+ this . languageGroupBox . Controls . Add ( this . highlightWordBackLabel ) ;
609
+ this . languageGroupBox . Controls . Add ( this . highlightWordBackTextBox ) ;
601
610
this . languageGroupBox . Controls . Add ( this . modifiedLineButton ) ;
602
611
this . languageGroupBox . Controls . Add ( this . modifiedLineLabel ) ;
603
612
this . languageGroupBox . Controls . Add ( this . modifiedLineTextBox ) ;
@@ -617,7 +626,7 @@ private void InitializeComponent()
617
626
this . languageGroupBox . FlatStyle = System . Windows . Forms . FlatStyle . System ;
618
627
this . languageGroupBox . Location = new System . Drawing . Point ( 238 , 10 ) ;
619
628
this . languageGroupBox . Name = "languageGroupBox" ;
620
- this . languageGroupBox . Size = new System . Drawing . Size ( 494 , 304 ) ;
629
+ this . languageGroupBox . Size = new System . Drawing . Size ( 494 , 332 ) ;
621
630
this . languageGroupBox . TabIndex = 6 ;
622
631
this . languageGroupBox . TabStop = false ;
623
632
this . languageGroupBox . Text = "Editor Style" ;
@@ -884,12 +893,38 @@ private void InitializeComponent()
884
893
this . disabledLineTextBox . TabIndex = 29 ;
885
894
this . disabledLineTextBox . TextChanged += new System . EventHandler ( this . EditorItemChanged ) ;
886
895
//
896
+ // highlightWordBackButton
897
+ //
898
+ this . highlightWordBackButton . Location = new System . Drawing . Point ( 126 , 286 ) ;
899
+ this . highlightWordBackButton . Name = "highlightWordBackButton" ;
900
+ this . highlightWordBackButton . Size = new System . Drawing . Size ( 33 , 30 ) ;
901
+ this . highlightWordBackButton . TabIndex = 24 ;
902
+ this . highlightWordBackButton . Click += new System . EventHandler ( this . HighlightWordBackButtonClick ) ;
903
+ //
904
+ // highlightWordBackLabel
905
+ //
906
+ this . highlightWordBackLabel . AutoSize = true ;
907
+ this . highlightWordBackLabel . FlatStyle = System . Windows . Forms . FlatStyle . System ;
908
+ this . highlightWordBackLabel . Location = new System . Drawing . Point ( 14 , 270 ) ;
909
+ this . highlightWordBackLabel . Name = "highlightWordBackLabel" ;
910
+ this . highlightWordBackLabel . Size = new System . Drawing . Size ( 88 , 16 ) ;
911
+ this . highlightWordBackLabel . TabIndex = 0 ;
912
+ this . highlightWordBackLabel . Text = "Highlight word back:" ;
913
+ //
914
+ // highlightWordBackTextBox
915
+ //
916
+ this . highlightWordBackTextBox . Location = new System . Drawing . Point ( 14 , 290 ) ;
917
+ this . highlightWordBackTextBox . Name = "highlightWordBackTextBox" ;
918
+ this . highlightWordBackTextBox . Size = new System . Drawing . Size ( 103 , 23 ) ;
919
+ this . highlightWordBackTextBox . TabIndex = 23 ;
920
+ this . highlightWordBackTextBox . TextChanged += new System . EventHandler ( this . EditorItemChanged ) ;
921
+ //
887
922
// colorizeCheckBox
888
923
//
889
924
this . colorizeCheckBox . AutoSize = true ;
890
925
this . colorizeCheckBox . Checked = true ;
891
926
this . colorizeCheckBox . CheckState = System . Windows . Forms . CheckState . Indeterminate ;
892
- this . colorizeCheckBox . Location = new System . Drawing . Point ( 14 , 274 ) ;
927
+ this . colorizeCheckBox . Location = new System . Drawing . Point ( 174 , 285 ) ;
893
928
this . colorizeCheckBox . Name = "italicsCheckBox" ;
894
929
this . colorizeCheckBox . Size = new System . Drawing . Size ( 58 , 20 ) ;
895
930
this . colorizeCheckBox . TabIndex = 12 ;
@@ -914,7 +949,7 @@ private void InitializeComponent()
914
949
this . AutoScaleDimensions = new System . Drawing . SizeF ( 7F , 16F ) ;
915
950
this . AutoScaleMode = System . Windows . Forms . AutoScaleMode . Font ;
916
951
this . CancelButton = this . cancelButton ;
917
- this . ClientSize = new System . Drawing . Size ( 746 , 577 ) ;
952
+ this . ClientSize = new System . Drawing . Size ( 746 , 605 ) ;
918
953
this . Controls . Add ( this . languageGroupBox ) ;
919
954
this . Controls . Add ( this . itemGroupBox ) ;
920
955
this . Controls . Add ( this . languageDropDown ) ;
@@ -989,6 +1024,7 @@ private void ApplyLocalizedTexts()
989
1024
this . markerForeLabel . Text = TextHelper . GetString ( "Info.MarkerFore" ) ;
990
1025
this . printMarginLabel . Text = TextHelper . GetString ( "Info.PrintMargin" ) ;
991
1026
this . highlightBackLabel . Text = TextHelper . GetString ( "Info.HighlightBack" ) ;
1027
+ this . highlightWordBackLabel . Text = TextHelper . GetString ( "Info.HighlightWordBack" ) ;
992
1028
this . modifiedLineLabel . Text = TextHelper . GetString ( "Info.ModifiedLine" ) ;
993
1029
this . bookmarkLineLabel . Text = TextHelper . GetString ( "Info.BookmarkLine" ) ;
994
1030
this . errorLineLabel . Text = TextHelper . GetString ( "Info.ErrorLineBack" ) ;
@@ -1030,6 +1066,7 @@ private void InitializeGraphics()
1030
1066
this . printMarginButton . ImageList = this . highlightBackButton . ImageList = imageList ;
1031
1067
this . modifiedLineButton . ImageList = this . bookmarkLineButton . ImageList = imageList ;
1032
1068
this . errorLineButton . ImageList = this . debugLineButton . ImageList = imageList ;
1069
+ this . highlightWordBackButton . ImageList = imageList ;
1033
1070
}
1034
1071
1035
1072
/// <summary>
@@ -1047,8 +1084,8 @@ private void PopulateControls()
1047
1084
this . markerBackButton . ImageIndex = this . markerForeButton . ImageIndex = 1 ;
1048
1085
this . printMarginButton . ImageIndex = this . highlightBackButton . ImageIndex = 1 ;
1049
1086
this . modifiedLineButton . ImageIndex = this . bookmarkLineButton . ImageIndex = 1 ;
1087
+ this . disabledLineButton . ImageIndex = this . highlightWordBackButton . ImageIndex = 1 ;
1050
1088
this . errorLineButton . ImageIndex = this . debugLineButton . ImageIndex = 1 ;
1051
- this . disabledLineButton . ImageIndex = 1 ;
1052
1089
String [ ] languageFiles = Directory . GetFiles ( this . LangDir , "*.xml" ) ;
1053
1090
foreach ( String language in languageFiles )
1054
1091
{
@@ -1206,6 +1243,7 @@ private void LoadEditorStyles()
1206
1243
this . marginBackTextBox . Text = "" ;
1207
1244
this . printMarginTextBox . Text = "" ;
1208
1245
this . highlightBackTextBox . Text = "" ;
1246
+ this . highlightWordBackTextBox . Text = "" ;
1209
1247
this . modifiedLineTextBox . Text = "" ;
1210
1248
this . bookmarkLineTextBox . Text = "" ;
1211
1249
this . errorLineTextBox . Text = "" ;
@@ -1253,6 +1291,10 @@ private void LoadEditorStyles()
1253
1291
{
1254
1292
this . highlightBackTextBox . Text = this . editorStyleNode . Attributes [ "highlight-back" ] . Value ;
1255
1293
}
1294
+ if ( this . editorStyleNode . Attributes [ "highlightword-back" ] != null )
1295
+ {
1296
+ this . highlightWordBackTextBox . Text = this . editorStyleNode . Attributes [ "highlightword-back" ] . Value ;
1297
+ }
1256
1298
if ( this . editorStyleNode . Attributes [ "modifiedline-back" ] != null )
1257
1299
{
1258
1300
this . modifiedLineTextBox . Text = this . editorStyleNode . Attributes [ "modifiedline-back" ] . Value ;
@@ -1307,6 +1349,8 @@ private void SaveEditorStyles()
1307
1349
else this . editorStyleNode . RemoveAttribute ( "print-margin" ) ;
1308
1350
if ( this . highlightBackTextBox . Text != "" ) this . editorStyleNode . SetAttribute ( "highlight-back" , this . highlightBackTextBox . Text ) ;
1309
1351
else this . editorStyleNode . RemoveAttribute ( "highlight-back" ) ;
1352
+ if ( this . highlightWordBackTextBox . Text != "" ) this . editorStyleNode . SetAttribute ( "highlightword-back" , this . highlightWordBackTextBox . Text ) ;
1353
+ else this . editorStyleNode . RemoveAttribute ( "highlightword-back" ) ;
1310
1354
if ( this . modifiedLineTextBox . Text != "" ) this . editorStyleNode . SetAttribute ( "modifiedline-back" , this . modifiedLineTextBox . Text ) ;
1311
1355
else this . editorStyleNode . RemoveAttribute ( "modifiedline-back" ) ;
1312
1356
if ( this . bookmarkLineTextBox . Text != "" ) this . editorStyleNode . SetAttribute ( "bookmarkline-back" , this . bookmarkLineTextBox . Text ) ;
@@ -1536,6 +1580,18 @@ private void HighlightBackButtonClick(Object sender, EventArgs e)
1536
1580
}
1537
1581
}
1538
1582
1583
+ /// <summary>
1584
+ /// When color has been selected, update controls
1585
+ /// </summary>
1586
+ private void HighlightWordBackButtonClick ( Object sender , EventArgs e )
1587
+ {
1588
+ this . colorDialog . Color = ColorTranslator . FromHtml ( this . highlightWordBackTextBox . Text ) ;
1589
+ if ( this . colorDialog . ShowDialog ( ) == DialogResult . OK )
1590
+ {
1591
+ this . highlightWordBackTextBox . Text = "0x" + this . colorDialog . Color . ToArgb ( ) . ToString ( "X8" ) . Substring ( 2 , 6 ) ;
1592
+ }
1593
+ }
1594
+
1539
1595
/// <summary>
1540
1596
/// When color has been selected, update controls
1541
1597
/// </summary>
0 commit comments