mirror of
https://github.com/LBPUnion/UnionPatcher.git
synced 2025-08-01 13:48:41 +00:00
pass TabIndex into create button methods
This commit is contained in:
parent
bf1da1b931
commit
24b90855d1
1 changed files with 8 additions and 8 deletions
|
@ -5,10 +5,10 @@ using Eto.Forms;
|
||||||
|
|
||||||
namespace UnionPatcher.Gui {
|
namespace UnionPatcher.Gui {
|
||||||
public class MainForm : Form {
|
public class MainForm : Form {
|
||||||
public static Control CreatePatchButton() {
|
public static Control CreatePatchButton(int tabIndex = 0) {
|
||||||
var control = new Button() {
|
var control = new Button {
|
||||||
Text = "Patch!",
|
Text = "Patch!",
|
||||||
TabIndex = 3,
|
TabIndex = tabIndex,
|
||||||
};
|
};
|
||||||
|
|
||||||
control.Click += delegate {
|
control.Click += delegate {
|
||||||
|
@ -18,10 +18,10 @@ namespace UnionPatcher.Gui {
|
||||||
return control;
|
return control;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Control CreateHelpButton() {
|
public static Control CreateHelpButton(int tabIndex = 0) {
|
||||||
var control = new Button() {
|
var control = new Button {
|
||||||
Text = "Help",
|
Text = "Help",
|
||||||
TabIndex = 4,
|
TabIndex = tabIndex,
|
||||||
};
|
};
|
||||||
|
|
||||||
control.Click += delegate {
|
control.Click += delegate {
|
||||||
|
@ -55,8 +55,8 @@ namespace UnionPatcher.Gui {
|
||||||
new TableCell(new TextBox { TabIndex = 2 })
|
new TableCell(new TextBox { TabIndex = 2 })
|
||||||
),
|
),
|
||||||
new TableRow(
|
new TableRow(
|
||||||
new TableCell(CreateHelpButton()),
|
new TableCell(CreateHelpButton(4)),
|
||||||
new TableCell(CreatePatchButton())
|
new TableCell(CreatePatchButton(3))
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue