Make the file picker only show valid files

This commit is contained in:
Slendy 2022-09-13 17:27:28 -05:00
parent 3d8473129a
commit 7299e99e7d

View file

@ -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)),