Merge pull request #1036 from pokecal/pokecal-patch-2

add Gen4 MiscEditForm
This commit is contained in:
Kurt 2017-04-08 09:07:54 -07:00 committed by GitHub
commit c51de0620f
6 changed files with 775 additions and 2 deletions

View file

@ -1149,7 +1149,7 @@ namespace PKHeX.WinForms
B_CGearSkin.Enabled = SAV.Generation == 5;
B_OpenTrainerInfo.Enabled = B_OpenItemPouch.Enabled = SAV.HasParty; // Box RS
B_OpenMiscEditor.Enabled = SAV is SAV3;
B_OpenMiscEditor.Enabled = SAV is SAV3 || SAV.DP;
B_OpenHoneyTreeEditor.Enabled = SAV.DP || SAV.Pt;
}
@ -4177,6 +4177,8 @@ namespace PKHeX.WinForms
{
case 3:
new SAV_Misc3().ShowDialog(); break;
case 4:
new SAV_Misc4().ShowDialog(); break;
}
}
private void B_OpenHoneyTreeEditor_Click(object sender, EventArgs e)

View file

@ -264,6 +264,12 @@
<Compile Include="Subforms\Save Editors\Gen4\SAV_HoneyTree.Designer.cs">
<DependentUpon>SAV_HoneyTree.cs</DependentUpon>
</Compile>
<Compile Include="Subforms\Save Editors\Gen4\SAV_Misc4.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Subforms\Save Editors\Gen4\SAV_Misc4.Designer.cs">
<DependentUpon>SAV_Misc4.cs</DependentUpon>
</Compile>
<Compile Include="Subforms\Save Editors\Gen4\SAV_Pokedex4.cs">
<SubType>Form</SubType>
</Compile>
@ -507,6 +513,9 @@
<EmbeddedResource Include="Subforms\Save Editors\Gen4\SAV_HoneyTree.resx">
<DependentUpon>SAV_HoneyTree.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Save Editors\Gen4\SAV_Misc4.resx">
<DependentUpon>SAV_Misc4.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Subforms\Save Editors\Gen4\SAV_Pokedex4.resx">
<DependentUpon>SAV_Pokedex4.cs</DependentUpon>
</EmbeddedResource>
@ -641,4 +650,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View file

@ -0,0 +1,445 @@
namespace PKHeX.WinForms
{
partial class SAV_Misc4
{
/// <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_Misc4));
this.B_Cancel = new System.Windows.Forms.Button();
this.B_Save = new System.Windows.Forms.Button();
this.TC_Misc = new System.Windows.Forms.TabControl();
this.TAB_Poketch = new System.Windows.Forms.TabPage();
this.B_GiveAll = new System.Windows.Forms.Button();
this.CHK_App25 = new System.Windows.Forms.CheckBox();
this.CHK_App24 = new System.Windows.Forms.CheckBox();
this.CHK_App23 = new System.Windows.Forms.CheckBox();
this.CHK_App22 = new System.Windows.Forms.CheckBox();
this.CHK_App21 = new System.Windows.Forms.CheckBox();
this.CHK_App20 = new System.Windows.Forms.CheckBox();
this.CHK_App19 = new System.Windows.Forms.CheckBox();
this.CHK_App18 = new System.Windows.Forms.CheckBox();
this.CHK_App17 = new System.Windows.Forms.CheckBox();
this.CHK_App16 = new System.Windows.Forms.CheckBox();
this.CHK_App15 = new System.Windows.Forms.CheckBox();
this.CHK_App14 = new System.Windows.Forms.CheckBox();
this.CHK_App13 = new System.Windows.Forms.CheckBox();
this.CHK_App12 = new System.Windows.Forms.CheckBox();
this.CHK_App11 = new System.Windows.Forms.CheckBox();
this.CHK_App10 = new System.Windows.Forms.CheckBox();
this.CHK_App09 = new System.Windows.Forms.CheckBox();
this.CHK_App08 = new System.Windows.Forms.CheckBox();
this.CHK_App07 = new System.Windows.Forms.CheckBox();
this.CHK_App06 = new System.Windows.Forms.CheckBox();
this.CHK_App05 = new System.Windows.Forms.CheckBox();
this.CHK_App04 = new System.Windows.Forms.CheckBox();
this.CHK_App03 = new System.Windows.Forms.CheckBox();
this.CHK_App02 = new System.Windows.Forms.CheckBox();
this.CHK_App01 = new System.Windows.Forms.CheckBox();
this.TC_Misc.SuspendLayout();
this.TAB_Poketch.SuspendLayout();
this.SuspendLayout();
//
// 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(279, 282);
this.B_Cancel.Name = "B_Cancel";
this.B_Cancel.Size = new System.Drawing.Size(75, 23);
this.B_Cancel.TabIndex = 0;
this.B_Cancel.Text = "Cancel";
this.B_Cancel.UseVisualStyleBackColor = true;
this.B_Cancel.Click += new System.EventHandler(this.B_Cancel_Click);
//
// 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(360, 282);
this.B_Save.Name = "B_Save";
this.B_Save.Size = new System.Drawing.Size(75, 23);
this.B_Save.TabIndex = 1;
this.B_Save.Text = "Save";
this.B_Save.UseVisualStyleBackColor = true;
this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
//
// TC_Misc
//
this.TC_Misc.Controls.Add(this.TAB_Poketch);
this.TC_Misc.Location = new System.Drawing.Point(12, 12);
this.TC_Misc.Name = "TC_Misc";
this.TC_Misc.SelectedIndex = 0;
this.TC_Misc.Size = new System.Drawing.Size(423, 264);
this.TC_Misc.TabIndex = 2;
//
// TAB_Poketch
//
this.TAB_Poketch.Controls.Add(this.B_GiveAll);
this.TAB_Poketch.Controls.Add(this.CHK_App25);
this.TAB_Poketch.Controls.Add(this.CHK_App24);
this.TAB_Poketch.Controls.Add(this.CHK_App23);
this.TAB_Poketch.Controls.Add(this.CHK_App22);
this.TAB_Poketch.Controls.Add(this.CHK_App21);
this.TAB_Poketch.Controls.Add(this.CHK_App20);
this.TAB_Poketch.Controls.Add(this.CHK_App19);
this.TAB_Poketch.Controls.Add(this.CHK_App18);
this.TAB_Poketch.Controls.Add(this.CHK_App17);
this.TAB_Poketch.Controls.Add(this.CHK_App16);
this.TAB_Poketch.Controls.Add(this.CHK_App15);
this.TAB_Poketch.Controls.Add(this.CHK_App14);
this.TAB_Poketch.Controls.Add(this.CHK_App13);
this.TAB_Poketch.Controls.Add(this.CHK_App12);
this.TAB_Poketch.Controls.Add(this.CHK_App11);
this.TAB_Poketch.Controls.Add(this.CHK_App10);
this.TAB_Poketch.Controls.Add(this.CHK_App09);
this.TAB_Poketch.Controls.Add(this.CHK_App08);
this.TAB_Poketch.Controls.Add(this.CHK_App07);
this.TAB_Poketch.Controls.Add(this.CHK_App06);
this.TAB_Poketch.Controls.Add(this.CHK_App05);
this.TAB_Poketch.Controls.Add(this.CHK_App04);
this.TAB_Poketch.Controls.Add(this.CHK_App03);
this.TAB_Poketch.Controls.Add(this.CHK_App02);
this.TAB_Poketch.Controls.Add(this.CHK_App01);
this.TAB_Poketch.Location = new System.Drawing.Point(4, 22);
this.TAB_Poketch.Name = "TAB_Poketch";
this.TAB_Poketch.Padding = new System.Windows.Forms.Padding(3);
this.TAB_Poketch.Size = new System.Drawing.Size(415, 238);
this.TAB_Poketch.TabIndex = 0;
this.TAB_Poketch.Text = "Poketch";
this.TAB_Poketch.UseVisualStyleBackColor = true;
//
// B_GiveAll
//
this.B_GiveAll.Location = new System.Drawing.Point(277, 116);
this.B_GiveAll.Name = "B_GiveAll";
this.B_GiveAll.Size = new System.Drawing.Size(75, 23);
this.B_GiveAll.TabIndex = 25;
this.B_GiveAll.Text = "Obtain All";
this.B_GiveAll.UseVisualStyleBackColor = true;
this.B_GiveAll.Click += new System.EventHandler(this.B_GiveAll_Click);
//
// CHK_App25
//
this.CHK_App25.AutoSize = true;
this.CHK_App25.Location = new System.Drawing.Point(277, 94);
this.CHK_App25.Name = "CHK_App25";
this.CHK_App25.Size = new System.Drawing.Size(103, 16);
this.CHK_App25.TabIndex = 24;
this.CHK_App25.Text = "25 Alarm Clock";
this.CHK_App25.UseVisualStyleBackColor = true;
//
// CHK_App24
//
this.CHK_App24.AutoSize = true;
this.CHK_App24.Location = new System.Drawing.Point(277, 72);
this.CHK_App24.Name = "CHK_App24";
this.CHK_App24.Size = new System.Drawing.Size(93, 16);
this.CHK_App24.TabIndex = 23;
this.CHK_App24.Text = "24 Stopwatch";
this.CHK_App24.UseVisualStyleBackColor = true;
//
// CHK_App23
//
this.CHK_App23.AutoSize = true;
this.CHK_App23.Location = new System.Drawing.Point(277, 50);
this.CHK_App23.Name = "CHK_App23";
this.CHK_App23.Size = new System.Drawing.Size(129, 16);
this.CHK_App23.TabIndex = 22;
this.CHK_App23.Text = "23 Matchup Checker";
this.CHK_App23.UseVisualStyleBackColor = true;
//
// CHK_App22
//
this.CHK_App22.AutoSize = true;
this.CHK_App22.Location = new System.Drawing.Point(277, 28);
this.CHK_App22.Name = "CHK_App22";
this.CHK_App22.Size = new System.Drawing.Size(113, 16);
this.CHK_App22.TabIndex = 21;
this.CHK_App22.Text = "22 Color Changer";
this.CHK_App22.UseVisualStyleBackColor = true;
//
// CHK_App21
//
this.CHK_App21.AutoSize = true;
this.CHK_App21.Location = new System.Drawing.Point(277, 6);
this.CHK_App21.Name = "CHK_App21";
this.CHK_App21.Size = new System.Drawing.Size(111, 16);
this.CHK_App21.TabIndex = 20;
this.CHK_App21.Text = "21 Kitchen Timer";
this.CHK_App21.UseVisualStyleBackColor = true;
//
// CHK_App20
//
this.CHK_App20.AutoSize = true;
this.CHK_App20.Location = new System.Drawing.Point(151, 204);
this.CHK_App20.Name = "CHK_App20";
this.CHK_App20.Size = new System.Drawing.Size(120, 16);
this.CHK_App20.TabIndex = 19;
this.CHK_App20.Text = "20 Trainer Counter";
this.CHK_App20.UseVisualStyleBackColor = true;
//
// CHK_App19
//
this.CHK_App19.AutoSize = true;
this.CHK_App19.Location = new System.Drawing.Point(151, 182);
this.CHK_App19.Name = "CHK_App19";
this.CHK_App19.Size = new System.Drawing.Size(83, 16);
this.CHK_App19.TabIndex = 18;
this.CHK_App19.Text = "19 Roulette";
this.CHK_App19.UseVisualStyleBackColor = true;
//
// CHK_App18
//
this.CHK_App18.AutoSize = true;
this.CHK_App18.Location = new System.Drawing.Point(151, 160);
this.CHK_App18.Name = "CHK_App18";
this.CHK_App18.Size = new System.Drawing.Size(91, 16);
this.CHK_App18.TabIndex = 17;
this.CHK_App18.Text = "18 Dot Artist";
this.CHK_App18.UseVisualStyleBackColor = true;
//
// CHK_App17
//
this.CHK_App17.AutoSize = true;
this.CHK_App17.Location = new System.Drawing.Point(151, 138);
this.CHK_App17.Name = "CHK_App17";
this.CHK_App17.Size = new System.Drawing.Size(85, 16);
this.CHK_App17.TabIndex = 16;
this.CHK_App17.Text = "17 Calendar";
this.CHK_App17.UseVisualStyleBackColor = true;
//
// CHK_App16
//
this.CHK_App16.AutoSize = true;
this.CHK_App16.Location = new System.Drawing.Point(151, 116);
this.CHK_App16.Name = "CHK_App16";
this.CHK_App16.Size = new System.Drawing.Size(104, 16);
this.CHK_App16.TabIndex = 15;
this.CHK_App16.Text = "16 Move Tester";
this.CHK_App16.UseVisualStyleBackColor = true;
//
// CHK_App15
//
this.CHK_App15.AutoSize = true;
this.CHK_App15.Location = new System.Drawing.Point(151, 94);
this.CHK_App15.Name = "CHK_App15";
this.CHK_App15.Size = new System.Drawing.Size(92, 16);
this.CHK_App15.TabIndex = 14;
this.CHK_App15.Text = "15 Coin Toss";
this.CHK_App15.UseVisualStyleBackColor = true;
//
// CHK_App14
//
this.CHK_App14.AutoSize = true;
this.CHK_App14.Location = new System.Drawing.Point(151, 72);
this.CHK_App14.Name = "CHK_App14";
this.CHK_App14.Size = new System.Drawing.Size(110, 16);
this.CHK_App14.TabIndex = 13;
this.CHK_App14.Text = "14 Link Searcher";
this.CHK_App14.UseVisualStyleBackColor = true;
//
// CHK_App13
//
this.CHK_App13.AutoSize = true;
this.CHK_App13.Location = new System.Drawing.Point(151, 50);
this.CHK_App13.Name = "CHK_App13";
this.CHK_App13.Size = new System.Drawing.Size(105, 16);
this.CHK_App13.TabIndex = 12;
this.CHK_App13.Text = "13 Marking Map";
this.CHK_App13.UseVisualStyleBackColor = true;
//
// CHK_App12
//
this.CHK_App12.AutoSize = true;
this.CHK_App12.Location = new System.Drawing.Point(151, 28);
this.CHK_App12.Name = "CHK_App12";
this.CHK_App12.Size = new System.Drawing.Size(110, 16);
this.CHK_App12.TabIndex = 11;
this.CHK_App12.Text = "12 Analog Watch";
this.CHK_App12.UseVisualStyleBackColor = true;
//
// CHK_App11
//
this.CHK_App11.AutoSize = true;
this.CHK_App11.Location = new System.Drawing.Point(151, 6);
this.CHK_App11.Name = "CHK_App11";
this.CHK_App11.Size = new System.Drawing.Size(80, 16);
this.CHK_App11.TabIndex = 10;
this.CHK_App11.Text = "11 Counter";
this.CHK_App11.UseVisualStyleBackColor = true;
//
// CHK_App10
//
this.CHK_App10.AutoSize = true;
this.CHK_App10.Location = new System.Drawing.Point(6, 204);
this.CHK_App10.Name = "CHK_App10";
this.CHK_App10.Size = new System.Drawing.Size(127, 16);
this.CHK_App10.TabIndex = 9;
this.CHK_App10.Text = "10 Pokemon History";
this.CHK_App10.UseVisualStyleBackColor = true;
//
// CHK_App09
//
this.CHK_App09.AutoSize = true;
this.CHK_App09.Location = new System.Drawing.Point(6, 182);
this.CHK_App09.Name = "CHK_App09";
this.CHK_App09.Size = new System.Drawing.Size(134, 16);
this.CHK_App09.TabIndex = 8;
this.CHK_App09.Text = "09 Day Care Checker";
this.CHK_App09.UseVisualStyleBackColor = true;
//
// CHK_App08
//
this.CHK_App08.AutoSize = true;
this.CHK_App08.Location = new System.Drawing.Point(6, 160);
this.CHK_App08.Name = "CHK_App08";
this.CHK_App08.Size = new System.Drawing.Size(117, 16);
this.CHK_App08.TabIndex = 7;
this.CHK_App08.Text = "08 Berry Searcher";
this.CHK_App08.UseVisualStyleBackColor = true;
//
// CHK_App07
//
this.CHK_App07.AutoSize = true;
this.CHK_App07.Location = new System.Drawing.Point(6, 138);
this.CHK_App07.Name = "CHK_App07";
this.CHK_App07.Size = new System.Drawing.Size(129, 16);
this.CHK_App07.TabIndex = 6;
this.CHK_App07.Text = "07 Dowsing Machine";
this.CHK_App07.UseVisualStyleBackColor = true;
//
// CHK_App06
//
this.CHK_App06.AutoSize = true;
this.CHK_App06.Location = new System.Drawing.Point(6, 116);
this.CHK_App06.Name = "CHK_App06";
this.CHK_App06.Size = new System.Drawing.Size(139, 16);
this.CHK_App06.TabIndex = 5;
this.CHK_App06.Text = "06 Friendship Checker";
this.CHK_App06.UseVisualStyleBackColor = true;
//
// CHK_App05
//
this.CHK_App05.AutoSize = true;
this.CHK_App05.Location = new System.Drawing.Point(6, 94);
this.CHK_App05.Name = "CHK_App05";
this.CHK_App05.Size = new System.Drawing.Size(109, 16);
this.CHK_App05.TabIndex = 4;
this.CHK_App05.Text = "05 Pokemon List";
this.CHK_App05.UseVisualStyleBackColor = true;
//
// CHK_App04
//
this.CHK_App04.AutoSize = true;
this.CHK_App04.Location = new System.Drawing.Point(6, 72);
this.CHK_App04.Name = "CHK_App04";
this.CHK_App04.Size = new System.Drawing.Size(94, 16);
this.CHK_App04.TabIndex = 3;
this.CHK_App04.Text = "04 Pedometer";
this.CHK_App04.UseVisualStyleBackColor = true;
//
// CHK_App03
//
this.CHK_App03.AutoSize = true;
this.CHK_App03.Location = new System.Drawing.Point(6, 50);
this.CHK_App03.Name = "CHK_App03";
this.CHK_App03.Size = new System.Drawing.Size(93, 16);
this.CHK_App03.TabIndex = 2;
this.CHK_App03.Text = "03 Memo Pad";
this.CHK_App03.UseVisualStyleBackColor = true;
//
// CHK_App02
//
this.CHK_App02.AutoSize = true;
this.CHK_App02.Location = new System.Drawing.Point(6, 28);
this.CHK_App02.Name = "CHK_App02";
this.CHK_App02.Size = new System.Drawing.Size(92, 16);
this.CHK_App02.TabIndex = 1;
this.CHK_App02.Text = "02 Calculator";
this.CHK_App02.UseVisualStyleBackColor = true;
//
// CHK_App01
//
this.CHK_App01.AutoSize = true;
this.CHK_App01.Location = new System.Drawing.Point(6, 6);
this.CHK_App01.Name = "CHK_App01";
this.CHK_App01.Size = new System.Drawing.Size(108, 16);
this.CHK_App01.TabIndex = 0;
this.CHK_App01.Text = "01 Digital Watch";
this.CHK_App01.UseVisualStyleBackColor = true;
//
// SAV_Misc4
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(447, 317);
this.Controls.Add(this.TC_Misc);
this.Controls.Add(this.B_Save);
this.Controls.Add(this.B_Cancel);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "SAV_Misc4";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "SAV_Misc4";
this.TC_Misc.ResumeLayout(false);
this.TAB_Poketch.ResumeLayout(false);
this.TAB_Poketch.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button B_Cancel;
private System.Windows.Forms.Button B_Save;
private System.Windows.Forms.TabControl TC_Misc;
private System.Windows.Forms.TabPage TAB_Poketch;
private System.Windows.Forms.CheckBox CHK_App05;
private System.Windows.Forms.CheckBox CHK_App04;
private System.Windows.Forms.CheckBox CHK_App03;
private System.Windows.Forms.CheckBox CHK_App02;
private System.Windows.Forms.CheckBox CHK_App01;
private System.Windows.Forms.CheckBox CHK_App25;
private System.Windows.Forms.CheckBox CHK_App24;
private System.Windows.Forms.CheckBox CHK_App23;
private System.Windows.Forms.CheckBox CHK_App22;
private System.Windows.Forms.CheckBox CHK_App21;
private System.Windows.Forms.CheckBox CHK_App20;
private System.Windows.Forms.CheckBox CHK_App19;
private System.Windows.Forms.CheckBox CHK_App18;
private System.Windows.Forms.CheckBox CHK_App17;
private System.Windows.Forms.CheckBox CHK_App16;
private System.Windows.Forms.CheckBox CHK_App15;
private System.Windows.Forms.CheckBox CHK_App14;
private System.Windows.Forms.CheckBox CHK_App13;
private System.Windows.Forms.CheckBox CHK_App12;
private System.Windows.Forms.CheckBox CHK_App11;
private System.Windows.Forms.CheckBox CHK_App10;
private System.Windows.Forms.CheckBox CHK_App09;
private System.Windows.Forms.CheckBox CHK_App08;
private System.Windows.Forms.CheckBox CHK_App07;
private System.Windows.Forms.CheckBox CHK_App06;
private System.Windows.Forms.Button B_GiveAll;
}
}

View file

@ -0,0 +1,59 @@
using System;
using System.Windows.Forms;
using PKHeX.Core;
namespace PKHeX.WinForms
{
public partial class SAV_Misc4 : Form
{
private readonly SAV4 SAV = (SAV4)Main.SAV.Clone();
public SAV_Misc4()
{
InitializeComponent();
Apps = new[] {
CHK_App01,CHK_App02,CHK_App03,CHK_App04,CHK_App05,
CHK_App06,CHK_App07,CHK_App08,CHK_App09,CHK_App10,
CHK_App11,CHK_App12,CHK_App13,CHK_App14,CHK_App15,
CHK_App16,CHK_App17,CHK_App18,CHK_App19,CHK_App20,
CHK_App21,CHK_App22,CHK_App23,CHK_App24,CHK_App25,
};
int ret = SAV.PoketchApps;
for(int i = 0; i < Apps.Length; i++)
{
Apps[i].Checked = (ret & 1 << i) != 0;
}
}
private readonly CheckBox[] Apps;
private void saveMisc()
{
int ret = 0;
for(int i = 0; i < Apps.Length; i++)
{
if (Apps[i].Checked) ret |= 1 << i;
}
SAV.PoketchApps = ret;
}
private void B_Save_Click(object sender, EventArgs e)
{
saveMisc();
SAV.Data.CopyTo(Main.SAV.Data, 0);
Main.SAV.Edited = true;
Close();
}
private void B_Cancel_Click(object sender, EventArgs e)
{
Close();
}
private void B_GiveAll_Click(object sender, EventArgs e)
{
foreach (CheckBox c in Apps) c.Checked = true;
}
}
}

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+4qLikCDhIM+2tra++Xl5f/k5eT+5OTk//Lz
8v+urq7/RUVF/z4+Pv+Zmpn/8fHx/+Xm5f/k5eT+5eXl/9ra2vyLi4tAhYWFPuXm5vvx8vP/7+/w/v//
//+sra3/AgIC/15eXv9tbG3/BQUF/4yMjP//////7+/w/vHy8//l5ub8jY2NQC4uLD5LS0f7UFBL/09P
Sv5YWVP/FBUS/29wcP///////////5SUlP8PDw//U1NO/1BQS/5PT0r/S0tH/DIyMEAAAAs+AAAM+wAA
Dv8AAA/+AwMS/wAAAP+UlJX///////////+3t7n/AAAA/wAAD/8BAQ/+AAAO/wAADPwCAg5ABARSPgoK
k/sNDab/DQ2o/hAQvP8CAmj/IiIW/7Kzrv/Cw8D/NDQm/wAATf8QELz/DQ2q/gwMp/8LC5T8Dg5bQAUF
Xj4KCpz7DQ2u/w0NsP4NDbX/Dw+//wU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APAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AA
AAPAAAADwAAAA8AAAAPAAAAD4AAAB/gAAB//////
</value>
</data>
</root>

View file

@ -1112,5 +1112,47 @@ namespace PKHeX.Core
return new[] { A, B, C, D };
}
}
public int PoketchApps
{
get
{
int ret = 0;
int ofs = 0;
switch (Version)
{
case GameVersion.DP: ofs = 0x114F; break;
default: return ret;
}
ofs += GBO;
for (int i = 0; i < 25; i++)
{
if (Data[ofs + i] != 0) ret |= 1 << i;
}
return ret;
}
set
{
int c = 0;
int ofs = 0;
switch (Version)
{
case GameVersion.DP: ofs = 0x114F; break;
default: return;
}
ofs += GBO;
for (int i = 0; i < 25; i++)
{
if ((value & 1 << i) != 0)
{
c++;
if (Data[ofs + i] == 0)
Data[ofs + i] = 1;
}
else Data[ofs + i] = 0;
}
Data[ofs - 2] = (byte)c;
Data[ofs - 1] = 0; // current used, force set for first App.
}
}
}
}