From 7299e99e7d639b3f47860442074ee7c2a0208792 Mon Sep 17 00:00:00 2001 From: Slendy Date: Tue, 13 Sep 2022 17:27:28 -0500 Subject: [PATCH] Make the file picker only show valid files --- UnionPatcher.Gui/Forms/FilePatchForm.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UnionPatcher.Gui/Forms/FilePatchForm.cs b/UnionPatcher.Gui/Forms/FilePatchForm.cs index 27e9fa8..3207a91 100644 --- a/UnionPatcher.Gui/Forms/FilePatchForm.cs +++ b/UnionPatcher.Gui/Forms/FilePatchForm.cs @@ -49,7 +49,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 }), @@ -57,7 +57,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)),