2014-06-28 21:22:05 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace PKHeX
|
|
|
|
|
{
|
2016-01-23 21:00:44 +00:00
|
|
|
|
public partial class SAV_BerryFieldXY : Form
|
2014-06-28 21:22:05 +00:00
|
|
|
|
{
|
2016-01-23 21:00:44 +00:00
|
|
|
|
public SAV_BerryFieldXY()
|
2014-06-28 21:22:05 +00:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2015-09-21 03:34:09 +00:00
|
|
|
|
Util.TranslateInterface(this, Main.curlanguage);
|
2014-06-28 21:22:05 +00:00
|
|
|
|
listBox1.SelectedIndex = 0;
|
|
|
|
|
}
|
2016-02-11 08:43:44 +00:00
|
|
|
|
private readonly byte[] sav = (byte[])Main.SAV.Data.Clone();
|
2014-06-28 21:22:05 +00:00
|
|
|
|
|
|
|
|
|
private void changefield(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
// Change Berry Field
|
2014-07-19 23:56:40 +00:00
|
|
|
|
|
|
|
|
|
// Gather Data
|
2015-10-24 03:13:32 +00:00
|
|
|
|
int berry = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex*0x18 + 1 * 0);
|
|
|
|
|
int u1 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 1 * 2);
|
|
|
|
|
int u2 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 2 * 2);
|
|
|
|
|
int u3 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 3 * 2);
|
|
|
|
|
int u4 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 4 * 2);
|
|
|
|
|
int u5 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 5 * 2);
|
|
|
|
|
int u6 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 6 * 2);
|
|
|
|
|
int u7 = BitConverter.ToUInt16(sav, Main.SAV.BerryField + 0xC + listBox1.SelectedIndex * 0x18 + 7 * 2);
|
2014-07-19 23:56:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Display Data
|
|
|
|
|
TB_Berry.Text = berry.ToString();
|
|
|
|
|
TB_u1.Text = u1.ToString();
|
|
|
|
|
TB_u2.Text = u2.ToString();
|
|
|
|
|
TB_u3.Text = u3.ToString();
|
|
|
|
|
TB_u4.Text = u4.ToString();
|
|
|
|
|
TB_u5.Text = u5.ToString();
|
|
|
|
|
TB_u6.Text = u6.ToString();
|
|
|
|
|
TB_u7.Text = u7.ToString();
|
2014-06-28 21:22:05 +00:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void B_Cancel_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|