Code rearranging and Personal Redesign

This commit is contained in:
Kurt
2015-01-05 22:30:42 -08:00
parent 7f7f2fe9c0
commit a74422a523
3 changed files with 220 additions and 248 deletions

View File

@@ -33,6 +33,7 @@ private void InitializeComponent()
this.L_Species_Precursor = new System.Windows.Forms.Label();
this.TC_Pokemon = new System.Windows.Forms.TabControl();
this.TP_General = new System.Windows.Forms.TabPage();
this.PB_MonSprite = new System.Windows.Forms.PictureBox();
this.TB_RawColor = new System.Windows.Forms.TextBox();
this.TB_CatchRate = new System.Windows.Forms.MaskedTextBox();
this.TB_Stage = new System.Windows.Forms.TextBox();
@@ -61,7 +62,6 @@ private void InitializeComponent()
this.label14 = new System.Windows.Forms.Label();
this.TB_BaseExp = new System.Windows.Forms.MaskedTextBox();
this.label13 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.TB_HatchCycles = new System.Windows.Forms.MaskedTextBox();
this.label11 = new System.Windows.Forms.Label();
this.TB_Friendship = new System.Windows.Forms.MaskedTextBox();
@@ -99,36 +99,34 @@ private void InitializeComponent()
this.label3 = new System.Windows.Forms.Label();
this.L_BaseStats = new System.Windows.Forms.Label();
this.TP_MoveTutors = new System.Windows.Forms.TabPage();
this.PB_MonSprite2 = new System.Windows.Forms.PictureBox();
this.Lbl_OrasTutors = new System.Windows.Forms.Label();
this.label27 = new System.Windows.Forms.Label();
this.label26 = new System.Windows.Forms.Label();
this.CLB_OrasTutors = new System.Windows.Forms.CheckedListBox();
this.CLB_MoveTutors = new System.Windows.Forms.CheckedListBox();
this.CLB_TMHM = new System.Windows.Forms.CheckedListBox();
this.PB_MonSprite = new System.Windows.Forms.PictureBox();
this.TC_Pokemon.SuspendLayout();
this.TP_General.SuspendLayout();
this.TP_MoveTutors.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PB_MonSprite2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PB_MonSprite)).BeginInit();
this.TP_MoveTutors.SuspendLayout();
this.SuspendLayout();
//
// L_Mode
//
this.L_Mode.AutoSize = true;
this.L_Mode.Location = new System.Drawing.Point(718, 15);
this.L_Mode.Location = new System.Drawing.Point(395, 9);
this.L_Mode.Name = "L_Mode";
this.L_Mode.Size = new System.Drawing.Size(64, 13);
this.L_Mode.TabIndex = 1;
this.L_Mode.Text = "Mode: ????";
this.L_Mode.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// CB_Species
//
this.CB_Species.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_Species.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_Species.FormattingEnabled = true;
this.CB_Species.Location = new System.Drawing.Point(119, 12);
this.CB_Species.Location = new System.Drawing.Point(107, 12);
this.CB_Species.Name = "CB_Species";
this.CB_Species.Size = new System.Drawing.Size(160, 21);
this.CB_Species.TabIndex = 2;
@@ -137,7 +135,7 @@ private void InitializeComponent()
// L_Species_Precursor
//
this.L_Species_Precursor.AutoSize = true;
this.L_Species_Precursor.Location = new System.Drawing.Point(25, 15);
this.L_Species_Precursor.Location = new System.Drawing.Point(13, 15);
this.L_Species_Precursor.Name = "L_Species_Precursor";
this.L_Species_Precursor.Size = new System.Drawing.Size(88, 13);
this.L_Species_Precursor.TabIndex = 3;
@@ -145,17 +143,19 @@ private void InitializeComponent()
//
// TC_Pokemon
//
this.TC_Pokemon.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TC_Pokemon.Controls.Add(this.TP_General);
this.TC_Pokemon.Controls.Add(this.TP_MoveTutors);
this.TC_Pokemon.Location = new System.Drawing.Point(24, 39);
this.TC_Pokemon.Location = new System.Drawing.Point(12, 40);
this.TC_Pokemon.Name = "TC_Pokemon";
this.TC_Pokemon.SelectedIndex = 0;
this.TC_Pokemon.Size = new System.Drawing.Size(768, 235);
this.TC_Pokemon.Size = new System.Drawing.Size(445, 365);
this.TC_Pokemon.TabIndex = 416;
//
// TP_General
//
this.TP_General.Controls.Add(this.PB_MonSprite);
this.TP_General.Controls.Add(this.TB_RawColor);
this.TP_General.Controls.Add(this.TB_CatchRate);
this.TP_General.Controls.Add(this.TB_Stage);
@@ -184,7 +184,6 @@ private void InitializeComponent()
this.TP_General.Controls.Add(this.label14);
this.TP_General.Controls.Add(this.TB_BaseExp);
this.TP_General.Controls.Add(this.label13);
this.TP_General.Controls.Add(this.label12);
this.TP_General.Controls.Add(this.TB_HatchCycles);
this.TP_General.Controls.Add(this.label11);
this.TP_General.Controls.Add(this.TB_Friendship);
@@ -224,14 +223,22 @@ private void InitializeComponent()
this.TP_General.Location = new System.Drawing.Point(4, 22);
this.TP_General.Name = "TP_General";
this.TP_General.Padding = new System.Windows.Forms.Padding(3);
this.TP_General.Size = new System.Drawing.Size(760, 209);
this.TP_General.Size = new System.Drawing.Size(437, 339);
this.TP_General.TabIndex = 0;
this.TP_General.Text = "General Info";
this.TP_General.UseVisualStyleBackColor = true;
//
// PB_MonSprite
//
this.PB_MonSprite.Location = new System.Drawing.Point(285, 0);
this.PB_MonSprite.Name = "PB_MonSprite";
this.PB_MonSprite.Size = new System.Drawing.Size(80, 60);
this.PB_MonSprite.TabIndex = 89;
this.PB_MonSprite.TabStop = false;
//
// TB_RawColor
//
this.TB_RawColor.Location = new System.Drawing.Point(183, 176);
this.TB_RawColor.Location = new System.Drawing.Point(236, 211);
this.TB_RawColor.Name = "TB_RawColor";
this.TB_RawColor.ReadOnly = true;
this.TB_RawColor.Size = new System.Drawing.Size(30, 20);
@@ -241,7 +248,7 @@ private void InitializeComponent()
// TB_CatchRate
//
this.TB_CatchRate.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_CatchRate.Location = new System.Drawing.Point(408, 161);
this.TB_CatchRate.Location = new System.Drawing.Point(387, 49);
this.TB_CatchRate.Mask = "000";
this.TB_CatchRate.Name = "TB_CatchRate";
this.TB_CatchRate.Size = new System.Drawing.Size(31, 20);
@@ -251,16 +258,16 @@ private void InitializeComponent()
//
// TB_Stage
//
this.TB_Stage.Location = new System.Drawing.Point(714, 161);
this.TB_Stage.Location = new System.Drawing.Point(376, 248);
this.TB_Stage.Name = "TB_Stage";
this.TB_Stage.ReadOnly = true;
this.TB_Stage.Size = new System.Drawing.Size(29, 20);
this.TB_Stage.Size = new System.Drawing.Size(30, 20);
this.TB_Stage.TabIndex = 86;
//
// label25
//
this.label25.AutoSize = true;
this.label25.Location = new System.Drawing.Point(670, 164);
this.label25.Location = new System.Drawing.Point(331, 252);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(38, 13);
this.label25.TabIndex = 85;
@@ -269,7 +276,7 @@ private void InitializeComponent()
// label24
//
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(735, 131);
this.label24.Location = new System.Drawing.Point(269, 300);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(19, 13);
this.label24.TabIndex = 84;
@@ -278,7 +285,7 @@ private void InitializeComponent()
// label23
//
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(594, 131);
this.label23.Location = new System.Drawing.Point(128, 300);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(15, 13);
this.label23.TabIndex = 83;
@@ -286,16 +293,16 @@ private void InitializeComponent()
//
// TB_FormeCount
//
this.TB_FormeCount.Location = new System.Drawing.Point(622, 161);
this.TB_FormeCount.Location = new System.Drawing.Point(376, 296);
this.TB_FormeCount.Name = "TB_FormeCount";
this.TB_FormeCount.ReadOnly = true;
this.TB_FormeCount.Size = new System.Drawing.Size(33, 20);
this.TB_FormeCount.Size = new System.Drawing.Size(30, 20);
this.TB_FormeCount.TabIndex = 82;
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(562, 164);
this.label22.Location = new System.Drawing.Point(316, 300);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(44, 13);
this.label22.TabIndex = 81;
@@ -303,7 +310,7 @@ private void InitializeComponent()
//
// TB_FormeSprite
//
this.TB_FormeSprite.Location = new System.Drawing.Point(519, 161);
this.TB_FormeSprite.Location = new System.Drawing.Point(376, 272);
this.TB_FormeSprite.Name = "TB_FormeSprite";
this.TB_FormeSprite.ReadOnly = true;
this.TB_FormeSprite.Size = new System.Drawing.Size(30, 20);
@@ -312,7 +319,7 @@ private void InitializeComponent()
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(448, 164);
this.label21.Location = new System.Drawing.Point(305, 276);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(69, 13);
this.label21.TabIndex = 79;
@@ -321,7 +328,7 @@ private void InitializeComponent()
// label20
//
this.label20.AutoSize = true;
this.label20.Location = new System.Drawing.Point(338, 164);
this.label20.Location = new System.Drawing.Point(317, 53);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(64, 13);
this.label20.TabIndex = 77;
@@ -332,7 +339,7 @@ private void InitializeComponent()
this.CB_Color.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_Color.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_Color.FormattingEnabled = true;
this.CB_Color.Location = new System.Drawing.Point(221, 158);
this.CB_Color.Location = new System.Drawing.Point(311, 211);
this.CB_Color.Name = "CB_Color";
this.CB_Color.Size = new System.Drawing.Size(105, 21);
this.CB_Color.TabIndex = 76;
@@ -342,7 +349,7 @@ private void InitializeComponent()
this.CB_EXPGroup.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_EXPGroup.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_EXPGroup.FormattingEnabled = true;
this.CB_EXPGroup.Location = new System.Drawing.Point(71, 158);
this.CB_EXPGroup.Location = new System.Drawing.Point(91, 210);
this.CB_EXPGroup.Name = "CB_EXPGroup";
this.CB_EXPGroup.Size = new System.Drawing.Size(101, 21);
this.CB_EXPGroup.TabIndex = 75;
@@ -350,7 +357,7 @@ private void InitializeComponent()
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(180, 161);
this.label19.Location = new System.Drawing.Point(270, 215);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(34, 13);
this.label19.TabIndex = 74;
@@ -359,7 +366,7 @@ private void InitializeComponent()
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(6, 164);
this.label18.Location = new System.Drawing.Point(26, 214);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(63, 13);
this.label18.TabIndex = 73;
@@ -368,7 +375,7 @@ private void InitializeComponent()
// TB_Weight
//
this.TB_Weight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_Weight.Location = new System.Drawing.Point(701, 127);
this.TB_Weight.Location = new System.Drawing.Point(235, 296);
this.TB_Weight.Mask = "000.0";
this.TB_Weight.Name = "TB_Weight";
this.TB_Weight.Size = new System.Drawing.Size(31, 20);
@@ -378,7 +385,7 @@ private void InitializeComponent()
// TB_Height
//
this.TB_Height.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_Height.Location = new System.Drawing.Point(560, 127);
this.TB_Height.Location = new System.Drawing.Point(94, 296);
this.TB_Height.Mask = "00.0";
this.TB_Height.Name = "TB_Height";
this.TB_Height.Size = new System.Drawing.Size(31, 20);
@@ -388,7 +395,7 @@ private void InitializeComponent()
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(654, 130);
this.label17.Location = new System.Drawing.Point(188, 300);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(44, 13);
this.label17.TabIndex = 70;
@@ -397,7 +404,7 @@ private void InitializeComponent()
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(515, 130);
this.label16.Location = new System.Drawing.Point(49, 300);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(41, 13);
this.label16.TabIndex = 69;
@@ -408,7 +415,7 @@ private void InitializeComponent()
this.CB_Ability3.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_Ability3.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_Ability3.FormattingEnabled = true;
this.CB_Ability3.Location = new System.Drawing.Point(315, 130);
this.CB_Ability3.Location = new System.Drawing.Point(276, 131);
this.CB_Ability3.Name = "CB_Ability3";
this.CB_Ability3.Size = new System.Drawing.Size(140, 21);
this.CB_Ability3.TabIndex = 68;
@@ -418,7 +425,7 @@ private void InitializeComponent()
this.CB_Ability2.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_Ability2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_Ability2.FormattingEnabled = true;
this.CB_Ability2.Location = new System.Drawing.Point(315, 103);
this.CB_Ability2.Location = new System.Drawing.Point(276, 105);
this.CB_Ability2.Name = "CB_Ability2";
this.CB_Ability2.Size = new System.Drawing.Size(140, 21);
this.CB_Ability2.TabIndex = 67;
@@ -428,7 +435,7 @@ private void InitializeComponent()
this.CB_Ability1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_Ability1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_Ability1.FormattingEnabled = true;
this.CB_Ability1.Location = new System.Drawing.Point(315, 79);
this.CB_Ability1.Location = new System.Drawing.Point(276, 79);
this.CB_Ability1.Name = "CB_Ability1";
this.CB_Ability1.Size = new System.Drawing.Size(140, 21);
this.CB_Ability1.TabIndex = 66;
@@ -438,7 +445,7 @@ private void InitializeComponent()
this.CB_EggGroup2.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_EggGroup2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_EggGroup2.FormattingEnabled = true;
this.CB_EggGroup2.Location = new System.Drawing.Point(634, 48);
this.CB_EggGroup2.Location = new System.Drawing.Point(295, 184);
this.CB_EggGroup2.Name = "CB_EggGroup2";
this.CB_EggGroup2.Size = new System.Drawing.Size(121, 21);
this.CB_EggGroup2.TabIndex = 65;
@@ -448,7 +455,7 @@ private void InitializeComponent()
this.CB_EggGroup1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_EggGroup1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_EggGroup1.FormattingEnabled = true;
this.CB_EggGroup1.Location = new System.Drawing.Point(634, 22);
this.CB_EggGroup1.Location = new System.Drawing.Point(295, 158);
this.CB_EggGroup1.Name = "CB_EggGroup1";
this.CB_EggGroup1.Size = new System.Drawing.Size(121, 21);
this.CB_EggGroup1.TabIndex = 64;
@@ -456,7 +463,7 @@ private void InitializeComponent()
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(566, 26);
this.label15.Location = new System.Drawing.Point(227, 161);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(66, 13);
this.label15.TabIndex = 63;
@@ -465,7 +472,7 @@ private void InitializeComponent()
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(272, 83);
this.label14.Location = new System.Drawing.Point(225, 83);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(45, 13);
this.label14.TabIndex = 62;
@@ -474,7 +481,7 @@ private void InitializeComponent()
// TB_BaseExp
//
this.TB_BaseExp.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_BaseExp.Location = new System.Drawing.Point(701, 103);
this.TB_BaseExp.Location = new System.Drawing.Point(235, 272);
this.TB_BaseExp.Mask = "000";
this.TB_BaseExp.Name = "TB_BaseExp";
this.TB_BaseExp.Size = new System.Drawing.Size(31, 20);
@@ -485,24 +492,16 @@ private void InitializeComponent()
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(641, 108);
this.label13.Location = new System.Drawing.Point(175, 276);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(58, 13);
this.label13.TabIndex = 60;
this.label13.Text = "Base EXP:";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(664, 48);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(0, 13);
this.label12.TabIndex = 59;
//
// TB_HatchCycles
//
this.TB_HatchCycles.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_HatchCycles.Location = new System.Drawing.Point(701, 78);
this.TB_HatchCycles.Location = new System.Drawing.Point(235, 248);
this.TB_HatchCycles.Mask = "000";
this.TB_HatchCycles.Name = "TB_HatchCycles";
this.TB_HatchCycles.Size = new System.Drawing.Size(31, 20);
@@ -513,7 +512,7 @@ private void InitializeComponent()
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(626, 81);
this.label11.Location = new System.Drawing.Point(160, 252);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(73, 13);
this.label11.TabIndex = 57;
@@ -522,7 +521,7 @@ private void InitializeComponent()
// TB_Friendship
//
this.TB_Friendship.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_Friendship.Location = new System.Drawing.Point(560, 103);
this.TB_Friendship.Location = new System.Drawing.Point(94, 272);
this.TB_Friendship.Mask = "000";
this.TB_Friendship.Name = "TB_Friendship";
this.TB_Friendship.Size = new System.Drawing.Size(31, 20);
@@ -533,7 +532,7 @@ private void InitializeComponent()
// TB_Gender
//
this.TB_Gender.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_Gender.Location = new System.Drawing.Point(560, 79);
this.TB_Gender.Location = new System.Drawing.Point(94, 248);
this.TB_Gender.Mask = "000";
this.TB_Gender.Name = "TB_Gender";
this.TB_Gender.Size = new System.Drawing.Size(31, 20);
@@ -544,7 +543,7 @@ private void InitializeComponent()
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(498, 106);
this.label10.Location = new System.Drawing.Point(32, 276);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(58, 13);
this.label10.TabIndex = 54;
@@ -553,7 +552,7 @@ private void InitializeComponent()
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(511, 82);
this.label9.Location = new System.Drawing.Point(45, 252);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(45, 13);
this.label9.TabIndex = 53;
@@ -562,7 +561,7 @@ private void InitializeComponent()
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(225, 134);
this.label8.Location = new System.Drawing.Point(195, 134);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(21, 13);
this.label8.TabIndex = 52;
@@ -571,7 +570,7 @@ private void InitializeComponent()
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(225, 107);
this.label7.Location = new System.Drawing.Point(195, 107);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(21, 13);
this.label7.TabIndex = 51;
@@ -580,7 +579,7 @@ private void InitializeComponent()
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(219, 82);
this.label6.Location = new System.Drawing.Point(195, 83);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(27, 13);
this.label6.TabIndex = 50;
@@ -591,7 +590,7 @@ private void InitializeComponent()
this.CB_HeldItem3.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_HeldItem3.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_HeldItem3.FormattingEnabled = true;
this.CB_HeldItem3.Location = new System.Drawing.Point(71, 131);
this.CB_HeldItem3.Location = new System.Drawing.Point(52, 131);
this.CB_HeldItem3.Name = "CB_HeldItem3";
this.CB_HeldItem3.Size = new System.Drawing.Size(140, 21);
this.CB_HeldItem3.TabIndex = 49;
@@ -601,7 +600,7 @@ private void InitializeComponent()
this.CB_HeldItem2.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_HeldItem2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_HeldItem2.FormattingEnabled = true;
this.CB_HeldItem2.Location = new System.Drawing.Point(71, 104);
this.CB_HeldItem2.Location = new System.Drawing.Point(52, 105);
this.CB_HeldItem2.Name = "CB_HeldItem2";
this.CB_HeldItem2.Size = new System.Drawing.Size(140, 21);
this.CB_HeldItem2.TabIndex = 48;
@@ -611,7 +610,7 @@ private void InitializeComponent()
this.CB_HeldItem1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_HeldItem1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_HeldItem1.FormattingEnabled = true;
this.CB_HeldItem1.Location = new System.Drawing.Point(71, 80);
this.CB_HeldItem1.Location = new System.Drawing.Point(52, 79);
this.CB_HeldItem1.Name = "CB_HeldItem1";
this.CB_HeldItem1.Size = new System.Drawing.Size(140, 21);
this.CB_HeldItem1.TabIndex = 47;
@@ -619,18 +618,18 @@ private void InitializeComponent()
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(10, 83);
this.label5.Location = new System.Drawing.Point(11, 83);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 13);
this.label5.Size = new System.Drawing.Size(35, 13);
this.label5.TabIndex = 46;
this.label5.Text = "Held Items:";
this.label5.Text = "Items:";
//
// CB_Type2
//
this.CB_Type2.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_Type2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_Type2.FormattingEnabled = true;
this.CB_Type2.Location = new System.Drawing.Point(445, 48);
this.CB_Type2.Location = new System.Drawing.Point(71, 184);
this.CB_Type2.Name = "CB_Type2";
this.CB_Type2.Size = new System.Drawing.Size(121, 21);
this.CB_Type2.TabIndex = 45;
@@ -640,7 +639,7 @@ private void InitializeComponent()
this.CB_Type1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CB_Type1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CB_Type1.FormattingEnabled = true;
this.CB_Type1.Location = new System.Drawing.Point(445, 22);
this.CB_Type1.Location = new System.Drawing.Point(71, 158);
this.CB_Type1.Name = "CB_Type1";
this.CB_Type1.Size = new System.Drawing.Size(121, 21);
this.CB_Type1.TabIndex = 44;
@@ -648,7 +647,7 @@ private void InitializeComponent()
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(395, 26);
this.label4.Location = new System.Drawing.Point(21, 161);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(47, 13);
this.label4.TabIndex = 43;
@@ -657,7 +656,7 @@ private void InitializeComponent()
// TB_SPEEVs
//
this.TB_SPEEVs.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_SPEEVs.Location = new System.Drawing.Point(363, 50);
this.TB_SPEEVs.Location = new System.Drawing.Point(273, 51);
this.TB_SPEEVs.Mask = "0";
this.TB_SPEEVs.Name = "TB_SPEEVs";
this.TB_SPEEVs.Size = new System.Drawing.Size(31, 20);
@@ -668,7 +667,7 @@ private void InitializeComponent()
// TB_SPDEVs
//
this.TB_SPDEVs.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_SPDEVs.Location = new System.Drawing.Point(324, 50);
this.TB_SPDEVs.Location = new System.Drawing.Point(234, 51);
this.TB_SPDEVs.Mask = "0";
this.TB_SPDEVs.Name = "TB_SPDEVs";
this.TB_SPDEVs.Size = new System.Drawing.Size(31, 20);
@@ -679,7 +678,7 @@ private void InitializeComponent()
// TB_SPAEVs
//
this.TB_SPAEVs.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_SPAEVs.Location = new System.Drawing.Point(285, 50);
this.TB_SPAEVs.Location = new System.Drawing.Point(195, 51);
this.TB_SPAEVs.Mask = "0";
this.TB_SPAEVs.Name = "TB_SPAEVs";
this.TB_SPAEVs.Size = new System.Drawing.Size(31, 20);
@@ -690,7 +689,7 @@ private void InitializeComponent()
// TB_DEFEVs
//
this.TB_DEFEVs.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_DEFEVs.Location = new System.Drawing.Point(247, 50);
this.TB_DEFEVs.Location = new System.Drawing.Point(157, 51);
this.TB_DEFEVs.Mask = "0";
this.TB_DEFEVs.Name = "TB_DEFEVs";
this.TB_DEFEVs.Size = new System.Drawing.Size(31, 20);
@@ -701,7 +700,7 @@ private void InitializeComponent()
// TB_ATKEVs
//
this.TB_ATKEVs.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_ATKEVs.Location = new System.Drawing.Point(209, 50);
this.TB_ATKEVs.Location = new System.Drawing.Point(119, 51);
this.TB_ATKEVs.Mask = "0";
this.TB_ATKEVs.Name = "TB_ATKEVs";
this.TB_ATKEVs.Size = new System.Drawing.Size(31, 20);
@@ -712,7 +711,7 @@ private void InitializeComponent()
// TB_HPEVs
//
this.TB_HPEVs.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_HPEVs.Location = new System.Drawing.Point(170, 50);
this.TB_HPEVs.Location = new System.Drawing.Point(80, 51);
this.TB_HPEVs.Mask = "0";
this.TB_HPEVs.Name = "TB_HPEVs";
this.TB_HPEVs.Size = new System.Drawing.Size(31, 20);
@@ -723,7 +722,7 @@ private void InitializeComponent()
// TB_BaseSPE
//
this.TB_BaseSPE.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_BaseSPE.Location = new System.Drawing.Point(363, 26);
this.TB_BaseSPE.Location = new System.Drawing.Point(273, 27);
this.TB_BaseSPE.Mask = "000";
this.TB_BaseSPE.Name = "TB_BaseSPE";
this.TB_BaseSPE.Size = new System.Drawing.Size(31, 20);
@@ -734,7 +733,7 @@ private void InitializeComponent()
// TB_BaseSPD
//
this.TB_BaseSPD.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_BaseSPD.Location = new System.Drawing.Point(324, 26);
this.TB_BaseSPD.Location = new System.Drawing.Point(234, 27);
this.TB_BaseSPD.Mask = "000";
this.TB_BaseSPD.Name = "TB_BaseSPD";
this.TB_BaseSPD.Size = new System.Drawing.Size(31, 20);
@@ -745,7 +744,7 @@ private void InitializeComponent()
// TB_BaseSPA
//
this.TB_BaseSPA.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_BaseSPA.Location = new System.Drawing.Point(285, 26);
this.TB_BaseSPA.Location = new System.Drawing.Point(195, 27);
this.TB_BaseSPA.Mask = "000";
this.TB_BaseSPA.Name = "TB_BaseSPA";
this.TB_BaseSPA.Size = new System.Drawing.Size(31, 20);
@@ -756,7 +755,7 @@ private void InitializeComponent()
// TB_BaseDEF
//
this.TB_BaseDEF.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_BaseDEF.Location = new System.Drawing.Point(247, 26);
this.TB_BaseDEF.Location = new System.Drawing.Point(157, 27);
this.TB_BaseDEF.Mask = "000";
this.TB_BaseDEF.Name = "TB_BaseDEF";
this.TB_BaseDEF.Size = new System.Drawing.Size(31, 20);
@@ -767,7 +766,7 @@ private void InitializeComponent()
// TB_BaseATK
//
this.TB_BaseATK.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_BaseATK.Location = new System.Drawing.Point(209, 26);
this.TB_BaseATK.Location = new System.Drawing.Point(119, 27);
this.TB_BaseATK.Mask = "000";
this.TB_BaseATK.Name = "TB_BaseATK";
this.TB_BaseATK.Size = new System.Drawing.Size(31, 20);
@@ -778,7 +777,7 @@ private void InitializeComponent()
// TB_BaseHP
//
this.TB_BaseHP.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TB_BaseHP.Location = new System.Drawing.Point(170, 26);
this.TB_BaseHP.Location = new System.Drawing.Point(80, 27);
this.TB_BaseHP.Mask = "000";
this.TB_BaseHP.Name = "TB_BaseHP";
this.TB_BaseHP.Size = new System.Drawing.Size(31, 20);
@@ -788,7 +787,7 @@ private void InitializeComponent()
//
// Label_HP
//
this.Label_HP.Location = new System.Drawing.Point(167, 10);
this.Label_HP.Location = new System.Drawing.Point(77, 11);
this.Label_HP.Name = "Label_HP";
this.Label_HP.Size = new System.Drawing.Size(31, 13);
this.Label_HP.TabIndex = 25;
@@ -797,7 +796,7 @@ private void InitializeComponent()
//
// Label_ATK
//
this.Label_ATK.Location = new System.Drawing.Point(209, 10);
this.Label_ATK.Location = new System.Drawing.Point(119, 11);
this.Label_ATK.Name = "Label_ATK";
this.Label_ATK.Size = new System.Drawing.Size(31, 13);
this.Label_ATK.TabIndex = 26;
@@ -806,7 +805,7 @@ private void InitializeComponent()
//
// Label_DEF
//
this.Label_DEF.Location = new System.Drawing.Point(247, 10);
this.Label_DEF.Location = new System.Drawing.Point(157, 11);
this.Label_DEF.Name = "Label_DEF";
this.Label_DEF.Size = new System.Drawing.Size(31, 13);
this.Label_DEF.TabIndex = 27;
@@ -815,7 +814,7 @@ private void InitializeComponent()
//
// Label_SPA
//
this.Label_SPA.Location = new System.Drawing.Point(285, 10);
this.Label_SPA.Location = new System.Drawing.Point(195, 11);
this.Label_SPA.Name = "Label_SPA";
this.Label_SPA.Size = new System.Drawing.Size(31, 13);
this.Label_SPA.TabIndex = 28;
@@ -824,7 +823,7 @@ private void InitializeComponent()
//
// Label_SPD
//
this.Label_SPD.Location = new System.Drawing.Point(324, 10);
this.Label_SPD.Location = new System.Drawing.Point(234, 11);
this.Label_SPD.Name = "Label_SPD";
this.Label_SPD.Size = new System.Drawing.Size(31, 13);
this.Label_SPD.TabIndex = 29;
@@ -833,7 +832,7 @@ private void InitializeComponent()
//
// Label_SPE
//
this.Label_SPE.Location = new System.Drawing.Point(361, 10);
this.Label_SPE.Location = new System.Drawing.Point(271, 11);
this.Label_SPE.Name = "Label_SPE";
this.Label_SPE.Size = new System.Drawing.Size(31, 13);
this.Label_SPE.TabIndex = 30;
@@ -843,7 +842,7 @@ private void InitializeComponent()
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(121, 52);
this.label3.Location = new System.Drawing.Point(31, 53);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(50, 13);
this.label3.TabIndex = 2;
@@ -852,7 +851,7 @@ private void InitializeComponent()
// L_BaseStats
//
this.L_BaseStats.AutoSize = true;
this.L_BaseStats.Location = new System.Drawing.Point(110, 30);
this.L_BaseStats.Location = new System.Drawing.Point(20, 31);
this.L_BaseStats.Name = "L_BaseStats";
this.L_BaseStats.Size = new System.Drawing.Size(61, 13);
this.L_BaseStats.TabIndex = 1;
@@ -860,7 +859,6 @@ private void InitializeComponent()
//
// TP_MoveTutors
//
this.TP_MoveTutors.Controls.Add(this.PB_MonSprite2);
this.TP_MoveTutors.Controls.Add(this.Lbl_OrasTutors);
this.TP_MoveTutors.Controls.Add(this.label27);
this.TP_MoveTutors.Controls.Add(this.label26);
@@ -870,23 +868,15 @@ private void InitializeComponent()
this.TP_MoveTutors.Location = new System.Drawing.Point(4, 22);
this.TP_MoveTutors.Name = "TP_MoveTutors";
this.TP_MoveTutors.Padding = new System.Windows.Forms.Padding(3);
this.TP_MoveTutors.Size = new System.Drawing.Size(760, 209);
this.TP_MoveTutors.Size = new System.Drawing.Size(461, 382);
this.TP_MoveTutors.TabIndex = 1;
this.TP_MoveTutors.Text = "Move Tutors";
this.TP_MoveTutors.UseVisualStyleBackColor = true;
//
// PB_MonSprite2
//
this.PB_MonSprite2.Location = new System.Drawing.Point(6, 6);
this.PB_MonSprite2.Name = "PB_MonSprite2";
this.PB_MonSprite2.Size = new System.Drawing.Size(80, 60);
this.PB_MonSprite2.TabIndex = 8;
this.PB_MonSprite2.TabStop = false;
//
// Lbl_OrasTutors
//
this.Lbl_OrasTutors.AutoSize = true;
this.Lbl_OrasTutors.Location = new System.Drawing.Point(540, 6);
this.Lbl_OrasTutors.Location = new System.Drawing.Point(278, 3);
this.Lbl_OrasTutors.Name = "Lbl_OrasTutors";
this.Lbl_OrasTutors.Size = new System.Drawing.Size(65, 13);
this.Lbl_OrasTutors.TabIndex = 7;
@@ -896,7 +886,7 @@ private void InitializeComponent()
// label27
//
this.label27.AutoSize = true;
this.label27.Location = new System.Drawing.Point(317, 6);
this.label27.Location = new System.Drawing.Point(139, 3);
this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(78, 13);
this.label27.TabIndex = 6;
@@ -905,7 +895,7 @@ private void InitializeComponent()
// label26
//
this.label26.AutoSize = true;
this.label26.Location = new System.Drawing.Point(133, 6);
this.label26.Location = new System.Drawing.Point(6, 3);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(48, 13);
this.label26.TabIndex = 5;
@@ -913,57 +903,58 @@ private void InitializeComponent()
//
// CLB_OrasTutors
//
this.CLB_OrasTutors.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.CLB_OrasTutors.Enabled = false;
this.CLB_OrasTutors.FormattingEnabled = true;
this.CLB_OrasTutors.Location = new System.Drawing.Point(611, 6);
this.CLB_OrasTutors.Location = new System.Drawing.Point(281, 19);
this.CLB_OrasTutors.Name = "CLB_OrasTutors";
this.CLB_OrasTutors.Size = new System.Drawing.Size(133, 184);
this.CLB_OrasTutors.Size = new System.Drawing.Size(133, 349);
this.CLB_OrasTutors.TabIndex = 4;
this.CLB_OrasTutors.Visible = false;
//
// CLB_MoveTutors
//
this.CLB_MoveTutors.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.CLB_MoveTutors.FormattingEnabled = true;
this.CLB_MoveTutors.Location = new System.Drawing.Point(401, 6);
this.CLB_MoveTutors.Location = new System.Drawing.Point(142, 19);
this.CLB_MoveTutors.Name = "CLB_MoveTutors";
this.CLB_MoveTutors.Size = new System.Drawing.Size(133, 184);
this.CLB_MoveTutors.Size = new System.Drawing.Size(133, 349);
this.CLB_MoveTutors.TabIndex = 3;
//
// CLB_TMHM
//
this.CLB_TMHM.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.CLB_TMHM.FormattingEnabled = true;
this.CLB_TMHM.Location = new System.Drawing.Point(187, 6);
this.CLB_TMHM.Location = new System.Drawing.Point(9, 19);
this.CLB_TMHM.Name = "CLB_TMHM";
this.CLB_TMHM.Size = new System.Drawing.Size(124, 184);
this.CLB_TMHM.Size = new System.Drawing.Size(124, 349);
this.CLB_TMHM.TabIndex = 2;
//
// PB_MonSprite
//
this.PB_MonSprite.Location = new System.Drawing.Point(6, 6);
this.PB_MonSprite.Name = "PB_MonSprite";
this.PB_MonSprite.Size = new System.Drawing.Size(80, 60);
this.PB_MonSprite.TabIndex = 89;
this.PB_MonSprite.TabStop = false;
//
// Personal
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(805, 287);
this.ClientSize = new System.Drawing.Size(469, 417);
this.Controls.Add(this.L_Mode);
this.Controls.Add(this.PB_MonSprite);
this.Controls.Add(this.TC_Pokemon);
this.Controls.Add(this.L_Species_Precursor);
this.Controls.Add(this.CB_Species);
this.Controls.Add(this.L_Mode);
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(485, 800);
this.MinimumSize = new System.Drawing.Size(485, 455);
this.Name = "Personal";
this.Text = "Gen VI Personal.Garc Editor";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formClosing);
this.TC_Pokemon.ResumeLayout(false);
this.TP_General.ResumeLayout(false);
this.TP_General.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.PB_MonSprite)).EndInit();
this.TP_MoveTutors.ResumeLayout(false);
this.TP_MoveTutors.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.PB_MonSprite2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PB_MonSprite)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -1020,7 +1011,6 @@ private void InitializeComponent()
private System.Windows.Forms.Label label14;
private System.Windows.Forms.MaskedTextBox TB_BaseExp;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.MaskedTextBox TB_HatchCycles;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.MaskedTextBox TB_Friendship;
@@ -1048,7 +1038,6 @@ private void InitializeComponent()
private System.Windows.Forms.Label Lbl_OrasTutors;
private System.Windows.Forms.Label label27;
private System.Windows.Forms.Label label26;
private System.Windows.Forms.PictureBox PB_MonSprite2;
private System.Windows.Forms.PictureBox PB_MonSprite;
}
}

View File

@@ -33,8 +33,8 @@ public Personal(bool rom_oras)
}
#region Global Variables
bool oras = false;
private string[] paths = { }; //Files in the Personal GARC folder.
private string mode = ""; //Should be "XY" or "ORAS" depending on game being edited
private string[] paths = { };
private string mode = "";
private string[] natures = { };
private string[] items = { };
@@ -71,83 +71,11 @@ public Personal(bool rom_oras)
public ushort[] tutor2 = { 277, 335, 414, 492, 356, 393, 334, 387, 276, 527, 196, 401, 399, 428, 406, 304, 231 };
public ushort[] tutor3 = { 20, 173, 282, 235, 257, 272, 215, 366, 143, 220, 202, 409, 314, 264, 351, 352 };
public ushort[] tutor4 = { 380, 388, 180, 495, 270, 271, 478, 472, 283, 200, 278, 289, 446, 214, 285 };
#endregion
private string[][] AltForms;
private int entrysize = 0;
internal static int[] getSpecies(byte[] data, bool oras, int PersonalEntry)
{
int entrysize = (oras) ? 0x50 : 0x40;
if (PersonalEntry < 722) return new int[] { PersonalEntry, 0 };
for (int i = 0; i < 722; i++)
{
int FormCount = data[i * entrysize + 0x20] - 1; // Mons with no alt forms have a FormCount of 1.
ushort altformpointer = BitConverter.ToUInt16(data, entrysize * i + 0x1C);
if (altformpointer > 0)
for (int j = 0; j < FormCount; j++)
if (altformpointer + j == PersonalEntry)
return new int[] { i, j };
}
return new int[] { -1, -1 };
}
internal static string[][] getFormList(byte[] data, bool oras, string[] species, string[] forms, string[] types, string[] items)
{
string[][] FormList = new string[722][];
int entrysize = (oras) ? 0x50 : 0x40;
int AltFormOfs = 723; //null + 721 species + 1 gap
for (int i = 0; i < 722; i++) //Hardcode 721 species + null
{
int FormCount = data[i * entrysize + 0x20]; // Mons with no alt forms have a FormCount of 1.
FormList[i] = new string[FormCount];
if (FormCount > 0)
{
FormList[i][0] = (forms[i] == "") ? species[i] : forms[i];
for (int j = 1; j < FormCount; j++)
FormList[i][j] = forms[AltFormOfs++];
}
}
// Need to hardcode here: Unown, Arceus, Genesect, any others?
// Unown
for (int i = 0; i < 26; i++)
FormList[201][i] = ((char)(i + 0x41)).ToString();
FormList[201][26] = "!";
FormList[201][27] = "?";
// Arceus
for (int i = 0; i < types.Length; i++)
FormList[493][i] = types[i];
// Genesect
for (int i = 0; i < 4; i++)
FormList[649][1 + i] = items[i + 116];
return FormList;
}
internal static string[] getPersonalEntryList(byte[] data, bool oras, string[][]AltForms, string[] species)
{
int entrysize = (oras) ? 0x50 : 0x40;
string[] result = new string[data.Length / entrysize];
for (int i = 0; i < 722; i++)
{
result[i] = species[i];
if (AltForms[i].Length == 0) continue;
ushort altformpointer = BitConverter.ToUInt16(data, entrysize * i + 0x1C);
if (altformpointer > 0)
{
string speciesName = species[i];
for (int j = 1; j < AltForms[i].Length; j++)
result[altformpointer + j - 1] = AltForms[i][j];
}
}
return result;
}
internal static ushort[] getPersonalIndexList(byte[] data, bool oras)
{
ushort[] result = new ushort[722];
int entrysize = (oras) ? 0x50 : 0x40;
for (int i = 0; i < result.Length; i++)
result[i] = BitConverter.ToUInt16(data, entrysize * i + 0x1C);
return result;
}
int entrysize = 0;
int entry = -1;
#endregion
private void Setup()
{
abilities = Main.getText((oras) ? 37 : 34);
@@ -226,31 +154,23 @@ private void Setup()
CB_EXPGroup.Items.Add(eg);
}
int entry = -1;
private void CB_Species_SelectedIndexChanged(object sender, EventArgs e)
{
if (entry > -1) saveEntry();
entry = CB_Species.SelectedIndex;
readEntry();
}
private void ByteLimiter(object sender, EventArgs e)
{
foreach (MaskedTextBox mtb in byte_boxes)
{
int val;
Int32.TryParse(mtb.Text, out val);
if (val > 255)
mtb.Text = "255";
}
foreach (MaskedTextBox mtb in ev_boxes)
{
int val;
Int32.TryParse(mtb.Text, out val);
if (val > 3)
mtb.Text = "3";
}
MaskedTextBox mtb = sender as MaskedTextBox;
int val = 0;
Int32.TryParse(mtb.Text, out val);
if (Array.IndexOf(byte_boxes, mtb) > -1 && val > 255)
mtb.Text = "255";
else if (val > 3)
mtb.Text = "3";
}
private void readEntry()
{
int len = 0;
@@ -360,7 +280,6 @@ private void readEntry()
}
}
PB_MonSprite.Image = bigImg;
PB_MonSprite2.Image = bigImg;
}
private void saveEntry()
{
@@ -471,5 +390,98 @@ private void formClosing(object sender, FormClosingEventArgs e)
{
if (entry > -1) saveEntry();
}
// Utility (Shared)
internal static int[] getSpecies(byte[] data, bool oras, int PersonalEntry)
{
int entrysize = (oras) ? 0x50 : 0x40;
if (PersonalEntry < 722) return new int[] { PersonalEntry, 0 };
for (int i = 0; i < 722; i++)
{
int FormCount = data[i * entrysize + 0x20] - 1; // Mons with no alt forms have a FormCount of 1.
ushort altformpointer = BitConverter.ToUInt16(data, entrysize * i + 0x1C);
if (altformpointer > 0)
for (int j = 0; j < FormCount; j++)
if (altformpointer + j == PersonalEntry)
return new int[] { i, j };
}
return new int[] { -1, -1 };
}
internal static string[][] getFormList(byte[] data, bool oras, string[] species, string[] forms, string[] types, string[] items)
{
string[][] FormList = new string[722][];
int entrysize = (oras) ? 0x50 : 0x40;
int AltFormOfs = 723; //null + 721 species + 1 gap
for (int i = 0; i < 722; i++) //Hardcode 721 species + null
{
int FormCount = data[i * entrysize + 0x20]; // Mons with no alt forms have a FormCount of 1.
FormList[i] = new string[FormCount];
if (FormCount > 0)
{
FormList[i][0] = (forms[i] == "") ? species[i] : forms[i];
for (int j = 1; j < FormCount; j++)
FormList[i][j] = forms[AltFormOfs++];
}
}
// Need to hardcode here: Unown, Arceus, Genesect, any others?
// Unown
for (int i = 0; i < 26; i++)
FormList[201][i] = ((char)(i + 0x41)).ToString();
FormList[201][26] = "!";
FormList[201][27] = "?";
// Arceus
for (int i = 0; i < types.Length; i++)
FormList[493][i] = types[i];
// Genesect
for (int i = 0; i < 4; i++)
FormList[649][1 + i] = items[i + 116];
return FormList;
}
internal static string[] getPersonalEntryList(byte[] data, bool oras, string[][] AltForms, string[] species)
{
int entrysize = (oras) ? 0x50 : 0x40;
string[] result = new string[data.Length / entrysize];
for (int i = 0; i < 722; i++)
{
result[i] = species[i];
if (AltForms[i].Length == 0) continue;
ushort altformpointer = BitConverter.ToUInt16(data, entrysize * i + 0x1C);
if (altformpointer > 0)
{
string speciesName = species[i];
for (int j = 1; j < AltForms[i].Length; j++)
result[altformpointer + j - 1] = AltForms[i][j];
}
}
return result;
}
internal static ushort[] getPersonalIndexList(byte[] data, bool oras)
{
ushort[] result = new ushort[722];
int entrysize = (oras) ? 0x50 : 0x40;
for (int i = 0; i < result.Length; i++)
result[i] = BitConverter.ToUInt16(data, entrysize * i + 0x1C);
return result;
}
internal static void setForms(int species, ComboBox cb, string[][] AltForms)
{
cb.Items.Clear();
string[] forms = AltForms[species];
if (forms.Length < 2)
{
cb.Items.Add("");
cb.Enabled = false;
}
else
{
foreach (string s in forms)
cb.Items.Add(s);
cb.Enabled = true;
}
cb.SelectedIndex = 0;
}
}
}

View File

@@ -159,35 +159,6 @@ internal static uint rnd32()
#endregion
// Form Loading
public void setForms(int species, ComboBox cb)
{
cb.Items.Clear();
string[] forms = AltForms[species];
if (forms.Length < 2)
{
cb.Items.Add("");
cb.Enabled = false;
}
else
{
foreach (string s in forms)
cb.Items.Add(s);
cb.Enabled = true;
if (species == 669 || species == 670 || species == 671)
{
while (cb.Items.Count < 0x7 - 1)
cb.Items.Add("DON'T SELECT");
cb.Items.Add("Random");
}
else if (species == 201 || species == 664 || species == 665 || species == 666)
{
while (cb.Items.Count < 0x1F - 1)
cb.Items.Add("DON'T SELECT");
cb.Items.Add("Random");
}
}
cb.SelectedIndex = 0;
}
// Ability Loading
private void refreshFormAbility(object sender, EventArgs e)
{
@@ -197,7 +168,7 @@ private void refreshFormAbility(object sender, EventArgs e)
private void refreshSpeciesAbility(object sender, EventArgs e)
{
int i = Array.IndexOf(trpk_pkm, sender as ComboBox);
setForms(trpk_pkm[i].SelectedIndex, trpk_form[i]);
Personal.setForms(trpk_pkm[i].SelectedIndex, trpk_form[i], AltForms);
refreshPKMSlotAbility(i);
}
private void refreshPKMSlotAbility(int slot)
@@ -381,7 +352,7 @@ private void readFile()
byte PID = br.ReadByte();
trpk_lvl[i].SelectedIndex = br.ReadUInt16();
trpk_pkm[i].SelectedIndex = br.ReadUInt16();
setForms(trpk_pkm[i].SelectedIndex, trpk_form[i]);
Personal.setForms(trpk_pkm[i].SelectedIndex, trpk_form[i], AltForms);
trpk_form[i].SelectedIndex = br.ReadUInt16() % trpk_form[i].Items.Count; // stupid X/Y bug edge cases (220 / 222)
refreshPKMSlotAbility(i); // Repopulate Abilities