From 5a75fe4b894f5a561a37f7587ca5302b5fbd12a2 Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 6 Mar 2026 12:22:41 -0600 Subject: [PATCH] Add delete menu item for Folder Browser --- .../text/program/MessageStrings_de.txt | 3 + .../text/program/MessageStrings_en.txt | 3 + .../text/program/MessageStrings_es-419.txt | 3 + .../text/program/MessageStrings_es.txt | 3 + .../text/program/MessageStrings_fr.txt | 3 + .../text/program/MessageStrings_it.txt | 3 + .../text/program/MessageStrings_ja.txt | 3 + .../text/program/MessageStrings_ko.txt | 3 + .../text/program/MessageStrings_zh-Hans.txt | 3 + .../text/program/MessageStrings_zh-Hant.txt | 3 + PKHeX.Core/Util/MessageStrings.cs | 4 ++ .../EntityInstructionBuilder.Designer.cs | 2 +- .../PKM Editor/EntityInstructionBuilder.cs | 5 +- .../SAV Editor/ContextMenuSAV.Designer.cs | 8 +-- PKHeX.WinForms/Resources/text/lang_de.txt | 25 ++++---- PKHeX.WinForms/Resources/text/lang_en.txt | 23 ++++---- PKHeX.WinForms/Resources/text/lang_es-419.txt | 23 ++++---- PKHeX.WinForms/Resources/text/lang_es.txt | 23 ++++---- PKHeX.WinForms/Resources/text/lang_fr.txt | 21 +++---- PKHeX.WinForms/Resources/text/lang_it.txt | 23 ++++---- PKHeX.WinForms/Resources/text/lang_ja.txt | 5 +- PKHeX.WinForms/Resources/text/lang_ko.txt | 5 +- .../Resources/text/lang_zh-Hans.txt | 3 +- .../Resources/text/lang_zh-Hant.txt | 5 +- PKHeX.WinForms/Subforms/SAV_FolderList.cs | 57 ++++++++++++++++++- .../Save Editors/SAV_Wondercard.Designer.cs | 6 +- 26 files changed, 183 insertions(+), 85 deletions(-) diff --git a/PKHeX.Core/Resources/text/program/MessageStrings_de.txt b/PKHeX.Core/Resources/text/program/MessageStrings_de.txt index f55fd24a6..108f97c58 100644 --- a/PKHeX.Core/Resources/text/program/MessageStrings_de.txt +++ b/PKHeX.Core/Resources/text/program/MessageStrings_de.txt @@ -25,6 +25,9 @@ MsgFolderNotFound = Ordner kann nicht gefunden werden: MsgWindowClose = Das Fenster wird nun geschlossen. MsgResearchRequired = Benötigt mehr Recherche. MsgConfirmQuitProgram = Quit PKHeX? +MsgFileDelete = Diese Datei löschen? +MsgFileDeleteFail = Datei kann nicht gelöscht werden. +MsgFileDeleteSuccess = Datei erfolgreich gelöscht. MsgFileLoad = Datei wurde geöffnet: MsgFileLoadAllZero = File is uninitialized (all zero). Please ensure it was properly saved. MsgFileLoadAllFFFF = File is uninitialized (all 0xFF). Please ensure it was properly saved. diff --git a/PKHeX.Core/Resources/text/program/MessageStrings_en.txt b/PKHeX.Core/Resources/text/program/MessageStrings_en.txt index 1dc32f8ca..1cd53ab2f 100644 --- a/PKHeX.Core/Resources/text/program/MessageStrings_en.txt +++ b/PKHeX.Core/Resources/text/program/MessageStrings_en.txt @@ -25,6 +25,9 @@ MsgFolderNotFound = Can't find folder: MsgWindowClose = The current window will now close. MsgResearchRequired = Needs more research. MsgConfirmQuitProgram = Quit PKHeX? +MsgFileDelete = Delete this file? +MsgFileDeleteFail = Unable to delete file. +MsgFileDeleteSuccess = File deleted successfully. MsgFileLoad = File Loaded: MsgFileLoadAllZero = File is uninitialized (all zero). Please ensure it was properly saved. MsgFileLoadAllFFFF = File is uninitialized (all 0xFF). Please ensure it was properly saved. diff --git a/PKHeX.Core/Resources/text/program/MessageStrings_es-419.txt b/PKHeX.Core/Resources/text/program/MessageStrings_es-419.txt index 641a3921d..b2b550c1b 100644 --- a/PKHeX.Core/Resources/text/program/MessageStrings_es-419.txt +++ b/PKHeX.Core/Resources/text/program/MessageStrings_es-419.txt @@ -25,6 +25,9 @@ MsgFolderNotFound = No se encuentra el directorio: MsgWindowClose = La ventana actual se cerrará. MsgResearchRequired = Se requiere más investigación. MsgConfirmQuitProgram = Quit PKHeX? +MsgFileDelete = ¿Deseas eliminar este archivo? +MsgFileDeleteFail = No se pudo eliminar el archivo. +MsgFileDeleteSuccess = Archivo eliminado correctamente. MsgFileLoad = Archivo cargado: MsgFileLoadAllZero = El archivo no está inicializado (todo ceros). Por favor comprueba que fue guardado correctamente. MsgFileLoadAllFFFF = El archivo no está inicializado (todo 0xFF). Por favor comprueba que fue guardado correctamente. diff --git a/PKHeX.Core/Resources/text/program/MessageStrings_es.txt b/PKHeX.Core/Resources/text/program/MessageStrings_es.txt index 96cf399d6..3abbd72a0 100644 --- a/PKHeX.Core/Resources/text/program/MessageStrings_es.txt +++ b/PKHeX.Core/Resources/text/program/MessageStrings_es.txt @@ -25,6 +25,9 @@ MsgFolderNotFound = No se encuentra el directorio: MsgWindowClose = La ventana actual se cerrará. MsgResearchRequired = Se requiere más investigación. MsgConfirmQuitProgram = ¿Cerrar PKHeX? +MsgFileDelete = ¿Eliminar este archivo? +MsgFileDeleteFail = No se pudo eliminar el archivo. +MsgFileDeleteSuccess = Archivo eliminado correctamente. MsgFileLoad = Archivo cargado: MsgFileLoadAllZero = El archivo no está inicializado (todo ceros). Por favor comprueba que fue guardado correctamente. MsgFileLoadAllFFFF = El archivo no está inicializado (todo 0xFF). Por favor comprueba que fue guardado correctamente. diff --git a/PKHeX.Core/Resources/text/program/MessageStrings_fr.txt b/PKHeX.Core/Resources/text/program/MessageStrings_fr.txt index 6b27e0a01..ad1c7dc87 100644 --- a/PKHeX.Core/Resources/text/program/MessageStrings_fr.txt +++ b/PKHeX.Core/Resources/text/program/MessageStrings_fr.txt @@ -25,6 +25,9 @@ MsgFolderNotFound = Impossible de localiser ce dossier : MsgWindowClose = La fenêtre actuelle va se fermer. MsgResearchRequired = Nécessite plus de recherche. MsgConfirmQuitProgram = Quitter PKHeX ? +MsgFileDelete = Supprimer ce fichier ? +MsgFileDeleteFail = Impossible de supprimer le fichier. +MsgFileDeleteSuccess = Fichier supprimé avec succès. MsgFileLoad = Fichier chargé : MsgFileLoadAllZero = Le fichier n'est pas initialisé (que des zéros). Assurez-vous qu'il ait été sauvegardé correctement. MsgFileLoadAllFFFF = Le fichier n'est pas initialisé (que des 0xFF). Assurez-vous qu'il ait été sauvegardé correctement. diff --git a/PKHeX.Core/Resources/text/program/MessageStrings_it.txt b/PKHeX.Core/Resources/text/program/MessageStrings_it.txt index 9de8e8d9e..7350e38a9 100644 --- a/PKHeX.Core/Resources/text/program/MessageStrings_it.txt +++ b/PKHeX.Core/Resources/text/program/MessageStrings_it.txt @@ -25,6 +25,9 @@ MsgFolderNotFound = Impossibile trovare la cartella: MsgWindowClose = La finestra corrente verrà chiusa. MsgResearchRequired = Necessarie ricerche aggiuntive. MsgConfirmQuitProgram = Quit PKHeX? +MsgFileDelete = Eliminare questo file? +MsgFileDeleteFail = Impossibile eliminare il file. +MsgFileDeleteSuccess = File eliminato correttamente. MsgFileLoad = File caricato: MsgFileLoadAllZero = File is uninitialized (all zero). Please ensure it was properly saved. MsgFileLoadAllFFFF = File is uninitialized (all 0xFF). Please ensure it was properly saved. diff --git a/PKHeX.Core/Resources/text/program/MessageStrings_ja.txt b/PKHeX.Core/Resources/text/program/MessageStrings_ja.txt index 5a66adcb2..ec671c19e 100644 --- a/PKHeX.Core/Resources/text/program/MessageStrings_ja.txt +++ b/PKHeX.Core/Resources/text/program/MessageStrings_ja.txt @@ -25,6 +25,9 @@ MsgFolderNotFound = フォルダが見つかりません: MsgWindowClose = 現在のウィンドウが閉じます。 MsgResearchRequired = さらなる調査が必要です。 MsgConfirmQuitProgram = PKHeXを終了しますか? +MsgFileDelete = このファイルを削除しますか? +MsgFileDeleteFail = ファイルを削除できません。 +MsgFileDeleteSuccess = ファイルを削除しました。 MsgFileLoad = ファイルがロードされました: MsgFileLoadAllZero = ファイルは初期化されていません(全て0x00)。正しくセーブされていることをご確認ください。 MsgFileLoadAllFFFF = ファイルは初期化されていません(全て0xFF)。正しくセーブされていることをご確認ください。 diff --git a/PKHeX.Core/Resources/text/program/MessageStrings_ko.txt b/PKHeX.Core/Resources/text/program/MessageStrings_ko.txt index 1ff88b1c0..96a2f62f5 100644 --- a/PKHeX.Core/Resources/text/program/MessageStrings_ko.txt +++ b/PKHeX.Core/Resources/text/program/MessageStrings_ko.txt @@ -25,6 +25,9 @@ MsgFolderNotFound = 폴더를 찾을 수 없음: MsgWindowClose = 이 창이 곧 닫힙니다. MsgResearchRequired = 추가 연구가 필요합니다. MsgConfirmQuitProgram = PKHeX을 종료하시겠습니까? +MsgFileDelete = 이 파일을 삭제하시겠습니까? +MsgFileDeleteFail = 파일을 삭제할 수 없습니다. +MsgFileDeleteSuccess = 파일을 성공적으로 삭제했습니다. MsgFileLoad = 파일 불러옴: MsgFileLoadAllZero = 파일이 초기화되지 않았습니다 (모두 0). 제대로 저장되었는지 확인하세요. MsgFileLoadAllFFFF = 파일이 초기화되지 않았습니다 (모두 0xFF). 제대로 저장되었는지 확인하세요. diff --git a/PKHeX.Core/Resources/text/program/MessageStrings_zh-Hans.txt b/PKHeX.Core/Resources/text/program/MessageStrings_zh-Hans.txt index cb93c4f7a..539c7d4d0 100644 --- a/PKHeX.Core/Resources/text/program/MessageStrings_zh-Hans.txt +++ b/PKHeX.Core/Resources/text/program/MessageStrings_zh-Hans.txt @@ -25,6 +25,9 @@ MsgFolderNotFound = 未找到文件夹: MsgWindowClose = 当前窗口将要关闭。 MsgResearchRequired = 需要更多研究。 MsgConfirmQuitProgram = 退出 PKHeX? +MsgFileDelete = 删除此文件? +MsgFileDeleteFail = 无法删除文件。 +MsgFileDeleteSuccess = 文件已成功删除。 MsgFileLoad = 文件已加载: MsgFileLoadAllZero = 文件未初始化(全部为零)。请确保已正确保存。 MsgFileLoadAllFFFF = 文件未初始化(全部为0xFF)。请确保已正确保存。 diff --git a/PKHeX.Core/Resources/text/program/MessageStrings_zh-Hant.txt b/PKHeX.Core/Resources/text/program/MessageStrings_zh-Hant.txt index 7511ad3d1..c61eb6e12 100644 --- a/PKHeX.Core/Resources/text/program/MessageStrings_zh-Hant.txt +++ b/PKHeX.Core/Resources/text/program/MessageStrings_zh-Hant.txt @@ -25,6 +25,9 @@ MsgFolderNotFound = 未找到資料夾: MsgWindowClose = 當前窗口將要關閉。 MsgResearchRequired = 尚待更多研究。 MsgConfirmQuitProgram = 退出 PKHeX? +MsgFileDelete = 刪除此檔案? +MsgFileDeleteFail = 無法刪除檔案。 +MsgFileDeleteSuccess = 檔案已成功刪除。 MsgFileLoad = 檔案經已載入: MsgFileLoadAllZero = 文件未初始化(全部為零)。請確保已正確保存。 MsgFileLoadAllFFFF = 文件未初始化(全部為 0xFF)。請確保已正確保存。 diff --git a/PKHeX.Core/Util/MessageStrings.cs b/PKHeX.Core/Util/MessageStrings.cs index d412a11e3..94a293f82 100644 --- a/PKHeX.Core/Util/MessageStrings.cs +++ b/PKHeX.Core/Util/MessageStrings.cs @@ -50,6 +50,10 @@ public static class MessageStrings public static string MsgConfirmQuitProgram { get; set; } = "Quit PKHeX?"; + public static string MsgFileDelete { get; set; } = "Delete this file?"; + public static string MsgFileDeleteFail { get; set; } = "Unable to delete file."; + public static string MsgFileDeleteSuccess { get; set; } = "File deleted successfully."; + public static string MsgFileLoad { get; set; } = "File Loaded:"; public static string MsgFileLoadAllZero { get; set; } = "File is uninitialized (all zero). Please ensure it was properly saved."; public static string MsgFileLoadAllFFFF { get; set; } = "File is uninitialized (all 0xFF). Please ensure it was properly saved."; diff --git a/PKHeX.WinForms/Controls/PKM Editor/EntityInstructionBuilder.Designer.cs b/PKHeX.WinForms/Controls/PKM Editor/EntityInstructionBuilder.Designer.cs index bc1d3b4ba..04781f92d 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/EntityInstructionBuilder.Designer.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/EntityInstructionBuilder.Designer.cs @@ -69,7 +69,7 @@ private void InitializeComponent() B_Require.Name = "B_Require"; B_Require.Size = new System.Drawing.Size(40, 25); B_Require.TabIndex = 2; - B_Require.Text = "Set"; + B_Require.Text = "&Set"; B_Require.UseVisualStyleBackColor = true; B_Require.Click += B_Require_Click; // diff --git a/PKHeX.WinForms/Controls/PKM Editor/EntityInstructionBuilder.cs b/PKHeX.WinForms/Controls/PKM Editor/EntityInstructionBuilder.cs index 52899732d..6f03a310f 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/EntityInstructionBuilder.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/EntityInstructionBuilder.cs @@ -26,11 +26,12 @@ public EntityInstructionBuilder(Func pk) for (int i = 0; i < Prefixes.Length; i++) { var prefix = Prefixes[i]; - var text = i == 0 ? "Set" : (prefix is '&' ? "&&" : prefix.ToString()); // activator key sanitization + var name = (i == 0 ? "Set" : prefix.ToString()); + var text = i == 0 ? "&Set" : (prefix is '&' ? "&&" : prefix.ToString()); // activator key sanitization var color = StringInstruction.IsMutationInstruction(prefix) ? WinFormsUtil.ColorWarn : SystemColors.ControlText; var item = new ToolStripMenuItem(text) { - Name = $"mnu_{text}", + Name = $"mnu_{name}", Tag = i, ForeColor = color, }; diff --git a/PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.Designer.cs b/PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.Designer.cs index 34820646b..512d7d7fc 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.Designer.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/ContextMenuSAV.Designer.cs @@ -53,7 +53,7 @@ private void InitializeComponent() mnuView.Image = global::PKHeX.WinForms.Properties.Resources.other; mnuView.Name = "mnuView"; mnuView.Size = new System.Drawing.Size(152, 22); - mnuView.Text = "View"; + mnuView.Text = "&View"; mnuView.Click += new System.EventHandler(ClickView); // // mnuSet @@ -61,7 +61,7 @@ private void InitializeComponent() mnuSet.Image = global::PKHeX.WinForms.Properties.Resources.exit; mnuSet.Name = "mnuSet"; mnuSet.Size = new System.Drawing.Size(152, 22); - mnuSet.Text = "Set"; + mnuSet.Text = "&Set"; mnuSet.Click += new System.EventHandler(ClickSet); // // mnuDelete @@ -69,7 +69,7 @@ private void InitializeComponent() mnuDelete.Image = global::PKHeX.WinForms.Properties.Resources.nocheck; mnuDelete.Name = "mnuDelete"; mnuDelete.Size = new System.Drawing.Size(152, 22); - mnuDelete.Text = "Delete"; + mnuDelete.Text = "&Delete"; mnuDelete.Click += new System.EventHandler(ClickDelete); // // mnuLegality @@ -77,7 +77,7 @@ private void InitializeComponent() mnuLegality.Image = global::PKHeX.WinForms.Properties.Resources.export; mnuLegality.Name = "mnuLegality"; mnuLegality.Size = new System.Drawing.Size(152, 22); - mnuLegality.Text = "Legality"; + mnuLegality.Text = "&Legality"; mnuLegality.Click += new System.EventHandler(ClickShowLegality); // // ContextMenuSAV diff --git a/PKHeX.WinForms/Resources/text/lang_de.txt b/PKHeX.WinForms/Resources/text/lang_de.txt index 7195a8042..641201ed6 100644 --- a/PKHeX.WinForms/Resources/text/lang_de.txt +++ b/PKHeX.WinForms/Resources/text/lang_de.txt @@ -97,7 +97,7 @@ BatchEdit.mnu_«=« BatchEdit.mnu_»=» BatchEdit.mnu_*=* BatchEdit.mnu_/=/ -BatchEdit.mnu_&&=&& +BatchEdit.mnu_&=&& BatchEdit.mnu_%=% BatchEdit.mnu_^=^ BatchEdit.mnu_+=+ @@ -107,7 +107,7 @@ BatchEdit.mnu_>=> BatchEdit.mnu_|=| BatchEdit.mnu_≤=≤ BatchEdit.mnu_≥=≥ -BatchEdit.mnu_Set=Set +BatchEdit.mnu_Set=&Set BatchEditor.B_Add=Hinzufügen BatchEditor.B_Go=Ausführen BatchEditor.RB_Boxes=Boxen @@ -628,13 +628,13 @@ Main.mnu_SortType=Typ Main.mnu_SortTypeTera=Tera Type Main.mnu_SortUsage=Verwendung Main.mnu_SortVersion=Version -Main.mnuDelete=Löschen -Main.mnuLegality=Legalität -Main.mnuLLegality=Legalität -Main.mnuLQR=QR! -Main.mnuLSave=Speichern als... -Main.mnuSet=Einstellen -Main.mnuView=Ansehen +Main.mnuDelete=L&öschen +Main.mnuLegality=Legalit&ät +Main.mnuLLegality=&Legalität +Main.mnuLQR=&QR! +Main.mnuLSave=&Speichern als... +Main.mnuSet=&Einstellen +Main.mnuView=&Ansehen Main.Tab_Box=Box Main.Tab_Cosmetic=Kosmetisch Main.Tab_Main=Haupt @@ -1235,8 +1235,9 @@ SAV_FolderList.DGV_OT=OT SAV_FolderList.DGV_Played=Gespielt SAV_FolderList.DGV_SID=SID SAV_FolderList.DGV_TID=TID -SAV_FolderList.mnuBrowseAt=Suchen... -SAV_FolderList.mnuOpen=Öffnen +SAV_FolderList.mnuBrowseAt=&Suchen... +SAV_FolderList.mnuDelete=&Löschen +SAV_FolderList.mnuOpen=&Öffnen SAV_FolderList.Tab_Backup=Backups SAV_FolderList.Tab_Folders=Ordner SAV_FolderList.Tab_Recent=Letzte @@ -1343,7 +1344,7 @@ SAV_Inventory.mnuSortCountReverse=Zählen (rückwärts) SAV_Inventory.mnuSortIndex=Index SAV_Inventory.mnuSortIndexReverse=Index (rückwärts) SAV_Inventory.mnuSortName=Name -SAV_Inventory.mnuSortNameReverse=Name (Reverse) +SAV_Inventory.mnuSortNameReverse=Name (rückwärts) SAV_Link6.B_Cancel=Abbrechen SAV_Link6.B_Export=Exportieren SAV_Link6.B_Import=Importieren diff --git a/PKHeX.WinForms/Resources/text/lang_en.txt b/PKHeX.WinForms/Resources/text/lang_en.txt index 7b473914d..98e153d80 100644 --- a/PKHeX.WinForms/Resources/text/lang_en.txt +++ b/PKHeX.WinForms/Resources/text/lang_en.txt @@ -97,7 +97,7 @@ BatchEdit.mnu_«=« BatchEdit.mnu_»=» BatchEdit.mnu_*=* BatchEdit.mnu_/=/ -BatchEdit.mnu_&&=&& +BatchEdit.mnu_&=&& BatchEdit.mnu_%=% BatchEdit.mnu_^=^ BatchEdit.mnu_+=+ @@ -107,7 +107,7 @@ BatchEdit.mnu_>=> BatchEdit.mnu_|=| BatchEdit.mnu_≤=≤ BatchEdit.mnu_≥=≥ -BatchEdit.mnu_Set=Set +BatchEdit.mnu_Set=&Set BatchEditor.B_Add=Add BatchEditor.B_Go=Run BatchEditor.RB_Boxes=Boxes @@ -628,13 +628,13 @@ Main.mnu_SortType=Type Main.mnu_SortTypeTera=Tera Type Main.mnu_SortUsage=Usage Main.mnu_SortVersion=Version -Main.mnuDelete=Delete -Main.mnuLegality=Legality -Main.mnuLLegality=Legality -Main.mnuLQR=QR! -Main.mnuLSave=Save as... -Main.mnuSet=Set -Main.mnuView=View +Main.mnuDelete=&Delete +Main.mnuLegality=&Legality +Main.mnuLLegality=&Legality +Main.mnuLQR=&QR! +Main.mnuLSave=&Save as... +Main.mnuSet=&Set +Main.mnuView=&View Main.Tab_Box=Box Main.Tab_Cosmetic=Cosmetic Main.Tab_Main=Main @@ -1235,8 +1235,9 @@ SAV_FolderList.DGV_OT=OT SAV_FolderList.DGV_Played=Played SAV_FolderList.DGV_SID=SID SAV_FolderList.DGV_TID=TID -SAV_FolderList.mnuBrowseAt=Browse... -SAV_FolderList.mnuOpen=Open +SAV_FolderList.mnuBrowseAt=&Browse... +SAV_FolderList.mnuDelete=&Delete +SAV_FolderList.mnuOpen=&Open SAV_FolderList.Tab_Backup=Backups SAV_FolderList.Tab_Folders=Folders SAV_FolderList.Tab_Recent=Recent diff --git a/PKHeX.WinForms/Resources/text/lang_es-419.txt b/PKHeX.WinForms/Resources/text/lang_es-419.txt index 8d299dcee..09b254a0d 100644 --- a/PKHeX.WinForms/Resources/text/lang_es-419.txt +++ b/PKHeX.WinForms/Resources/text/lang_es-419.txt @@ -97,7 +97,7 @@ BatchEdit.mnu_«=« BatchEdit.mnu_»=» BatchEdit.mnu_*=* BatchEdit.mnu_/=/ -BatchEdit.mnu_&&=&& +BatchEdit.mnu_&=&& BatchEdit.mnu_%=% BatchEdit.mnu_^=^ BatchEdit.mnu_+=+ @@ -107,7 +107,7 @@ BatchEdit.mnu_>=> BatchEdit.mnu_|=| BatchEdit.mnu_≤=≤ BatchEdit.mnu_≥=≥ -BatchEdit.mnu_Set=Set +BatchEdit.mnu_Set=&Set BatchEditor.B_Add=Añadir BatchEditor.B_Go=Ejecutar BatchEditor.RB_Boxes=Cajas @@ -628,13 +628,13 @@ Main.mnu_SortType=Tipo Main.mnu_SortTypeTera=Teratipo Main.mnu_SortUsage=Uso Main.mnu_SortVersion=Versión -Main.mnuDelete=Borrar -Main.mnuLegality=Legalidad -Main.mnuLLegality=Legalidad -Main.mnuLQR=QR! -Main.mnuLSave=Guardar como... -Main.mnuSet=Colocar -Main.mnuView=Ver +Main.mnuDelete=&Borrar +Main.mnuLegality=&Legalidad +Main.mnuLLegality=&Legalidad +Main.mnuLQR=&QR! +Main.mnuLSave=&Guardar como... +Main.mnuSet=&Colocar +Main.mnuView=&Ver Main.Tab_Box=Caja Main.Tab_Cosmetic=Cosmética Main.Tab_Main=Inicio @@ -1235,8 +1235,9 @@ SAV_FolderList.DGV_OT=EO SAV_FolderList.DGV_Played=T. Jugado SAV_FolderList.DGV_SID=IDS SAV_FolderList.DGV_TID=ID -SAV_FolderList.mnuBrowseAt=Buscar... -SAV_FolderList.mnuOpen=Abrir +SAV_FolderList.mnuBrowseAt=B&uscar... +SAV_FolderList.mnuDelete=&Borrar +SAV_FolderList.mnuOpen=&Abrir SAV_FolderList.Tab_Backup=Copia de seg. SAV_FolderList.Tab_Folders=Carpetas SAV_FolderList.Tab_Recent=Reciente diff --git a/PKHeX.WinForms/Resources/text/lang_es.txt b/PKHeX.WinForms/Resources/text/lang_es.txt index 074fa405d..4b08bf633 100644 --- a/PKHeX.WinForms/Resources/text/lang_es.txt +++ b/PKHeX.WinForms/Resources/text/lang_es.txt @@ -97,7 +97,7 @@ BatchEdit.mnu_«=« BatchEdit.mnu_»=» BatchEdit.mnu_*=* BatchEdit.mnu_/=/ -BatchEdit.mnu_&&=&& +BatchEdit.mnu_&=&& BatchEdit.mnu_%=% BatchEdit.mnu_^=^ BatchEdit.mnu_+=+ @@ -107,7 +107,7 @@ BatchEdit.mnu_>=> BatchEdit.mnu_|=| BatchEdit.mnu_≤=≤ BatchEdit.mnu_≥=≥ -BatchEdit.mnu_Set=Set +BatchEdit.mnu_Set=&Set BatchEditor.B_Add=Añadir BatchEditor.B_Go=Ejecutar BatchEditor.RB_Boxes=Cajas @@ -628,13 +628,13 @@ Main.mnu_SortType=Tipo Main.mnu_SortTypeTera=Teratipo Main.mnu_SortUsage=Uso Main.mnu_SortVersion=Versión -Main.mnuDelete=Borrar -Main.mnuLegality=Legalidad -Main.mnuLLegality=Legalidad -Main.mnuLQR=QR! -Main.mnuLSave=Guardar como... -Main.mnuSet=Colocar -Main.mnuView=Ver +Main.mnuDelete=&Borrar +Main.mnuLegality=&Legalidad +Main.mnuLLegality=&Legalidad +Main.mnuLQR=&QR! +Main.mnuLSave=&Guardar como... +Main.mnuSet=&Colocar +Main.mnuView=&Ver Main.Tab_Box=Caja Main.Tab_Cosmetic=Cosmética Main.Tab_Main=Inicio @@ -1235,8 +1235,9 @@ SAV_FolderList.DGV_OT=EO SAV_FolderList.DGV_Played=T. Jugado SAV_FolderList.DGV_SID=IDS SAV_FolderList.DGV_TID=ID -SAV_FolderList.mnuBrowseAt=Buscar... -SAV_FolderList.mnuOpen=Abrir +SAV_FolderList.mnuBrowseAt=B&uscar... +SAV_FolderList.mnuDelete=&Borrar +SAV_FolderList.mnuOpen=&Abrir SAV_FolderList.Tab_Backup=Copia de seg. SAV_FolderList.Tab_Folders=Carpetas SAV_FolderList.Tab_Recent=Reciente diff --git a/PKHeX.WinForms/Resources/text/lang_fr.txt b/PKHeX.WinForms/Resources/text/lang_fr.txt index 4d5775cd5..58415a1cb 100644 --- a/PKHeX.WinForms/Resources/text/lang_fr.txt +++ b/PKHeX.WinForms/Resources/text/lang_fr.txt @@ -97,7 +97,7 @@ BatchEdit.mnu_«=« BatchEdit.mnu_»=» BatchEdit.mnu_*=* BatchEdit.mnu_/=/ -BatchEdit.mnu_&&=&& +BatchEdit.mnu_&=&& BatchEdit.mnu_%=% BatchEdit.mnu_^=^ BatchEdit.mnu_+=+ @@ -628,13 +628,13 @@ Main.mnu_SortType=Type Main.mnu_SortTypeTera=Type de la Téracristallisation Main.mnu_SortUsage=Utilisation Main.mnu_SortVersion=Version -Main.mnuDelete=Effacer -Main.mnuLegality=Légalité -Main.mnuLLegality=Légalité -Main.mnuLQR=QR ! -Main.mnuLSave=Sauvegarder sous... -Main.mnuSet=Appliquer -Main.mnuView=Voir +Main.mnuDelete=&Effacer +Main.mnuLegality=&Légalité +Main.mnuLLegality=&Légalité +Main.mnuLQR=&QR ! +Main.mnuLSave=&Sauvegarder sous... +Main.mnuSet=&Appliquer +Main.mnuView=&Voir Main.Tab_Box=Boîtes Main.Tab_Cosmetic=Cosmétique Main.Tab_Main=Général @@ -1235,8 +1235,9 @@ SAV_FolderList.DGV_OT=DO SAV_FolderList.DGV_Played=Joué SAV_FolderList.DGV_SID=SID SAV_FolderList.DGV_TID=TID -SAV_FolderList.mnuBrowseAt=Naviguer... -SAV_FolderList.mnuOpen=Ouvrir +SAV_FolderList.mnuBrowseAt=&Naviguer... +SAV_FolderList.mnuDelete=&Effacer +SAV_FolderList.mnuOpen=&Ouvrir SAV_FolderList.Tab_Backup=Sauvegardes SAV_FolderList.Tab_Folders=Dossiers SAV_FolderList.Tab_Recent=Récent diff --git a/PKHeX.WinForms/Resources/text/lang_it.txt b/PKHeX.WinForms/Resources/text/lang_it.txt index a46753132..696d45c18 100644 --- a/PKHeX.WinForms/Resources/text/lang_it.txt +++ b/PKHeX.WinForms/Resources/text/lang_it.txt @@ -97,7 +97,7 @@ BatchEdit.mnu_«=« BatchEdit.mnu_»=» BatchEdit.mnu_*=* BatchEdit.mnu_/=/ -BatchEdit.mnu_&&=&& +BatchEdit.mnu_&=&& BatchEdit.mnu_%=% BatchEdit.mnu_^=^ BatchEdit.mnu_+=+ @@ -107,7 +107,7 @@ BatchEdit.mnu_>=> BatchEdit.mnu_|=| BatchEdit.mnu_≤=≤ BatchEdit.mnu_≥=≥ -BatchEdit.mnu_Set=Set +BatchEdit.mnu_Set=&Set BatchEditor.B_Add=Aggiungi BatchEditor.B_Go=Avvia BatchEditor.RB_Boxes=Box @@ -628,13 +628,13 @@ Main.mnu_SortType=Tipo Main.mnu_SortTypeTera=Teratipo Main.mnu_SortUsage=Utilizzo Main.mnu_SortVersion=Versione -Main.mnuDelete=Elimina -Main.mnuLegality=Legalità -Main.mnuLLegality=Legalità -Main.mnuLQR=QR! -Main.mnuLSave=Salva come... -Main.mnuSet=Applica -Main.mnuView=Vedi +Main.mnuDelete=&Elimina +Main.mnuLegality=&Legalità +Main.mnuLLegality=&Legalità +Main.mnuLQR=&QR! +Main.mnuLSave=&Salva come... +Main.mnuSet=&Applica +Main.mnuView=&Vedi Main.Tab_Box=Box Main.Tab_Cosmetic=Cosmetica Main.Tab_Main=Generale @@ -1235,8 +1235,9 @@ SAV_FolderList.DGV_OT=AO SAV_FolderList.DGV_Played=Giocato SAV_FolderList.DGV_SID=SID SAV_FolderList.DGV_TID=TID -SAV_FolderList.mnuBrowseAt=Sfoglia... -SAV_FolderList.mnuOpen=Apri +SAV_FolderList.mnuBrowseAt=&Sfoglia... +SAV_FolderList.mnuDelete=&Elimina +SAV_FolderList.mnuOpen=&Apri SAV_FolderList.Tab_Backup=Backup SAV_FolderList.Tab_Folders=Cartelle SAV_FolderList.Tab_Recent=Recenti diff --git a/PKHeX.WinForms/Resources/text/lang_ja.txt b/PKHeX.WinForms/Resources/text/lang_ja.txt index 0dc3f668e..c34838ae8 100644 --- a/PKHeX.WinForms/Resources/text/lang_ja.txt +++ b/PKHeX.WinForms/Resources/text/lang_ja.txt @@ -97,7 +97,7 @@ BatchEdit.mnu_«=« BatchEdit.mnu_»=» BatchEdit.mnu_*=* BatchEdit.mnu_/=/ -BatchEdit.mnu_&&=&& +BatchEdit.mnu_&=&& BatchEdit.mnu_%=% BatchEdit.mnu_^=^ BatchEdit.mnu_+=+ @@ -107,7 +107,7 @@ BatchEdit.mnu_>=> BatchEdit.mnu_|=| BatchEdit.mnu_≤=≤ BatchEdit.mnu_≥=≥ -BatchEdit.mnu_Set=Set +BatchEdit.mnu_Set=&Set BatchEditor.B_Add=追加 BatchEditor.B_Go=実行 BatchEditor.RB_Boxes=ボックス @@ -1236,6 +1236,7 @@ SAV_FolderList.DGV_Played=プレイ時間 SAV_FolderList.DGV_SID=SID SAV_FolderList.DGV_TID=TID SAV_FolderList.mnuBrowseAt=ファイルを閲覧 +SAV_FolderList.mnuDelete=消去 SAV_FolderList.mnuOpen=開く SAV_FolderList.Tab_Backup=バックアップ SAV_FolderList.Tab_Folders=フォルダー diff --git a/PKHeX.WinForms/Resources/text/lang_ko.txt b/PKHeX.WinForms/Resources/text/lang_ko.txt index b262717af..7bd081368 100644 --- a/PKHeX.WinForms/Resources/text/lang_ko.txt +++ b/PKHeX.WinForms/Resources/text/lang_ko.txt @@ -97,7 +97,7 @@ BatchEdit.mnu_«=« BatchEdit.mnu_»=» BatchEdit.mnu_*=* BatchEdit.mnu_/=/ -BatchEdit.mnu_&&=&& +BatchEdit.mnu_&=&& BatchEdit.mnu_%=% BatchEdit.mnu_^=^ BatchEdit.mnu_+=+ @@ -107,7 +107,7 @@ BatchEdit.mnu_>=> BatchEdit.mnu_|=| BatchEdit.mnu_≤=≤ BatchEdit.mnu_≥=≥ -BatchEdit.mnu_Set=Set +BatchEdit.mnu_Set=&Set BatchEditor.B_Add=추가 BatchEditor.B_Go=실행 BatchEditor.RB_Boxes=박스 @@ -1236,6 +1236,7 @@ SAV_FolderList.DGV_Played=Played SAV_FolderList.DGV_SID=SID SAV_FolderList.DGV_TID=TID SAV_FolderList.mnuBrowseAt=찾아보기... +SAV_FolderList.mnuDelete=삭제 SAV_FolderList.mnuOpen=열기 SAV_FolderList.Tab_Backup=백업 SAV_FolderList.Tab_Folders=폴더 diff --git a/PKHeX.WinForms/Resources/text/lang_zh-Hans.txt b/PKHeX.WinForms/Resources/text/lang_zh-Hans.txt index b09f37a02..c851d67e2 100644 --- a/PKHeX.WinForms/Resources/text/lang_zh-Hans.txt +++ b/PKHeX.WinForms/Resources/text/lang_zh-Hans.txt @@ -97,7 +97,7 @@ BatchEdit.mnu_«=« BatchEdit.mnu_»=» BatchEdit.mnu_*=* BatchEdit.mnu_/=/ -BatchEdit.mnu_&&=&& +BatchEdit.mnu_&=&& BatchEdit.mnu_%=% BatchEdit.mnu_^=^ BatchEdit.mnu_+=+ @@ -1236,6 +1236,7 @@ SAV_FolderList.DGV_Played=玩耍 SAV_FolderList.DGV_SID=里ID SAV_FolderList.DGV_TID=表ID SAV_FolderList.mnuBrowseAt=浏览... +SAV_FolderList.mnuDelete=删除 SAV_FolderList.mnuOpen=打开 SAV_FolderList.Tab_Backup=备份 SAV_FolderList.Tab_Folders=文件夹 diff --git a/PKHeX.WinForms/Resources/text/lang_zh-Hant.txt b/PKHeX.WinForms/Resources/text/lang_zh-Hant.txt index 13b0dee4c..b31320e80 100644 --- a/PKHeX.WinForms/Resources/text/lang_zh-Hant.txt +++ b/PKHeX.WinForms/Resources/text/lang_zh-Hant.txt @@ -97,7 +97,7 @@ BatchEdit.mnu_«=« BatchEdit.mnu_»=» BatchEdit.mnu_*=* BatchEdit.mnu_/=/ -BatchEdit.mnu_&&=&& +BatchEdit.mnu_&=&& BatchEdit.mnu_%=% BatchEdit.mnu_^=^ BatchEdit.mnu_+=+ @@ -107,7 +107,7 @@ BatchEdit.mnu_>=> BatchEdit.mnu_|=| BatchEdit.mnu_≤=≤ BatchEdit.mnu_≥=≥ -BatchEdit.mnu_Set=Set +BatchEdit.mnu_Set=&Set BatchEditor.B_Add=增加 BatchEditor.B_Go=運行 BatchEditor.RB_Boxes=盒子 @@ -1236,6 +1236,7 @@ SAV_FolderList.DGV_Played=經已游玩 SAV_FolderList.DGV_SID=隱ID: SAV_FolderList.DGV_TID=表ID: SAV_FolderList.mnuBrowseAt=瀏覽... +SAV_FolderList.mnuDelete=刪除 SAV_FolderList.mnuOpen=打開 SAV_FolderList.Tab_Backup=備份 SAV_FolderList.Tab_Folders=資料夾 diff --git a/PKHeX.WinForms/Subforms/SAV_FolderList.cs b/PKHeX.WinForms/Subforms/SAV_FolderList.cs index 1c15f9da4..062a34828 100644 --- a/PKHeX.WinForms/Subforms/SAV_FolderList.cs +++ b/PKHeX.WinForms/Subforms/SAV_FolderList.cs @@ -177,7 +177,7 @@ private ContextMenuStrip GetContextMenu(DataGridView dgv) var mnuOpen = new ToolStripMenuItem { Name = "mnuOpen", - Text = "Open", + Text = "&Open", Image = Resources.open, }; mnuOpen.Click += (_, _) => ClickOpenFile(dgv); @@ -185,14 +185,23 @@ private ContextMenuStrip GetContextMenu(DataGridView dgv) var mnuBrowseAt = new ToolStripMenuItem { Name = "mnuBrowseAt", - Text = "Browse...", + Text = "&Browse...", Image = Resources.folder, }; mnuBrowseAt.Click += (_, _) => ClickOpenFolder(dgv); + var mnuDelete = new ToolStripMenuItem + { + Name = "mnuDelete", + Text = "&Delete", + Image = Resources.nocheck, + }; + mnuDelete.Click += (_, _) => ClickDeleteFile(dgv); + ContextMenuStrip mnu = new(); mnu.Items.Add(mnuOpen); mnu.Items.Add(mnuBrowseAt); + mnu.Items.Add(mnuDelete); return mnu; } @@ -208,6 +217,32 @@ private void ClickOpenFile(DataGridView dgv) OpenSaveFile(sav.Save); } + private void ClickDeleteFile(DataGridView dgv) + { + var preview = GetSaveFile(dgv); + if (preview is null || !File.Exists(preview.FilePath)) + { + WinFormsUtil.Alert(MsgFileLoadFail); + return; + } + + var path = preview.FilePath; + var result = WinFormsUtil.Prompt(MessageBoxButtons.YesNo, MsgFileDelete, preview.FilePath); + if (result != DialogResult.Yes) + return; + + try + { + if (File.Exists(path)) + File.Delete(path); + DeleteSaveFile(dgv); + } + catch (Exception ex) + { + WinFormsUtil.Alert(MsgFileDeleteFail, path, ex.Message); + } + } + private void ClickOpenFolder(DataGridView dgv) { var sav = GetSaveFile(dgv); @@ -232,6 +267,24 @@ private void ClickOpenFolder(DataGridView dgv) return parent[item]; } + private void DeleteSaveFile(DataGridView dgData) + { + + var c = dgData.SelectedRows; + if (c.Count != 1) + return; + + var item = c[0].Index; + var parent = dgData == dgDataRecent ? Recent : Backup; + parent.RemoveAt(item); + + // Scan other list to remove if it exists there too (e.g. backup and recent) + var other = dgData == dgDataRecent ? Backup : Recent; + var preview = other.FirstOrDefault(z => z.FilePath == parent[item].FilePath); + if (preview is not null) + other.Remove(preview); + } + private void DataGridCellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { if (e.ColumnIndex == -1 || e.RowIndex == -1 || e.Button != MouseButtons.Right) diff --git a/PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.Designer.cs b/PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.Designer.cs index c7effdada..abdff54de 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.Designer.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/SAV_Wondercard.Designer.cs @@ -193,7 +193,7 @@ private void InitializeComponent() mnuView.Image = Properties.Resources.other; mnuView.Name = "mnuView"; mnuView.Size = new System.Drawing.Size(107, 22); - mnuView.Text = "View"; + mnuView.Text = "&View"; mnuView.Click += ClickView; // // mnuSet @@ -201,7 +201,7 @@ private void InitializeComponent() mnuSet.Image = Properties.Resources.exit; mnuSet.Name = "mnuSet"; mnuSet.Size = new System.Drawing.Size(107, 22); - mnuSet.Text = "Set"; + mnuSet.Text = "&Set"; mnuSet.Click += ClickSet; // // mnuDelete @@ -209,7 +209,7 @@ private void InitializeComponent() mnuDelete.Image = Properties.Resources.nocheck; mnuDelete.Name = "mnuDelete"; mnuDelete.Size = new System.Drawing.Size(107, 22); - mnuDelete.Text = "Delete"; + mnuDelete.Text = "&Delete"; mnuDelete.Click += ClickDelete; // // FLP_Gifts