Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Commit

Permalink
Merge pull request #11 from Cu3PO42/box-selector-behavior
Browse files Browse the repository at this point in the history
Changes behavior of the box selector ComboBoxes
  • Loading branch information
kwsch committed Nov 28, 2014
2 parents cd0593d + 3ad1eb1 commit 5b647ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public Form1()
myTimer.Start();
CB_Game.SelectedIndex = 0;
CB_MainLanguage.SelectedIndex = 0;
CB_BoxStart.SelectedIndex = 0;
CB_BoxStart.SelectedIndex = 1;
changeboxsetting(null, null);
CB_Team.SelectedIndex = 0;
CB_ExportStyle.SelectedIndex = 0;
CB_BoxColor.SelectedIndex = 0;
Expand Down Expand Up @@ -416,8 +417,6 @@ private void openSAV(string path)
Array.Resize(ref empty, 0xE8);
scanSAV(savefile, key, empty);
File.WriteAllBytes(keyfile, key); // Key has been scanned for new slots, re-save key.
CB_BoxStart.SelectedIndex = 1; // Select Box 1 instead of All... for simplicity's sake.
changeboxsetting(null, null);
}
private void openVID(string path)
{
Expand Down Expand Up @@ -1689,10 +1688,11 @@ private void changeboxsetting(object sender, EventArgs e)
if (CB_BoxEnd.Enabled)
{
int start = Convert.ToInt16(CB_BoxStart.Text);
int oldValue = Convert.ToInt16(CB_BoxEnd.SelectedItem);
CB_BoxEnd.Items.Clear();
for (int i = start; i < 32; i++)
CB_BoxEnd.Items.Add(i.ToString());
CB_BoxEnd.SelectedIndex = 0;
CB_BoxEnd.SelectedIndex = (start >= oldValue ? 0 : oldValue-start);
}
}
private void B_ShowOptions_Click(object sender, EventArgs e)
Expand Down

0 comments on commit 5b647ed

Please sign in to comment.