From 58d9dd3a674a873903cdc009c267c1527ae80281 Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 2 Nov 2022 14:26:30 -0500 Subject: [PATCH] Make the file picker only show valid files (#28) * Make the file picker only show valid files * Fix file wildcard patterns --- UnionPatcher.Gui/Forms/FilePatchForm.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UnionPatcher.Gui/Forms/FilePatchForm.cs b/UnionPatcher.Gui/Forms/FilePatchForm.cs index e5ea839..a52e04d 100644 --- a/UnionPatcher.Gui/Forms/FilePatchForm.cs +++ b/UnionPatcher.Gui/Forms/FilePatchForm.cs @@ -50,7 +50,7 @@ public class FilePatchForm : Form { Rows = { new TableRow( new TableCell(new Label { Text = "EBOOT.elf: ", VerticalAlignment = VerticalAlignment.Center }), - new TableCell(this.filePicker = new FilePicker { TabIndex = 0 }) + new TableCell(this.filePicker = new FilePicker { TabIndex = 0 , FileAction = FileAction.OpenFile, Filters = { new FileFilter("ELF files", "*.elf", "*.ELF"), new FileFilter("All Files", "*.*") }}) ), new TableRow( new TableCell(new Label { Text = "Server URL: ", VerticalAlignment = VerticalAlignment.Center }), @@ -58,7 +58,7 @@ public class FilePatchForm : Form { ), new TableRow( new TableCell(new Label { Text = "Output filename: ", VerticalAlignment = VerticalAlignment.Center }), - new TableCell(this.outputFileName = new FilePicker { TabIndex = 2, FileAction = FileAction.SaveFile }) + new TableCell(this.outputFileName = new FilePicker { TabIndex = 2, FileAction = FileAction.SaveFile, Filters = { new FileFilter("ELF files", "*.elf", "*.ELF"), new FileFilter("All Files", "*.*") }}) ), new TableRow( new TableCell(this.CreateHelpButton(4)), @@ -135,4 +135,4 @@ public class FilePatchForm : Form { Gui.CreateOkDialog("Success!", "The Server URL has been patched to " + this.serverUrl.Text); } -} \ No newline at end of file +}