From 24b90855d1a55929c7e358fedd37b20612a45762 Mon Sep 17 00:00:00 2001 From: jvyden Date: Mon, 18 Oct 2021 00:37:33 -0400 Subject: [PATCH] pass TabIndex into create button methods --- UnionPatcher.Gui/MainForm.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/UnionPatcher.Gui/MainForm.cs b/UnionPatcher.Gui/MainForm.cs index 715ef7a..7f9a474 100644 --- a/UnionPatcher.Gui/MainForm.cs +++ b/UnionPatcher.Gui/MainForm.cs @@ -5,10 +5,10 @@ using Eto.Forms; namespace UnionPatcher.Gui { public class MainForm : Form { - public static Control CreatePatchButton() { - var control = new Button() { + public static Control CreatePatchButton(int tabIndex = 0) { + var control = new Button { Text = "Patch!", - TabIndex = 3, + TabIndex = tabIndex, }; control.Click += delegate { @@ -18,10 +18,10 @@ namespace UnionPatcher.Gui { return control; } - public static Control CreateHelpButton() { - var control = new Button() { + public static Control CreateHelpButton(int tabIndex = 0) { + var control = new Button { Text = "Help", - TabIndex = 4, + TabIndex = tabIndex, }; control.Click += delegate { @@ -55,8 +55,8 @@ namespace UnionPatcher.Gui { new TableCell(new TextBox { TabIndex = 2 }) ), new TableRow( - new TableCell(CreateHelpButton()), - new TableCell(CreatePatchButton()) + new TableCell(CreateHelpButton(4)), + new TableCell(CreatePatchButton(3)) ), }, };