diff --git a/Misc/CodeGenerator.Designer.cs b/Misc/CodeGenerator.Designer.cs
deleted file mode 100644
index 712023f2a..000000000
--- a/Misc/CodeGenerator.Designer.cs
+++ /dev/null
@@ -1,334 +0,0 @@
-namespace PKHeX
-{
- partial class CodeGenerator
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CodeGenerator));
- this.RTB_Code = new System.Windows.Forms.RichTextBox();
- this.TB_Write = new System.Windows.Forms.TextBox();
- this.L_Write = new System.Windows.Forms.Label();
- this.L_Source = new System.Windows.Forms.Label();
- this.CB_Source = new System.Windows.Forms.ComboBox();
- this.B_Save = new System.Windows.Forms.Button();
- this.L_Box = new System.Windows.Forms.Label();
- this.L_Slot = new System.Windows.Forms.Label();
- this.CB_Slot = new System.Windows.Forms.ComboBox();
- this.CB_Box = new System.Windows.Forms.ComboBox();
- this.B_Load = new System.Windows.Forms.Button();
- this.B_Add = new System.Windows.Forms.Button();
- this.B_Clear = new System.Windows.Forms.Button();
- this.B_Copy = new System.Windows.Forms.Button();
- this.B_Diff = new System.Windows.Forms.Button();
- this.CHK_Break = new System.Windows.Forms.CheckBox();
- this.B_Paste = new System.Windows.Forms.Button();
- this.B_Import = new System.Windows.Forms.Button();
- this.SuspendLayout();
- //
- // RTB_Code
- //
- this.RTB_Code.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.RTB_Code.Location = new System.Drawing.Point(8, 52);
- this.RTB_Code.Name = "RTB_Code";
- this.RTB_Code.ReadOnly = true;
- this.RTB_Code.Size = new System.Drawing.Size(160, 190);
- this.RTB_Code.TabIndex = 0;
- this.RTB_Code.Text = "01234567 01234567 ";
- //
- // TB_Write
- //
- this.TB_Write.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.TB_Write.Location = new System.Drawing.Point(29, 105);
- this.TB_Write.Name = "TB_Write";
- this.TB_Write.Size = new System.Drawing.Size(65, 20);
- this.TB_Write.TabIndex = 1;
- this.TB_Write.Text = "01234567";
- this.TB_Write.Visible = false;
- //
- // L_Write
- //
- this.L_Write.AutoSize = true;
- this.L_Write.Location = new System.Drawing.Point(26, 89);
- this.L_Write.Name = "L_Write";
- this.L_Write.Size = new System.Drawing.Size(66, 13);
- this.L_Write.TabIndex = 2;
- this.L_Write.Text = "Write Offset:";
- this.L_Write.Visible = false;
- //
- // L_Source
- //
- this.L_Source.AutoSize = true;
- this.L_Source.Location = new System.Drawing.Point(26, 133);
- this.L_Source.Name = "L_Source";
- this.L_Source.Size = new System.Drawing.Size(70, 13);
- this.L_Source.TabIndex = 5;
- this.L_Source.Text = "Data Source:";
- this.L_Source.Visible = false;
- //
- // CB_Source
- //
- this.CB_Source.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.CB_Source.FormattingEnabled = true;
- this.CB_Source.Items.AddRange(new object[] {
- "Loaded EKX (Tabs)",
- "Box EKX",
- "Wonder Card"});
- this.CB_Source.Location = new System.Drawing.Point(29, 148);
- this.CB_Source.Name = "CB_Source";
- this.CB_Source.Size = new System.Drawing.Size(132, 21);
- this.CB_Source.TabIndex = 6;
- this.CB_Source.Visible = false;
- //
- // B_Save
- //
- this.B_Save.Location = new System.Drawing.Point(91, 189);
- this.B_Save.Name = "B_Save";
- this.B_Save.Size = new System.Drawing.Size(69, 23);
- this.B_Save.TabIndex = 9;
- this.B_Save.Text = "Save Code";
- this.B_Save.UseVisualStyleBackColor = true;
- this.B_Save.Visible = false;
- this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
- //
- // L_Box
- //
- this.L_Box.AutoSize = true;
- this.L_Box.Location = new System.Drawing.Point(26, 173);
- this.L_Box.Name = "L_Box";
- this.L_Box.Size = new System.Drawing.Size(28, 13);
- this.L_Box.TabIndex = 10;
- this.L_Box.Text = "Box:";
- this.L_Box.Visible = false;
- //
- // L_Slot
- //
- this.L_Slot.AutoSize = true;
- this.L_Slot.Location = new System.Drawing.Point(95, 173);
- this.L_Slot.Name = "L_Slot";
- this.L_Slot.Size = new System.Drawing.Size(28, 13);
- this.L_Slot.TabIndex = 11;
- this.L_Slot.Text = "Slot:";
- this.L_Slot.Visible = false;
- //
- // CB_Slot
- //
- this.CB_Slot.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.CB_Slot.FormattingEnabled = true;
- this.CB_Slot.Items.AddRange(new object[] {
- "Loaded EKX (Tabs)",
- "Box EKX ",
- "Wonder Card"});
- this.CB_Slot.Location = new System.Drawing.Point(126, 169);
- this.CB_Slot.Name = "CB_Slot";
- this.CB_Slot.Size = new System.Drawing.Size(35, 21);
- this.CB_Slot.TabIndex = 12;
- this.CB_Slot.Visible = false;
- //
- // CB_Box
- //
- this.CB_Box.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.CB_Box.FormattingEnabled = true;
- this.CB_Box.Items.AddRange(new object[] {
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10",
- "11",
- "12",
- "13",
- "14",
- "15",
- "16",
- "17",
- "18",
- "19",
- "20",
- "21",
- "22",
- "23",
- "24",
- "25",
- "26",
- "27",
- "28",
- "29",
- "30",
- "31"});
- this.CB_Box.Location = new System.Drawing.Point(59, 169);
- this.CB_Box.Name = "CB_Box";
- this.CB_Box.Size = new System.Drawing.Size(35, 21);
- this.CB_Box.TabIndex = 13;
- this.CB_Box.Visible = false;
- //
- // B_Load
- //
- this.B_Load.Location = new System.Drawing.Point(12, 191);
- this.B_Load.Name = "B_Load";
- this.B_Load.Size = new System.Drawing.Size(69, 23);
- this.B_Load.TabIndex = 14;
- this.B_Load.Text = "Load Code";
- this.B_Load.UseVisualStyleBackColor = true;
- this.B_Load.Visible = false;
- this.B_Load.Click += new System.EventHandler(this.B_Load_Click);
- //
- // B_Add
- //
- this.B_Add.Location = new System.Drawing.Point(100, 103);
- this.B_Add.Name = "B_Add";
- this.B_Add.Size = new System.Drawing.Size(60, 23);
- this.B_Add.TabIndex = 15;
- this.B_Add.Text = "Add ↓";
- this.B_Add.UseVisualStyleBackColor = true;
- this.B_Add.Visible = false;
- this.B_Add.Click += new System.EventHandler(this.B_Add_Click);
- //
- // B_Clear
- //
- this.B_Clear.Location = new System.Drawing.Point(92, 128);
- this.B_Clear.Name = "B_Clear";
- this.B_Clear.Size = new System.Drawing.Size(69, 23);
- this.B_Clear.TabIndex = 16;
- this.B_Clear.Text = "Clear All";
- this.B_Clear.UseVisualStyleBackColor = true;
- this.B_Clear.Visible = false;
- this.B_Clear.Click += new System.EventHandler(this.B_Clear_Click);
- //
- // B_Copy
- //
- this.B_Copy.Location = new System.Drawing.Point(97, 11);
- this.B_Copy.Name = "B_Copy";
- this.B_Copy.Size = new System.Drawing.Size(69, 23);
- this.B_Copy.TabIndex = 17;
- this.B_Copy.Text = "Copy";
- this.B_Copy.UseVisualStyleBackColor = true;
- this.B_Copy.Click += new System.EventHandler(this.B_Copy_Click);
- //
- // B_Diff
- //
- this.B_Diff.Location = new System.Drawing.Point(11, 11);
- this.B_Diff.Name = "B_Diff";
- this.B_Diff.Size = new System.Drawing.Size(69, 23);
- this.B_Diff.TabIndex = 18;
- this.B_Diff.Text = "Create Diff";
- this.B_Diff.UseVisualStyleBackColor = true;
- this.B_Diff.Click += new System.EventHandler(this.B_Diff_Click);
- //
- // CHK_Break
- //
- this.CHK_Break.AutoSize = true;
- this.CHK_Break.Checked = true;
- this.CHK_Break.CheckState = System.Windows.Forms.CheckState.Checked;
- this.CHK_Break.Location = new System.Drawing.Point(8, 35);
- this.CHK_Break.Name = "CHK_Break";
- this.CHK_Break.Size = new System.Drawing.Size(156, 17);
- this.CHK_Break.TabIndex = 19;
- this.CHK_Break.Text = "Line Break for Simple Mode";
- this.CHK_Break.UseVisualStyleBackColor = true;
- //
- // B_Paste
- //
- this.B_Paste.Location = new System.Drawing.Point(8, 249);
- this.B_Paste.Name = "B_Paste";
- this.B_Paste.Size = new System.Drawing.Size(69, 23);
- this.B_Paste.TabIndex = 20;
- this.B_Paste.Text = "Paste";
- this.B_Paste.UseVisualStyleBackColor = true;
- this.B_Paste.Click += new System.EventHandler(this.B_Paste_Click);
- //
- // B_Import
- //
- this.B_Import.Location = new System.Drawing.Point(99, 249);
- this.B_Import.Name = "B_Import";
- this.B_Import.Size = new System.Drawing.Size(69, 23);
- this.B_Import.TabIndex = 21;
- this.B_Import.Text = "Import";
- this.B_Import.UseVisualStyleBackColor = true;
- this.B_Import.Click += new System.EventHandler(this.B_Import_Click);
- //
- // CodeGenerator
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(176, 282);
- this.Controls.Add(this.B_Import);
- this.Controls.Add(this.B_Paste);
- this.Controls.Add(this.CHK_Break);
- this.Controls.Add(this.B_Diff);
- this.Controls.Add(this.B_Copy);
- this.Controls.Add(this.B_Clear);
- this.Controls.Add(this.B_Add);
- this.Controls.Add(this.B_Load);
- this.Controls.Add(this.CB_Box);
- this.Controls.Add(this.CB_Slot);
- this.Controls.Add(this.L_Slot);
- this.Controls.Add(this.L_Box);
- this.Controls.Add(this.B_Save);
- this.Controls.Add(this.CB_Source);
- this.Controls.Add(this.L_Source);
- this.Controls.Add(this.L_Write);
- this.Controls.Add(this.TB_Write);
- this.Controls.Add(this.RTB_Code);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
- this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "CodeGenerator";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "CodeGenerator";
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.RichTextBox RTB_Code;
- private System.Windows.Forms.TextBox TB_Write;
- private System.Windows.Forms.Label L_Write;
- private System.Windows.Forms.Label L_Source;
- private System.Windows.Forms.ComboBox CB_Source;
- private System.Windows.Forms.Button B_Save;
- private System.Windows.Forms.Label L_Box;
- private System.Windows.Forms.Label L_Slot;
- private System.Windows.Forms.ComboBox CB_Slot;
- private System.Windows.Forms.ComboBox CB_Box;
- private System.Windows.Forms.Button B_Load;
- private System.Windows.Forms.Button B_Add;
- private System.Windows.Forms.Button B_Clear;
- private System.Windows.Forms.Button B_Copy;
- private System.Windows.Forms.Button B_Diff;
- private System.Windows.Forms.CheckBox CHK_Break;
- private System.Windows.Forms.Button B_Paste;
- private System.Windows.Forms.Button B_Import;
- }
-}
\ No newline at end of file
diff --git a/Misc/CodeGenerator.cs b/Misc/CodeGenerator.cs
deleted file mode 100644
index dc4750fb2..000000000
--- a/Misc/CodeGenerator.cs
+++ /dev/null
@@ -1,320 +0,0 @@
-using System;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Windows.Forms;
-
-namespace PKHeX
-{
- public partial class CodeGenerator : Form
- {
- byte[] newdata = new byte[232];
-
- readonly byte[] tabdata;
- public CodeGenerator(byte[] formdata)
- {
- tabdata = formdata;
- InitializeComponent();
- CenterToParent();
- RTB_Code.Clear();
- TB_Write.Clear();
- CB_Box.Items.Clear();
- for (int i = 1; i <= 31; i++)
- CB_Box.Items.Add(i.ToString());
-
- CB_Source.SelectedIndex = 0;
- CB_Slot.SelectedIndex = 0;
- CB_Box.SelectedIndex = 0;
- }
- private bool loaddata()
- {
- if (CB_Source.SelectedIndex == 0)
- {
- if (tabdata != null)
- {
- byte[] pkx = tabdata;
- newdata = new byte[232];
- Array.Copy(PKX.encryptArray(pkx), newdata, 232);
- }
- else
- return false;
-
- }
- else if (CB_Source.SelectedIndex == 1)
- {
- newdata = new byte[0xE8];
- Array.Copy(Main.SAV.Data,
- Main.SAV.Box // Box Offset
- + CB_Box.SelectedIndex*232*30 // Box Shift
- + CB_Slot.SelectedIndex * 232, // Slot Shift
- newdata, 0, 0xE8);
-
- if (!newdata.SequenceEqual(new byte[0xE8])) return true;
-
- System.Media.SystemSounds.Exclamation.Play();
- return false;
- }
- else if (CB_Source.SelectedIndex == 2)
- {
- // Wondercard
- newdata = new byte[0x108];
- // Wondercard #
- int index = CB_Slot.SelectedIndex;
- // copy from save, the chosen wondercard offset, to new data
- Array.Copy(Main.SAV.Data, Main.SAV.WondercardData + index * 0x108, newdata, 0, 0x108);
- byte[] zerodata = new byte[0x108];
- if (!newdata.SequenceEqual(zerodata)) return true;
-
- System.Media.SystemSounds.Exclamation.Play();
- return false;
- }
- return true;
- }
-
- private void B_Add_Click(object sender, EventArgs e)
- {
- // Add the new code to the textbox.
- if (!loaddata()) return;
- uint writeoffset = Util.getHEXval(TB_Write.Text);
-
- for (int i = 0; i < newdata.Length / 4; i++)
- {
- RTB_Code.AppendText((writeoffset + i * 4 + 0x20000000).ToString("X8") + " ");
- RTB_Code.AppendText(BitConverter.ToUInt32(newdata,i*4).ToString("X8") + Environment.NewLine);
- }
- }
- private void B_Clear_Click(object sender, EventArgs e)
- {
- RTB_Code.Clear();
- }
- private void B_Load_Click(object sender, EventArgs e)
- {
- OpenFileDialog ofd = new OpenFileDialog {Filter = "Code File|*.bin"};
- if (ofd.ShowDialog() != DialogResult.OK) return;
-
- string path = ofd.FileName;
- byte[] ncf = File.ReadAllBytes(path);
- uint length = BitConverter.ToUInt32(ncf, 0);
-
- if (ncf.Length != length + 4)
- {
- Util.Error("Not a valid code file.");
- return;
- }
- if (RTB_Code.Text.Length > 0)
- {
- DialogResult ld = Util.Prompt(MessageBoxButtons.YesNo, "Replace current code?");
- if (ld == DialogResult.Yes)
- RTB_Code.Clear();
- else if (ld != DialogResult.No)
- return;
- }
- for (int i = 4; i <= ncf.Length-12; i+=12)
- {
- RTB_Code.AppendText(BitConverter.ToUInt32(ncf, i + 0 * 4).ToString("X8") + " ");
- RTB_Code.AppendText(BitConverter.ToUInt32(ncf, i + 1 * 4).ToString("X8") + " ");
- RTB_Code.AppendText(BitConverter.ToUInt32(ncf, i + 2 * 4).ToString("X8") + Environment.NewLine);
- }
- }
- private void B_Save_Click(object sender, EventArgs e)
- {
- // Gotta read in the textbox.
- if (RTB_Code.Text.Length < 1) return;
-
- byte[] ncf = new byte[4 + (RTB_Code.Lines.Length-1)*3*4];
- BitConverter.GetBytes(ncf.Length - 4).CopyTo(ncf, 4);
-
- for (int i = 0; i < RTB_Code.Lines.Length-1; i++)
- {
- string line = RTB_Code.Lines[i];
- string[] rip = line.Split(new[] {" "}, StringSplitOptions.None);
-
- // Write the 3 u32's to an array.
- BitConverter.GetBytes(uint.Parse(rip[0], NumberStyles.HexNumber)).CopyTo(ncf,4+i*12+0);
- BitConverter.GetBytes(uint.Parse(rip[1], NumberStyles.HexNumber)).CopyTo(ncf,4+i*12+4);
- BitConverter.GetBytes(uint.Parse(rip[2], NumberStyles.HexNumber)).CopyTo(ncf,4+i*12+8);
- }
-
- SaveFileDialog sfd = new SaveFileDialog {FileName = "code.bin", Filter = "Code File|*.bin"};
- if (sfd.ShowDialog() != DialogResult.OK) return;
-
- string path = sfd.FileName;
- if (File.Exists(path))
- {
- // File already exists, save a .bak
- byte[] backupfile = File.ReadAllBytes(path);
- File.WriteAllBytes(path + ".bak", backupfile);
- }
- File.WriteAllBytes(path, ncf);
- }
- private void B_Copy_Click(object sender, EventArgs e)
- {
- if (RTB_Code.Text.Length > 0)
- Clipboard.SetText(RTB_Code.Text);
- else
- {
- B_Diff.PerformClick();
- try
- {
- Clipboard.SetText(RTB_Code.Text);
- Util.Alert(
- "Code generated and copied to clipboard!",
- "Next time click [Create Diff] first.");
- }
- catch
- {
- Util.Alert(
- "No code created!",
- "Click [Create Diff], then make sure that data appears in the Text Box below. If no code appears, then you didn't save your changes.",
- "Be sure to Set the Pokemon you edited back into a Box/Party slot!");
- }
- }
- }
- private void B_Diff_Click(object sender, EventArgs e)
- {
- string result = "";
- RTB_Code.Clear();
- byte[] cybersav = Main.SAV.BAK;
- byte[] newcyber = Main.SAV.Data;
-
- int boxoffset = Main.SAV.Box;
-
- int lines = 0; // 65400
- for (int i = 0; i < newcyber.Length - 0x200; i += 4)
- {
- // Skip Party and Boxes
- if (i == Main.SAV.Party) i += 260 * 6 + 4; // +4 to skip over party count
- if (i == Main.SAV.Box) i += 232 * 30 * 31;
- if (BitConverter.ToUInt32(cybersav, i) == BitConverter.ToUInt32(newcyber, i)) continue;
-
- result += (0x20000000 + i).ToString("X8") + " ";
- result += BitConverter.ToUInt32(newcyber, i).ToString("X8") + Environment.NewLine;
-
- lines++;
- if ((lines % 128 == 0) && CHK_Break.Checked)
- {
- result +=
- Environment.NewLine +
- "--- Segment " + (lines / 128 + 1) + " ---" +
- Environment.NewLine + Environment.NewLine;
- }
- if (lines > 10000) goto toomany;
- }
-
- // Loop Through Party
- for (int i = 0x14200; i < 0x14200 + 260 * 6; i+= 260)
- {
- byte[] bytes = new byte[260]; Array.Copy(newcyber, i, bytes, 0, 260);
- byte[] olddata = new byte[260]; Array.Copy(cybersav, i, olddata, 0, 260);
- if (bytes.SequenceEqual(olddata)) continue;
-
- for (int z = 0; z < bytes.Length; z += 4)
- {
- result += (0x20000000 + i + z).ToString("X8") + " ";
- result += BitConverter.ToUInt32(bytes, z).ToString("X8") + Environment.NewLine;
-
- lines++;
- if (lines % 128 == 0 && CHK_Break.Checked)
- {
- result +=
- Environment.NewLine +
- $"--- Segment {lines / 128 + 1} ---" +
- Environment.NewLine + Environment.NewLine;
- }
- if (lines > 10000) goto toomany;
- }
- }
-
- // Fix Party Count if Necessary
- if (cybersav[0x14818] != newcyber[0x14818])
- {
- result += (0x00000000 + 0x14818).ToString("X8") + " ";
- result += newcyber[0x14818].ToString("X8") + Environment.NewLine;
-
- lines++;
- if ((lines % 128 == 0) && CHK_Break.Checked)
- {
- result +=
- Environment.NewLine +
- $"--- Segment {lines / 128 + 1} ---" +
- Environment.NewLine + Environment.NewLine;
- }
- if (lines > 10000) goto toomany;
- }
-
- // Loop Through Boxes
- for (int i = boxoffset; i < boxoffset + 232 * 30 * 31; i += 232)
- {
- byte[] bytes = new byte[232]; Array.Copy(newcyber, i, bytes, 0, 232);
- byte[] olddata = new byte[232]; Array.Copy(cybersav, i, olddata, 0, 232);
- if (bytes.SequenceEqual(olddata)) continue;
-
- for (int z = 0; z < bytes.Length; z += 4)
- {
- result += (0x20000000 + i + z).ToString("X8") + " ";
- result += BitConverter.ToUInt32(bytes, z).ToString("X8") + Environment.NewLine;
-
- lines++;
- if ((lines % 128 == 0) && CHK_Break.Checked)
- {
- result +=
- Environment.NewLine +
- $"--- Segment {lines / 128 + 1} ---" +
- Environment.NewLine + Environment.NewLine;
- }
- if (lines > 10000) goto toomany;
- }
- }
-
- if ((lines / 128 > 0) && CHK_Break.Checked)
- Util.Alert($"{1 + lines/128} Code Segments.", $"{lines} Lines.");
-
- RTB_Code.Text = result;
- return;
-
- toomany:
- Util.Alert("Too many differences detected.", "Export your save instead.");
- }
-
- // Import
- public byte[] returnArray { get; set; }
- private void B_Paste_Click(object sender, EventArgs e)
- {
- RTB_Code.Text = Clipboard.GetText();
- }
- private void B_Import_Click(object sender, EventArgs e)
- {
- // Gotta read in the textbox.
- if (RTB_Code.Text.Length < 1) return;
- byte[] data = new byte[0];
- // Get Actual Lines
- foreach (string line in RTB_Code.Lines)
- {
- if (line.Length <= 0) continue;
-
- if (line.Length <= 2 * 8 && line.Length > 2 * 8 + 2)
- { Util.Error("Invalid code pasted (Type)"); return; }
-
- try
- {
- // Grab Line Data
- string[] rip = line.Split(new[] { " " }, StringSplitOptions.None);
- Array.Resize(ref data, data.Length + 4);
- BitConverter.GetBytes(uint.Parse(rip[1], NumberStyles.HexNumber)).CopyTo(data, data.Length - 4);
- }
- catch (Exception x)
- { Util.Error("Invalid code pasted (Content):", x.ToString()); return; }
- }
- // Go over the data
- if ((data.Length == 232 - 4) || (data.Length == 260 - 4))
- {
- Array.Resize(ref data, data.Length + 4);
- Array.Copy(data, 0, data, 4, data.Length);
- data[0] = data[1] = data[2] = data[3] = 0;
- }
- if ((data.Length == 232) || (data.Length == 260))
- { returnArray = data; Close(); }
- else { Util.Error("Invalid code pasted (Length)"); }
- }
- }
-}
diff --git a/Misc/CodeGenerator.resx b/Misc/CodeGenerator.resx
deleted file mode 100644
index 603f660be..000000000
--- a/Misc/CodeGenerator.resx
+++ /dev/null
@@ -1,216 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
-
-
- 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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Vyv8WFsv/FhbM/xYWzP8WFsz/FhbN/xcXzf8XF83/FxfN/xcXzv8XF87/FxfO/xcX
- zv8XF87/FxfN/xcXzf8WFs3/FhbM/xYWzP8WFsz/FhbL/xUVyv8UFMj/GBjJ/yYmeogWFnYCAAAAAAAA
- AAAAAAAAGBh1BzMzk50kJNP+FxfK/xgYzP8YGMz/GBjN/xgYzf8YGM3/GBjN/xgYzf8ZGc7/GRnO/xkZ
- zv8ZGc7/GRnO/xkZzv8YGM3/GBjN/xgYzf8YGM3/GBjN/xgYzP8YGMz/FxfK/yMj0v4zM5WfFBRkBwAA
- AAAAAAAAAAAAAAAAAAAAAAAAHBx7Ay0tdkg3N5emMTGpxSwsp8gsLKfILCynyCwsp8gsLKfILCynyCws
- p8gsLKfILCynyCwsp8gsLKfILCynyCwsp8gsLKfILCynyCwsp8gsLKfILCynyDExqcU2NpenLi54Shsb
- ewMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
- AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////8AAAD+AAAAfAAAADwAAAA8AAAAPAAAADwAAAA8AA
- AAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AA
- AAPAAAADwAAAA8AAAAPAAAAD4AAAB/gAAB//////
-
-
-
\ No newline at end of file
diff --git a/PKHeX.csproj b/PKHeX.csproj
index f82f756af..3ebc1d7ec 100644
--- a/PKHeX.csproj
+++ b/PKHeX.csproj
@@ -100,12 +100,6 @@
About.cs
-
- Form
-
-
- CodeGenerator.cs
-
Form
@@ -250,9 +244,6 @@
About.cs
-
- CodeGenerator.cs
-
f1-Main.cs
Designer
diff --git a/PKX/f1-Main.Designer.cs b/PKX/f1-Main.Designer.cs
index 3c4305f6c..56bd6582f 100644
--- a/PKX/f1-Main.Designer.cs
+++ b/PKX/f1-Main.Designer.cs
@@ -231,7 +231,6 @@ public void InitializeComponent()
this.Menu_ShowdownExportParty = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_ShowdownExportBattleBox = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_CyberGadget = new System.Windows.Forms.ToolStripMenuItem();
- this.Menu_CodeGenerator = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_OpenTemp = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_OpenCache = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_Data = new System.Windows.Forms.ToolStripMenuItem();
@@ -2848,20 +2847,12 @@ public void InitializeComponent()
// Menu_CyberGadget
//
this.Menu_CyberGadget.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.Menu_CodeGenerator,
this.Menu_OpenTemp,
this.Menu_OpenCache});
this.Menu_CyberGadget.Name = "Menu_CyberGadget";
this.Menu_CyberGadget.Size = new System.Drawing.Size(143, 22);
this.Menu_CyberGadget.Text = "CyberGadget";
//
- // Menu_CodeGenerator
- //
- this.Menu_CodeGenerator.Name = "Menu_CodeGenerator";
- this.Menu_CodeGenerator.Size = new System.Drawing.Size(175, 22);
- this.Menu_CodeGenerator.Text = "Code Generator";
- this.Menu_CodeGenerator.Click += new System.EventHandler(this.mainMenuCodeGen);
- //
// Menu_OpenTemp
//
this.Menu_OpenTemp.Name = "Menu_OpenTemp";
@@ -4844,7 +4835,6 @@ public void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem Menu_ShowdownExportParty;
private System.Windows.Forms.ToolStripMenuItem Menu_ShowdownExportBattleBox;
private System.Windows.Forms.ToolStripMenuItem Menu_CyberGadget;
- private System.Windows.Forms.ToolStripMenuItem Menu_CodeGenerator;
private System.Windows.Forms.ToolStripMenuItem Menu_OpenTemp;
private System.Windows.Forms.ToolStripMenuItem Menu_OpenCache;
private System.Windows.Forms.ToolStripMenuItem Menu_Data;
diff --git a/PKX/f1-Main.cs b/PKX/f1-Main.cs
index bf2ab355e..3812eb70d 100644
--- a/PKX/f1-Main.cs
+++ b/PKX/f1-Main.cs
@@ -290,24 +290,6 @@ private void mainMenuAbout(object sender, EventArgs e)
new About().ShowDialog();
}
// Sub Menu Options
- private void mainMenuCodeGen(object sender, EventArgs e)
- {
- // Open Code Generator
- CodeGenerator CodeGen = new CodeGenerator(verifiedPKX() ? preparepkx().Data : null);
- CodeGen.ShowDialog();
-
- byte[] data = CodeGen.returnArray;
- if (data == null) return;
- byte[] decdata = PKX.decryptArray(data);
- Array.Copy(decdata, pk6.Data, PK6.SIZE_STORED);
- try { populateFields(pk6); }
- catch
- {
- Array.Copy(new byte[PK6.SIZE_STORED], pk6.Data, PK6.SIZE_STORED);
- populateFields(pk6);
- Util.Error("Imported code did not decrypt properly", "Please verify that what you imported was correct.");
- }
- }
private void mainMenuBoxReport(object sender, EventArgs e)
{
var z = Application.OpenForms.Cast