@@ -290,25 +290,42 @@ public override void DeleteMultipleItems ()
290
290
if ( CheckAllLinkedFile ( files ) ) {
291
291
RemoveFilesFromProject ( false , files ) ;
292
292
} else {
293
- string behavior = fileExists ? "delete" : "remove" ;
294
293
if ( hasChildren ) {
295
- if ( files . Count == 1 )
296
- question = GettextCatalog . GetString ( "Are you sure you want to {0} the file {1} and " +
297
- "its code-behind children from project {2}?" ,
298
- behavior , Path . GetFileName ( files [ 0 ] . Name ) , files [ 0 ] . Project . Name ) ;
299
- else
300
- question = GettextCatalog . GetString ( "Are you sure you want to {0} the selected files and " +
301
- "their code-behind children from the project?" , behavior ) ;
294
+ if ( files . Count == 1 ) {
295
+ if ( fileExists )
296
+ question = GettextCatalog . GetString ( "Are you sure you want to delete the file {0} and " +
297
+ "its code-behind children from project {1}?" ,
298
+ Path . GetFileName ( files [ 0 ] . Name ) , files [ 0 ] . Project . Name ) ;
299
+ else
300
+ question = GettextCatalog . GetString ( "Are you sure you want to remove the file {0} and " +
301
+ "its code-behind children from project {1}?" ,
302
+ Path . GetFileName ( files [ 0 ] . Name ) , files [ 0 ] . Project . Name ) ;
303
+ } else {
304
+ if ( fileExists )
305
+ question = GettextCatalog . GetString ( "Are you sure you want to delete the selected files and " +
306
+ "their code-behind children from the project?" ) ;
307
+ else
308
+ question = GettextCatalog . GetString ( "Are you sure you want to remove the selected files and " +
309
+ "their code-behind children from the project?" ) ;
310
+ }
302
311
} else {
303
- if ( files . Count == 1 )
304
- question = GettextCatalog . GetString ( "Are you sure you want to {0} file {1} from project {2}?" ,
305
- behavior , Path . GetFileName ( files [ 0 ] . Name ) , files [ 0 ] . Project . Name ) ;
306
- else
307
- question = GettextCatalog . GetString ( "Are you sure you want to {0} the selected files from the project?" , behavior ) ;
312
+ if ( files . Count == 1 ) {
313
+ if ( fileExists )
314
+ question = GettextCatalog . GetString ( "Are you sure you want to delete file {0} from project {1}?" ,
315
+ Path . GetFileName ( files [ 0 ] . Name ) , files [ 0 ] . Project . Name ) ;
316
+ else
317
+ question = GettextCatalog . GetString ( "Are you sure you want to remove file {0} from project {1}?" ,
318
+ Path . GetFileName ( files [ 0 ] . Name ) , files [ 0 ] . Project . Name ) ;
319
+
320
+ } else {
321
+ if ( fileExists )
322
+ question = GettextCatalog . GetString ( "Are you sure you want to delete the selected files from the project?" ) ;
323
+ else
324
+ question = GettextCatalog . GetString ( "Are you sure you want to remove the selected files from the project?" ) ;
325
+ }
308
326
}
309
327
310
328
var result = MessageService . AskQuestion ( question , new [ ] { AlertButton . Cancel , fileExists ? AlertButton . Delete : AlertButton . Remove } ) ;
311
-
312
329
if ( result == AlertButton . Cancel )
313
330
return ;
314
331
else
@@ -327,7 +344,7 @@ void OnUpdateDeleteMultipleItems (CommandInfo info)
327
344
var pf = ( ProjectFile ) node . DataItem ;
328
345
files . Add ( pf ) ;
329
346
}
330
- if ( ! CheckAnyFileExists ( files ) )
347
+ if ( ! CheckAnyFileExists ( files ) )
331
348
info . Text = GettextCatalog . GetString ( "Remove" ) ;
332
349
}
333
350
0 commit comments