Empty box data prevention

Writing 000000 is bad; empty slots are encrypted zeros.
This commit is contained in:
Kurt 2014-07-20 12:51:45 -07:00
parent 10e95228eb
commit c2be4f5f42
2 changed files with 6 additions and 6 deletions

View file

@ -135,7 +135,6 @@
this.CB_Slot.Name = "CB_Slot"; this.CB_Slot.Name = "CB_Slot";
this.CB_Slot.Size = new System.Drawing.Size(35, 21); this.CB_Slot.Size = new System.Drawing.Size(35, 21);
this.CB_Slot.TabIndex = 12; this.CB_Slot.TabIndex = 12;
this.CB_Slot.SelectedIndexChanged += new System.EventHandler(this.changeSourceIndex);
// //
// CB_Box // CB_Box
// //
@ -177,7 +176,6 @@
this.CB_Box.Name = "CB_Box"; this.CB_Box.Name = "CB_Box";
this.CB_Box.Size = new System.Drawing.Size(35, 21); this.CB_Box.Size = new System.Drawing.Size(35, 21);
this.CB_Box.TabIndex = 13; this.CB_Box.TabIndex = 13;
this.CB_Box.SelectedIndexChanged += new System.EventHandler(this.changeSourceIndex);
// //
// B_Load // B_Load
// //

View file

@ -56,6 +56,12 @@ namespace PKHeX
+ CB_Box.SelectedIndex * (232 * 30) // Box Shift + CB_Box.SelectedIndex * (232 * 30) // Box Shift
+ CB_Slot.SelectedIndex * 232, // Slot Shift + CB_Slot.SelectedIndex * 232, // Slot Shift
newdata, 0, 0xE8); newdata, 0, 0xE8);
if (newdata.SequenceEqual(new Byte[0xE8]))
{
System.Media.SystemSounds.Exclamation.Play();
return false;
}
} }
else if (CB_Source.SelectedIndex == 2) else if (CB_Source.SelectedIndex == 2)
{ {
@ -122,10 +128,6 @@ namespace PKHeX
} }
} }
private void changeSourceIndex(object sender, EventArgs e)
{
}
public static string RemoveTroublesomeCharacters(TextBox tb) public static string RemoveTroublesomeCharacters(TextBox tb)
{ {
string inString = tb.Text; string inString = tb.Text;