Add gen3 roamer editor

Thanks BlackShark!
This commit is contained in:
Kurt 2017-10-10 18:48:14 -07:00
parent 79ede6a212
commit c3c4336d43
8 changed files with 638 additions and 14 deletions

View File

@ -10,14 +10,13 @@ public class Roamer3
public Roamer3(SAV3 sav)
{
SAV = sav;
Offset = sav.GetBlockOffset(4);
if (GameVersion.FRLG.Contains(SAV.Version))
Offset += 0x250; // 0x250 - FRLG
else
Offset += 0x35C; // 0x35C - RSE
IsGlitched = SAV.Version != GameVersion.E;
SAV = sav;
}
private uint IV32

View File

@ -31,7 +31,6 @@ private void InitializeComponent()
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAVEditor));
this.tabBoxMulti = new System.Windows.Forms.TabControl();
this.Tab_Box = new System.Windows.Forms.TabPage();
this.Box = new PKHeX.WinForms.Controls.BoxEditor();
this.Tab_PartyBattle = new System.Windows.Forms.TabPage();
this.PAN_BattleBox = new System.Windows.Forms.Panel();
this.PB_Locked = new System.Windows.Forms.PictureBox();
@ -110,6 +109,8 @@ private void InitializeComponent()
this.B_OpenFriendSafari = new System.Windows.Forms.Button();
this.B_OpenRTCEditor = new System.Windows.Forms.Button();
this.B_OpenUGSEditor = new System.Windows.Forms.Button();
this.B_Roamer = new System.Windows.Forms.Button();
this.Box = new PKHeX.WinForms.Controls.BoxEditor();
this.tabBoxMulti.SuspendLayout();
this.Tab_Box.SuspendLayout();
this.Tab_PartyBattle.SuspendLayout();
@ -174,17 +175,6 @@ private void InitializeComponent()
this.Tab_Box.Text = "Box";
this.Tab_Box.UseVisualStyleBackColor = true;
//
// Box
//
this.Box.AllowDrop = true;
this.Box.CurrentBox = -1;
this.Box.FlagIllegal = false;
this.Box.Location = new System.Drawing.Point(26, 7);
this.Box.M = null;
this.Box.Name = "Box";
this.Box.Size = new System.Drawing.Size(251, 185);
this.Box.TabIndex = 1;
//
// Tab_PartyBattle
//
this.Tab_PartyBattle.Controls.Add(this.PAN_BattleBox);
@ -782,6 +772,7 @@ private void InitializeComponent()
this.FLP_SAVtools.Controls.Add(this.B_OpenFriendSafari);
this.FLP_SAVtools.Controls.Add(this.B_OpenRTCEditor);
this.FLP_SAVtools.Controls.Add(this.B_OpenUGSEditor);
this.FLP_SAVtools.Controls.Add(this.B_Roamer);
this.FLP_SAVtools.Location = new System.Drawing.Point(6, 10);
this.FLP_SAVtools.Name = "FLP_SAVtools";
this.FLP_SAVtools.Size = new System.Drawing.Size(297, 88);
@ -1020,6 +1011,27 @@ private void InitializeComponent()
this.B_OpenUGSEditor.UseVisualStyleBackColor = true;
this.B_OpenUGSEditor.Click += new System.EventHandler(this.B_OpenUGSEditor_Click);
//
// B_Roamer
//
this.B_Roamer.Location = new System.Drawing.Point(189, 206);
this.B_Roamer.Name = "B_Roamer";
this.B_Roamer.Size = new System.Drawing.Size(87, 23);
this.B_Roamer.TabIndex = 30;
this.B_Roamer.Text = "Roamer";
this.B_Roamer.UseVisualStyleBackColor = true;
this.B_Roamer.Click += new System.EventHandler(this.B_Roamer_Click);
//
// Box
//
this.Box.AllowDrop = true;
this.Box.CurrentBox = -1;
this.Box.FlagIllegal = false;
this.Box.Location = new System.Drawing.Point(26, 7);
this.Box.M = null;
this.Box.Name = "Box";
this.Box.Size = new System.Drawing.Size(251, 185);
this.Box.TabIndex = 1;
//
// SAVEditor
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
@ -1155,5 +1167,6 @@ private void InitializeComponent()
private System.Windows.Forms.Button B_OpenRTCEditor;
public BoxEditor Box;
private System.Windows.Forms.Button B_OpenUGSEditor;
private System.Windows.Forms.Button B_Roamer;
}
}

View File

@ -517,6 +517,7 @@ private void B_SaveBoxBin_Click(object sender, EventArgs e)
private void B_OpenSecretBase_Click(object sender, EventArgs e) => new SAV_SecretBase(SAV).ShowDialog();
private void B_OpenZygardeCells_Click(object sender, EventArgs e) => new SAV_ZygardeCell(SAV).ShowDialog();
private void B_LinkInfo_Click(object sender, EventArgs e) => new SAV_Link6(SAV).ShowDialog();
private void B_Roamer_Click(object sender, EventArgs e) => new SAV_Roamer3(SAV).ShowDialog();
private void B_OpenEventFlags_Click(object sender, EventArgs e)
{
var form = SAV.Generation == 1 ? new SAV_EventReset1(SAV) as Form : new SAV_EventFlags(SAV);
@ -1003,6 +1004,7 @@ private void ToggleViewSubEditors(SaveFile sav)
B_OpenTrainerInfo.Enabled = B_OpenItemPouch.Enabled = sav.HasParty; // Box RS
B_OpenMiscEditor.Enabled = sav is SAV3 || sav is SAV4 || sav is SAV5;
B_Roamer.Enabled = sav is SAV3;
B_OpenHoneyTreeEditor.Enabled = sav.DP || sav.Pt;
B_OpenRTCEditor.Enabled = sav.RS || sav.E || sav.Generation == 2;

View File

@ -487,6 +487,9 @@
<metadata name="B_OpenUGSEditor.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="B_Roamer.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -305,6 +305,12 @@
<Compile Include="Subforms\Save Editors\Gen3\SAV_Misc3.Designer.cs">
<DependentUpon>SAV_Misc3.cs</DependentUpon>
</Compile>
<Compile Include="Subforms\Save Editors\Gen3\SAV_Roamer3.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Subforms\Save Editors\Gen3\SAV_Roamer3.Designer.cs">
<DependentUpon>SAV_Roamer3.cs</DependentUpon>
</Compile>
<Compile Include="Subforms\Save Editors\Gen3\SAV_RTC3.cs">
<SubType>Form</SubType>
</Compile>
@ -607,6 +613,9 @@
<EmbeddedResource Include="Subforms\Save Editors\Gen3\SAV_Misc3.resx">
<DependentUpon>SAV_Misc3.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Save Editors\Gen3\SAV_Roamer3.resx">
<DependentUpon>SAV_Roamer3.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Save Editors\Gen3\SAV_RTC3.resx">
<DependentUpon>SAV_RTC3.cs</DependentUpon>
</EmbeddedResource>

View File

@ -0,0 +1,316 @@
namespace PKHeX.WinForms
{
partial class SAV_Roamer3
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SAV_Roamer3));
this.B_Save = new System.Windows.Forms.Button();
this.B_Cancel = new System.Windows.Forms.Button();
this.TB_SPDIV = new System.Windows.Forms.MaskedTextBox();
this.TB_SPAIV = new System.Windows.Forms.MaskedTextBox();
this.TB_DEFIV = new System.Windows.Forms.MaskedTextBox();
this.TB_ATKIV = new System.Windows.Forms.MaskedTextBox();
this.TB_HPIV = new System.Windows.Forms.MaskedTextBox();
this.Label_HP = new System.Windows.Forms.Label();
this.Label_ATK = new System.Windows.Forms.Label();
this.Label_DEF = new System.Windows.Forms.Label();
this.Label_SPA = new System.Windows.Forms.Label();
this.Label_SPD = new System.Windows.Forms.Label();
this.Label_SPE = new System.Windows.Forms.Label();
this.TB_SPEIV = new System.Windows.Forms.MaskedTextBox();
this.TB_PID = new System.Windows.Forms.TextBox();
this.Label_PID = new System.Windows.Forms.Label();
this.CB_Species = new System.Windows.Forms.ComboBox();
this.Label_Species = new System.Windows.Forms.Label();
this.CHK_Shiny = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// B_Save
//
this.B_Save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.B_Save.Location = new System.Drawing.Point(193, 108);
this.B_Save.Name = "B_Save";
this.B_Save.Size = new System.Drawing.Size(75, 23);
this.B_Save.TabIndex = 73;
this.B_Save.Text = "Save";
this.B_Save.UseVisualStyleBackColor = true;
this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
//
// B_Cancel
//
this.B_Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.B_Cancel.Location = new System.Drawing.Point(112, 108);
this.B_Cancel.Name = "B_Cancel";
this.B_Cancel.Size = new System.Drawing.Size(75, 23);
this.B_Cancel.TabIndex = 72;
this.B_Cancel.Text = "Cancel";
this.B_Cancel.UseVisualStyleBackColor = true;
this.B_Cancel.Click += new System.EventHandler(this.B_Cancel_Click);
//
// TB_SPDIV
//
this.TB_SPDIV.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_SPDIV.Location = new System.Drawing.Point(60, 89);
this.TB_SPDIV.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.TB_SPDIV.Mask = "00";
this.TB_SPDIV.Name = "TB_SPDIV";
this.TB_SPDIV.Size = new System.Drawing.Size(22, 20);
this.TB_SPDIV.TabIndex = 78;
this.TB_SPDIV.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// TB_SPAIV
//
this.TB_SPAIV.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_SPAIV.Location = new System.Drawing.Point(60, 69);
this.TB_SPAIV.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.TB_SPAIV.Mask = "00";
this.TB_SPAIV.Name = "TB_SPAIV";
this.TB_SPAIV.Size = new System.Drawing.Size(22, 20);
this.TB_SPAIV.TabIndex = 77;
this.TB_SPAIV.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// TB_DEFIV
//
this.TB_DEFIV.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_DEFIV.Location = new System.Drawing.Point(60, 49);
this.TB_DEFIV.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.TB_DEFIV.Mask = "00";
this.TB_DEFIV.Name = "TB_DEFIV";
this.TB_DEFIV.Size = new System.Drawing.Size(22, 20);
this.TB_DEFIV.TabIndex = 76;
this.TB_DEFIV.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// TB_ATKIV
//
this.TB_ATKIV.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_ATKIV.Location = new System.Drawing.Point(60, 29);
this.TB_ATKIV.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.TB_ATKIV.Mask = "00";
this.TB_ATKIV.Name = "TB_ATKIV";
this.TB_ATKIV.Size = new System.Drawing.Size(22, 20);
this.TB_ATKIV.TabIndex = 75;
this.TB_ATKIV.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// TB_HPIV
//
this.TB_HPIV.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_HPIV.Location = new System.Drawing.Point(60, 9);
this.TB_HPIV.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.TB_HPIV.Mask = "00";
this.TB_HPIV.Name = "TB_HPIV";
this.TB_HPIV.Size = new System.Drawing.Size(22, 20);
this.TB_HPIV.TabIndex = 74;
this.TB_HPIV.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// Label_HP
//
this.Label_HP.Location = new System.Drawing.Point(9, 9);
this.Label_HP.Margin = new System.Windows.Forms.Padding(0);
this.Label_HP.Name = "Label_HP";
this.Label_HP.Size = new System.Drawing.Size(50, 21);
this.Label_HP.TabIndex = 80;
this.Label_HP.Text = "HP:";
this.Label_HP.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// Label_ATK
//
this.Label_ATK.Location = new System.Drawing.Point(9, 29);
this.Label_ATK.Margin = new System.Windows.Forms.Padding(0);
this.Label_ATK.Name = "Label_ATK";
this.Label_ATK.Size = new System.Drawing.Size(50, 21);
this.Label_ATK.TabIndex = 81;
this.Label_ATK.Text = "Atk:";
this.Label_ATK.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// Label_DEF
//
this.Label_DEF.Location = new System.Drawing.Point(9, 49);
this.Label_DEF.Margin = new System.Windows.Forms.Padding(0);
this.Label_DEF.Name = "Label_DEF";
this.Label_DEF.Size = new System.Drawing.Size(50, 21);
this.Label_DEF.TabIndex = 82;
this.Label_DEF.Text = "Def:";
this.Label_DEF.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// Label_SPA
//
this.Label_SPA.Location = new System.Drawing.Point(9, 69);
this.Label_SPA.Margin = new System.Windows.Forms.Padding(0);
this.Label_SPA.Name = "Label_SPA";
this.Label_SPA.Size = new System.Drawing.Size(50, 21);
this.Label_SPA.TabIndex = 83;
this.Label_SPA.Text = "SpA:";
this.Label_SPA.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// Label_SPD
//
this.Label_SPD.Location = new System.Drawing.Point(9, 89);
this.Label_SPD.Margin = new System.Windows.Forms.Padding(0);
this.Label_SPD.Name = "Label_SPD";
this.Label_SPD.Size = new System.Drawing.Size(50, 21);
this.Label_SPD.TabIndex = 84;
this.Label_SPD.Text = "SpD:";
this.Label_SPD.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// Label_SPE
//
this.Label_SPE.Location = new System.Drawing.Point(10, 109);
this.Label_SPE.Margin = new System.Windows.Forms.Padding(0);
this.Label_SPE.Name = "Label_SPE";
this.Label_SPE.Size = new System.Drawing.Size(50, 21);
this.Label_SPE.TabIndex = 85;
this.Label_SPE.Text = "Spe:";
this.Label_SPE.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// TB_SPEIV
//
this.TB_SPEIV.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_SPEIV.Location = new System.Drawing.Point(60, 109);
this.TB_SPEIV.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.TB_SPEIV.Mask = "00";
this.TB_SPEIV.Name = "TB_SPEIV";
this.TB_SPEIV.Size = new System.Drawing.Size(22, 20);
this.TB_SPEIV.TabIndex = 79;
this.TB_SPEIV.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// TB_PID
//
this.TB_PID.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_PID.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TB_PID.Location = new System.Drawing.Point(138, 58);
this.TB_PID.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0);
this.TB_PID.MaxLength = 8;
this.TB_PID.Name = "TB_PID";
this.TB_PID.Size = new System.Drawing.Size(60, 20);
this.TB_PID.TabIndex = 86;
this.TB_PID.Text = "12345678";
this.TB_PID.TextChanged += new System.EventHandler(this.TB_PID_TextChanged);
//
// Label_PID
//
this.Label_PID.AutoSize = true;
this.Label_PID.Location = new System.Drawing.Point(109, 60);
this.Label_PID.Margin = new System.Windows.Forms.Padding(0, 5, 0, 4);
this.Label_PID.Name = "Label_PID";
this.Label_PID.Size = new System.Drawing.Size(28, 13);
this.Label_PID.TabIndex = 87;
this.Label_PID.Text = "PID:";
this.Label_PID.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// CB_Species
//
this.CB_Species.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CB_Species.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_Species.FormattingEnabled = true;
this.CB_Species.Location = new System.Drawing.Point(112, 34);
this.CB_Species.Margin = new System.Windows.Forms.Padding(0);
this.CB_Species.Name = "CB_Species";
this.CB_Species.Size = new System.Drawing.Size(126, 21);
this.CB_Species.TabIndex = 88;
//
// Label_Species
//
this.Label_Species.AutoSize = true;
this.Label_Species.Location = new System.Drawing.Point(109, 17);
this.Label_Species.Margin = new System.Windows.Forms.Padding(0);
this.Label_Species.Name = "Label_Species";
this.Label_Species.Size = new System.Drawing.Size(48, 13);
this.Label_Species.TabIndex = 89;
this.Label_Species.Text = "Species:";
this.Label_Species.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// CHK_Shiny
//
this.CHK_Shiny.AutoSize = true;
this.CHK_Shiny.Enabled = false;
this.CHK_Shiny.Location = new System.Drawing.Point(138, 81);
this.CHK_Shiny.Name = "CHK_Shiny";
this.CHK_Shiny.Size = new System.Drawing.Size(58, 17);
this.CHK_Shiny.TabIndex = 90;
this.CHK_Shiny.Text = "Shiny?";
this.CHK_Shiny.UseVisualStyleBackColor = true;
//
// SAV_Roamer3
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(278, 143);
this.Controls.Add(this.CHK_Shiny);
this.Controls.Add(this.Label_Species);
this.Controls.Add(this.CB_Species);
this.Controls.Add(this.Label_PID);
this.Controls.Add(this.TB_PID);
this.Controls.Add(this.TB_SPEIV);
this.Controls.Add(this.Label_SPE);
this.Controls.Add(this.Label_SPD);
this.Controls.Add(this.TB_SPDIV);
this.Controls.Add(this.TB_SPAIV);
this.Controls.Add(this.Label_SPA);
this.Controls.Add(this.Label_DEF);
this.Controls.Add(this.TB_DEFIV);
this.Controls.Add(this.TB_ATKIV);
this.Controls.Add(this.Label_ATK);
this.Controls.Add(this.Label_HP);
this.Controls.Add(this.TB_HPIV);
this.Controls.Add(this.B_Save);
this.Controls.Add(this.B_Cancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(200, 150);
this.Name = "SAV_Roamer3";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Roamer Editor";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button B_Save;
private System.Windows.Forms.Button B_Cancel;
private System.Windows.Forms.MaskedTextBox TB_SPDIV;
private System.Windows.Forms.MaskedTextBox TB_SPAIV;
private System.Windows.Forms.MaskedTextBox TB_DEFIV;
private System.Windows.Forms.MaskedTextBox TB_ATKIV;
private System.Windows.Forms.MaskedTextBox TB_HPIV;
private System.Windows.Forms.Label Label_HP;
private System.Windows.Forms.Label Label_ATK;
private System.Windows.Forms.Label Label_DEF;
private System.Windows.Forms.Label Label_SPA;
private System.Windows.Forms.Label Label_SPD;
private System.Windows.Forms.Label Label_SPE;
private System.Windows.Forms.MaskedTextBox TB_SPEIV;
private System.Windows.Forms.TextBox TB_PID;
private System.Windows.Forms.Label Label_PID;
public System.Windows.Forms.ComboBox CB_Species;
private System.Windows.Forms.Label Label_Species;
private System.Windows.Forms.CheckBox CHK_Shiny;
}
}

View File

@ -0,0 +1,66 @@
using System;
using System.Linq;
using System.Windows.Forms;
using PKHeX.Core;
namespace PKHeX.WinForms
{
public partial class SAV_Roamer3 : Form
{
private readonly SaveFile Origin;
private readonly SAV3 SAV;
private readonly Roamer3 Reader;
public SAV_Roamer3(SaveFile sav)
{
SAV = (SAV3)(Origin = sav).Clone();
Reader = new Roamer3(SAV);
InitializeComponent();
WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
CB_Species.DisplayMember = "Text";
CB_Species.ValueMember = "Value";
CB_Species.DataSource = new BindingSource(GameInfo.SpeciesDataSource.Where(id => id.Value <= SAV.MaxSpeciesID).ToList(), null);
LoadData();
}
private void LoadData()
{
TB_PID.Text = $"{Reader.PID:X8}";
CHK_Shiny.Checked = Reader.IsShiny(Reader.PID);
CB_Species.SelectedValue = Reader.Species;
var IVs = Reader.IVs;
var iv = new[] {TB_HPIV, TB_ATKIV, TB_DEFIV, TB_SPEIV, TB_SPAIV, TB_SPDIV};
for (int i = 0; i < iv.Length; i++)
iv[i].Text = IVs[i].ToString();
}
private void SaveData()
{
int[] IVs = new int[6];
var iv = new[] { TB_HPIV, TB_ATKIV, TB_DEFIV, TB_SPEIV, TB_SPAIV, TB_SPDIV };
for (int i = 0; i < iv.Length; i++)
IVs[i] = Util.ToInt32(iv[i].Text);
Reader.PID = Util.GetHexValue(TB_PID.Text);
Reader.Species = WinFormsUtil.GetIndex(CB_Species);
}
private void B_Save_Click(object sender, EventArgs e)
{
SaveData();
Close();
}
private void B_Cancel_Click(object sender, EventArgs e)
{
Close();
}
private void TB_PID_TextChanged(object sender, EventArgs e)
{
var pid = Util.GetHexValue(TB_PID.Text);
CHK_Shiny.Checked = Reader.IsShiny(pid);
}
}
}

View File

@ -0,0 +1,216 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAE
AAAAAAAAAAAAAAAAAAAAAAAAIyMjAQAAAAALCwsPJiYmJysrKycqKionKSkpJykpKScpKSknKioqJyoq
KicrKysnJycnJw0ODQ8AAAAAJiYmAQAAAABpaWlHq6ur17+/v+6+vr7svr6+7b6+vu2+vr7tvr6+7b6+
vu2+vr7tvr6+7L+/v+6rq6vXampqSAAAAAAoKSgXvr++3eLi4v/g4OD94eHh/+Hh4f/i4uL/4uLi/+Li
4v/i4uL/4eHh/+Dh4P/g4OD94uLi/7+/v90sLCwXfn5+PNna2frg4OD/39/f/uHh4f7h4eH+39/f/uDg
4P7g4OD+39/f/uHh4f7h4OH+39/f/t/g3//a2tr6g4ODPoOCgz7X19f64+Pj/+Li4v7k5OT/4+Tj//Ly
8v/19fX/9PT0//T09P/k5OT/5OTk/+Pj4/7j4+P/19jX+4qLikCD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