@@ -77,8 +77,8 @@ internal static void CommandMenuInit()
77
77
78
78
internal static void SetToolBarIcon ( )
79
79
{
80
- if ( ! string . IsNullOrEmpty ( BNpp . NotepadPP . NppBinVersion )
81
- && int . TryParse ( BNpp . NotepadPP . NppBinVersion . Split ( '.' ) [ 0 ] , out int majorVersion )
80
+ if ( ! string . IsNullOrEmpty ( Npp . NotepadPP . NppBinVersion )
81
+ && int . TryParse ( Npp . NotepadPP . NppBinVersion . Split ( '.' ) [ 0 ] , out int majorVersion )
82
82
&& majorVersion >= 8 )
83
83
{
84
84
toolbarIconsWithDarkMode tbIcons = new toolbarIconsWithDarkMode
@@ -174,57 +174,57 @@ public static void ShowTheDialog()
174
174
175
175
dialog = new RegExToolDialog
176
176
{
177
- GetText = ( ) => BNpp . Text ,
177
+ GetText = ( ) => Npp . Text ,
178
178
179
179
SetText = text =>
180
180
{
181
181
if ( Keyboard . IsKeyDown ( Key . LeftCtrl ) || Keyboard . IsKeyDown ( Key . RightCtrl ) )
182
182
{
183
- BNpp . NotepadPP . FileNew ( ) ;
183
+ Npp . NotepadPP . FileNew ( ) ;
184
184
}
185
185
186
- BNpp . Text = text ;
186
+ Npp . Text = text ;
187
187
} ,
188
188
189
189
SetTextInNew = text =>
190
190
{
191
- BNpp . NotepadPP . FileNew ( ) ;
191
+ Npp . NotepadPP . FileNew ( ) ;
192
192
193
- BNpp . Text = text ;
193
+ Npp . Text = text ;
194
194
} ,
195
195
196
- GetSelectedText = ( ) => BNpp . SelectedText ,
196
+ GetSelectedText = ( ) => Npp . SelectedText ,
197
197
198
- SetPosition = ( index , length ) => BNpp . SelectTextAndShow ( index , index + length ) ,
198
+ SetPosition = ( index , length ) => Npp . SelectTextAndShow ( index , index + length ) ,
199
199
200
- SetSelection = ( index , length ) => BNpp . AddSelection ( index , index + length ) ,
200
+ SetSelection = ( index , length ) => Npp . AddSelection ( index , index + length ) ,
201
201
202
- GetSelectionStartIndex = ( ) => BNpp . SelectionStart ,
202
+ GetSelectionStartIndex = ( ) => Npp . SelectionStart ,
203
203
204
- GetSelectionLength = ( ) => BNpp . SelectionLength ,
204
+ GetSelectionLength = ( ) => Npp . SelectionLength ,
205
205
206
- SaveCurrentDocument = ( ) => BNpp . NotepadPP . SaveCurrentFile ( ) ,
206
+ SaveCurrentDocument = ( ) => Npp . NotepadPP . SaveCurrentFile ( ) ,
207
207
208
- SetCurrentTabInCSharpHighlighting = ( ) => BNpp . NotepadPP . SetCurrentLanguage ( LangType . L_CS ) ,
208
+ SetCurrentTabInCSharpHighlighting = ( ) => Npp . NotepadPP . SetCurrentLanguage ( LangType . L_CS ) ,
209
209
210
210
TryOpen = ( fileName , onlyIfAlreadyOpen ) =>
211
211
{
212
212
try
213
213
{
214
214
bool result = false ;
215
215
216
- if ( BNpp . NotepadPP . CurrentFileName . Equals ( fileName , StringComparison . OrdinalIgnoreCase ) )
216
+ if ( Npp . NotepadPP . CurrentFileName . Equals ( fileName , StringComparison . OrdinalIgnoreCase ) )
217
217
{
218
218
result = true ;
219
219
}
220
- else if ( BNpp . NotepadPP . GetAllOpenedDocuments . Any ( s => s . Equals ( fileName , StringComparison . OrdinalIgnoreCase ) ) )
220
+ else if ( Npp . NotepadPP . GetAllOpenedDocuments . Any ( s => s . Equals ( fileName , StringComparison . OrdinalIgnoreCase ) ) )
221
221
{
222
- BNpp . NotepadPP . ShowTab ( fileName ) ;
222
+ Npp . NotepadPP . ShowTab ( fileName ) ;
223
223
result = true ;
224
224
}
225
225
else if ( ! onlyIfAlreadyOpen )
226
226
{
227
- result = BNpp . NotepadPP . OpenFile ( fileName ) ;
227
+ result = Npp . NotepadPP . OpenFile ( fileName ) ;
228
228
}
229
229
else
230
230
{
@@ -245,7 +245,7 @@ public static void ShowTheDialog()
245
245
}
246
246
} ,
247
247
248
- GetCurrentFileName = ( ) => BNpp . NotepadPP . CurrentFileName
248
+ GetCurrentFileName = ( ) => Npp . NotepadPP . CurrentFileName
249
249
} ;
250
250
251
251
dialog . Show ( ) ;
0 commit comments