Skip to content

Commit 79ad140

Browse files
committed
Panda Review I
1 parent 998ed7f commit 79ad140

File tree

11 files changed

+27
-14
lines changed

11 files changed

+27
-14
lines changed

Intersect.Editor/Forms/Editors/BaseEditorForm.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
using System.Windows.Forms;
21
using DarkUI.Controls;
32

43
namespace Intersect.Editor.Forms.Editors;
54

65
public class BaseEditorForm : EditorForm
76
{
8-
protected DarkButton? btnSave;
9-
protected DarkButton? btnCancel;
7+
private DarkButton? btnSave;
8+
private DarkButton? btnCancel;
109

11-
protected void SetEditorButtons(DarkButton saveButton, DarkButton cancelButton)
10+
protected void SetSaveButton(DarkButton saveButton)
1211
{
1312
btnSave = saveButton;
13+
}
14+
15+
protected void SetCancelButton(DarkButton cancelButton)
16+
{
1417
btnCancel = cancelButton;
1518
}
1619

Intersect.Editor/Forms/Editors/Quest/frmQuest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public FrmQuest()
3131
Icon = Program.Icon;
3232

3333
InitLocalization();
34-
SetEditorButtons(btnSave, btnCancel);
34+
SetSaveButton(btnSave);
35+
SetCancelButton(btnCancel);
3536

3637
lstGameObjects.Init(UpdateToolStripItems, AssignEditorItem, toolStripItemNew_Click, toolStripItemCopy_Click, toolStripItemUndo_Click, toolStripItemPaste_Click, toolStripItemDelete_Click);
3738

Intersect.Editor/Forms/Editors/frmCraftingTables.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ public FrmCraftingTables()
2828
ApplyHooks();
2929
InitializeComponent();
3030
Icon = Program.Icon;
31-
SetEditorButtons(btnSave, btnCancel);
31+
SetSaveButton(btnSave);
32+
SetCancelButton(btnCancel);
3233

3334
lstGameObjects.Init(UpdateToolStripItems, AssignEditorItem, toolStripItemNew_Click, toolStripItemCopy_Click, toolStripItemUndo_Click, toolStripItemPaste_Click, toolStripItemDelete_Click);
3435
}

Intersect.Editor/Forms/Editors/frmCrafts.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public FrmCrafts()
3131
ApplyHooks();
3232
InitializeComponent();
3333
Icon = Program.Icon;
34-
SetEditorButtons(btnSave, btnCancel);
34+
SetSaveButton(btnSave);
35+
SetCancelButton(btnCancel);
3536
lstGameObjects.LostFocus += itemList_FocusChanged;
3637
lstGameObjects.GotFocus += itemList_FocusChanged;
3738
cmbResult.Items.Clear();

Intersect.Editor/Forms/Editors/frmItem.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public FrmItem()
4747
cmbProjectile.Items.Clear();
4848
cmbProjectile.Items.Add(Strings.General.None);
4949
cmbProjectile.Items.AddRange(ProjectileDescriptor.Names);
50-
SetEditorButtons(btnSave, btnCancel);
50+
SetSaveButton(btnSave);
51+
SetCancelButton(btnCancel);
5152

5253
lstGameObjects.Init(UpdateToolStripItems, AssignEditorItem, toolStripItemNew_Click, toolStripItemCopy_Click, toolStripItemUndo_Click, toolStripItemPaste_Click, toolStripItemDelete_Click);
5354
}

Intersect.Editor/Forms/Editors/frmNpc.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public FrmNpc()
3636
ApplyHooks();
3737
InitializeComponent();
3838
Icon = Program.Icon;
39-
SetEditorButtons(btnSave, btnCancel);
39+
SetSaveButton(btnSave);
40+
SetCancelButton(btnCancel);
4041

4142
lstGameObjects.Init(UpdateToolStripItems, AssignEditorItem, toolStripItemNew_Click, toolStripItemCopy_Click, toolStripItemUndo_Click, toolStripItemPaste_Click, toolStripItemDelete_Click);
4243
}

Intersect.Editor/Forms/Editors/frmProjectile.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public FrmProjectile()
3131
ApplyHooks();
3232
InitializeComponent();
3333
Icon = Program.Icon;
34-
SetEditorButtons(btnSave, btnCancel);
34+
SetSaveButton(btnSave);
35+
SetCancelButton(btnCancel);
3536
lstGameObjects.Init(UpdateToolStripItems, AssignEditorItem, toolStripItemNew_Click, toolStripItemCopy_Click, toolStripItemUndo_Click, toolStripItemPaste_Click, toolStripItemDelete_Click);
3637
}
3738
private void AssignEditorItem(Guid id)

Intersect.Editor/Forms/Editors/frmResource.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public FrmResource()
4949
InitializeComponent();
5050
Icon = Program.Icon;
5151

52-
SetEditorButtons(btnSave, btnCancel);
52+
SetSaveButton(btnSave);
53+
SetCancelButton(btnCancel);
5354
cmbToolType.Items.Clear();
5455
cmbToolType.Items.Add(Strings.General.None);
5556
cmbToolType.Items.AddRange(Options.Instance.Equipment.ToolTypes.ToArray());

Intersect.Editor/Forms/Editors/frmShop.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ public FrmShop()
2828
ApplyHooks();
2929
InitializeComponent();
3030
Icon = Program.Icon;
31-
SetEditorButtons(btnSave, btnCancel);
31+
SetSaveButton(btnSave);
32+
SetCancelButton(btnCancel);
3233

3334
lstGameObjects.Init(UpdateToolStripItems, AssignEditorItem, toolStripItemNew_Click, toolStripItemCopy_Click, toolStripItemUndo_Click, toolStripItemPaste_Click, toolStripItemDelete_Click);
3435
}

Intersect.Editor/Forms/Editors/frmSpell.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public FrmSpell()
3535
ApplyHooks();
3636
InitializeComponent();
3737
Icon = Program.Icon;
38-
SetEditorButtons(btnSave, btnCancel);
38+
SetSaveButton(btnSave);
39+
SetCancelButton(btnCancel);
3940

4041
cmbScalingStat.Items.Clear();
4142
for (var i = 0; i < Enum.GetValues<Stat>().Length; i++)

0 commit comments

Comments
 (0)