Skip to content

Commit 1b352bc

Browse files
authored
Fixed critical code supporting renamed controls.
1 parent 2d1535e commit 1b352bc

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/CoreKeeperInventoryEditor/App.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<value>110</value>
1818
</setting>
1919
<setting name="CurrentItemTab" serializeAs="String">
20-
<value>TabPage1</value>
20+
<value>Tab1_TabPage</value>
2121
</setting>
2222
<setting name="ItemVariation" serializeAs="String">
2323
<value>0</value>

src/CoreKeeperInventoryEditor/InventoryEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private void Form2_FormClosing(object sender, FormClosingEventArgs e)
9595
if (Main_TabControl.SelectedTab == Search)
9696
{
9797
// Set value to tools.
98-
CoreKeepersWorkshop.Properties.Settings.Default.CurrentItemTab = "tabPage1";
98+
CoreKeepersWorkshop.Properties.Settings.Default.CurrentItemTab = "Tab1_TabPage";
9999
}
100100
else
101101
{

src/CoreKeeperInventoryEditor/MainForm.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10756,7 +10756,7 @@ private void PictureBox_MouseClick(object sender, MouseEventArgs e)
1075610756
if (e.Button == MouseButtons.Left) // Load inventory editor.
1075710757
{
1075810758
// Get the picturebox selected number.
10759-
int slotNumber = int.Parse(pic.Name.Replace("pictureBox", ""));
10759+
int slotNumber = int.Parse(pic.Name.Replace("Slot", "").Replace("_PictureBox", ""));
1076010760

1076110761
// Spawn item picker window.
1076210762
InventoryEditor frm2 = new InventoryEditor();
@@ -10783,7 +10783,7 @@ private void PictureBox_MouseClick(object sender, MouseEventArgs e)
1078310783
else if (e.Button == MouseButtons.Middle) // Get item stats.
1078410784
{
1078510785
// Get the picturebox selected number.
10786-
int slotNumber = int.Parse(pic.Name.Replace("pictureBox", ""));
10786+
int slotNumber = int.Parse(pic.Name.Replace("Slot", "").Replace("_PictureBox", ""));
1078710787

1078810788
// Get item stats.
1078910789
AddItemToInv(slotNumber, GetItemInfo: true);
@@ -10810,7 +10810,7 @@ private void PictureBox_MouseClick(object sender, MouseEventArgs e)
1081010810
}
1081110811

1081210812
// Get the picturebox selected number.
10813-
int slotNumber = int.Parse(pic.Name.Replace("pictureBox", ""));
10813+
int slotNumber = int.Parse(pic.Name.Replace("Slot", "").Replace("_PictureBox", ""));
1081410814

1081510815
// Get item slot values.
1081610816
int[] itemInfo = GetSlotInfo(slotNumber);

src/CoreKeeperInventoryEditor/Properties/Settings.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/CoreKeeperInventoryEditor/Properties/Settings.settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Value Profile="(Default)">110</Value>
1010
</Setting>
1111
<Setting Name="CurrentItemTab" Type="System.String" Scope="User">
12-
<Value Profile="(Default)">TabPage1</Value>
12+
<Value Profile="(Default)">Tab1_TabPage</Value>
1313
</Setting>
1414
<Setting Name="ItemVariation" Type="System.Int32" Scope="User">
1515
<Value Profile="(Default)">0</Value>

0 commit comments

Comments
 (0)