Skip to content

Commit

Permalink
Make the file picker only show valid files (#28)
Browse files Browse the repository at this point in the history
* Make the file picker only show valid files

* Fix file wildcard patterns
  • Loading branch information
Slendy authored Nov 2, 2022
1 parent 7d77dec commit 58d9dd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions UnionPatcher.Gui/Forms/FilePatchForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ public FilePatchForm() {
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 }),
new TableCell(this.serverUrl = new TextBox { TabIndex = 1 })
),
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)),
Expand Down Expand Up @@ -135,4 +135,4 @@ private void Patch() {

Gui.CreateOkDialog("Success!", "The Server URL has been patched to " + this.serverUrl.Text);
}
}
}

0 comments on commit 58d9dd3

Please sign in to comment.