|
32 | 32 | using Windows.UI.WindowManagement.Preview; |
33 | 33 | using Windows.UI; |
34 | 34 | using Windows.Security.Cryptography.Core; |
35 | | -using Microsoft.Toolkit.Uwp.Helpers; |
36 | 35 | using Windows.Security.Cryptography; |
37 | 36 | using Windows.Storage.Streams; |
38 | 37 | using GalaSoft.MvvmLight.Command; |
39 | 38 | using Files.Helpers; |
40 | 39 | using Windows.UI.Xaml.Data; |
41 | | -using System.Security.Cryptography; |
42 | 40 |
|
43 | 41 | namespace Files.Interacts |
44 | 42 | { |
@@ -389,8 +387,7 @@ private async void OpenSelectedItems(bool displayApplicationPicker) |
389 | 387 | } |
390 | 388 | catch (FileNotFoundException) |
391 | 389 | { |
392 | | - MessageDialog dialog = new MessageDialog("The file you are attempting to access may have been moved or deleted.", "File Not Found"); |
393 | | - await dialog.ShowAsync(); |
| 390 | + await DialogDisplayHelper.ShowDialog(ResourceController.GetTranslation("FileNotFoundDialog.Title"), ResourceController.GetTranslation("FileNotFoundDialog.Text")); |
394 | 391 | NavigationActions.Refresh_Click(null, null); |
395 | 392 | } |
396 | 393 | } |
@@ -557,12 +554,11 @@ public async void DeleteItem_Click(object sender, RoutedEventArgs e) |
557 | 554 | } |
558 | 555 | catch (UnauthorizedAccessException) |
559 | 556 | { |
560 | | - MessageDialog AccessDeniedDialog = new MessageDialog("Access Denied", "Unable to delete this item"); |
561 | | - await AccessDeniedDialog.ShowAsync(); |
| 557 | + await DialogDisplayHelper.ShowDialog(ResourceController.GetTranslation("AccessDeniedDeleteDialog.Title"), ResourceController.GetTranslation("AccessDeniedDeleteDialog.Text")); |
562 | 558 | } |
563 | 559 | catch (FileNotFoundException) |
564 | 560 | { |
565 | | - Debug.WriteLine("Attention: Tried to delete an item that could be found"); |
| 561 | + await DialogDisplayHelper.ShowDialog(ResourceController.GetTranslation("FileNotFoundDialog.Title"), ResourceController.GetTranslation("FileNotFoundDialog.Text")); |
566 | 562 | } |
567 | 563 |
|
568 | 564 | App.InteractionViewModel.PermanentlyDelete = StorageDeleteOption.Default; //reset PermanentlyDelete flag |
@@ -954,9 +950,7 @@ public async void ToggleQuickLook() |
954 | 950 | } |
955 | 951 | catch (FileNotFoundException) |
956 | 952 | { |
957 | | - MessageDialog dialog = new MessageDialog("The file you are attempting to preview may have been moved or deleted.", "File Not Found"); |
958 | | - var task = dialog.ShowAsync(); |
959 | | - task.AsTask().Wait(); |
| 953 | + await DialogDisplayHelper.ShowDialog(ResourceController.GetTranslation("FileNotFoundDialog.Title"), ResourceController.GetTranslation("FileNotFoundPreviewDialog.Text")); |
960 | 954 | NavigationActions.Refresh_Click(null, null); |
961 | 955 | } |
962 | 956 | } |
|
0 commit comments