Getting to work on Main5

This commit is contained in:
Regnum 2020-05-29 14:50:50 -05:00
parent 0083a220e0
commit 025855e616
16 changed files with 2147 additions and 324 deletions

View File

@ -66,10 +66,10 @@ Module Common
Next i
Return (bOutput)
End Function
Public Sub Save(myFile, data)
Dim myBytes As Byte() = HexStringToByteArray(Main.RichTextBox1.Text)
My.Computer.FileSystem.WriteAllBytes(myFile, myBytes, False)
End Sub
'Public Sub Save(myFile, data)
' Dim myBytes As Byte() = HexStringToByteArray(Main5.RichTextBox1.Text)
' My.Computer.FileSystem.WriteAllBytes(myFile, myBytes, False)
'End Sub
Public Function ByteArrayToHexString(ByVal myFile As String)
Dim myBytes As Byte() = My.Computer.FileSystem.ReadAllBytes(myFile)

View File

@ -2088,12 +2088,14 @@ New Ability With {.ID = 164, .Name = “Teravolt”}
Public Sub PopulateItems(Control As Object, Optional Ball As Boolean = False)
Dim list As List(Of Items) = ItemList()
For Each i As Items In list
If Ball = True Then
If i.IsBall = True Then
If i.Name <> "unknown" Then
If Ball = True Then
If i.IsBall = True Then
Control.Items.Add(i.Name)
End If
Else
Control.Items.Add(i.Name)
End If
Else
Control.Items.Add(i.Name)
End If
Next
End Sub

View File

@ -16,8 +16,6 @@ Public Class IniFile
Private TmpStringInhaltKomplett As New StringBuilder
Private StringIniFile As String
Public Property Filename() As String
Get
Return _strFileName
@ -69,11 +67,10 @@ Public Class IniFile
Try
tmpStringArguments = tmpStringLine.Split("=")
_dr = _ds.Tables(0).NewRow
_dr("Key") = tmpStringArguments(0)
_dr("Value") = tmpStringArguments(1)
_ds.Tables(0).Rows.Add(_dr)
_dr("Key") = tmpStringArguments(LBound(tmpStringArguments))
_dr("Value") = tmpStringArguments(UBound(tmpStringArguments))
If _dr("Key") <> "" Then _ds.Tables(0).Rows.Add(_dr)
Catch ex As Exception
End Try
End If
If tmpStringLine.StartsWith(_strIniArgumentsBegins) Then

105
PKMG5DC/Main.Designer.vb generated
View File

@ -1,105 +0,0 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Main
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.lklb_Update = New System.Windows.Forms.LinkLabel()
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip()
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.RichTextBox1 = New System.Windows.Forms.RichTextBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.MenuStrip1.SuspendLayout()
Me.SuspendLayout()
'
'lklb_Update
'
Me.lklb_Update.AutoSize = True
Me.lklb_Update.Location = New System.Drawing.Point(1, 4)
Me.lklb_Update.Name = "lklb_Update"
Me.lklb_Update.Size = New System.Drawing.Size(116, 13)
Me.lklb_Update.TabIndex = 6
Me.lklb_Update.TabStop = True
Me.lklb_Update.Text = "New Update Available!"
Me.ToolTip1.SetToolTip(Me.lklb_Update, "New Features! Download the new version")
'
'MenuStrip1
'
Me.MenuStrip1.Dock = System.Windows.Forms.DockStyle.None
Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem1})
Me.MenuStrip1.Location = New System.Drawing.Point(113, 0)
Me.MenuStrip1.Name = "MenuStrip1"
Me.MenuStrip1.Size = New System.Drawing.Size(69, 24)
Me.MenuStrip1.Stretch = False
Me.MenuStrip1.TabIndex = 29
Me.MenuStrip1.Text = "MenuStrip1"
'
'ToolStripMenuItem1
'
Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1"
Me.ToolStripMenuItem1.Size = New System.Drawing.Size(61, 20)
Me.ToolStripMenuItem1.Text = "Options"
'
'RichTextBox1
'
Me.RichTextBox1.Location = New System.Drawing.Point(600, 29)
Me.RichTextBox1.Name = "RichTextBox1"
Me.RichTextBox1.Size = New System.Drawing.Size(188, 374)
Me.RichTextBox1.TabIndex = 30
Me.RichTextBox1.Text = ""
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(176, 154)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 23)
Me.Button1.TabIndex = 31
Me.Button1.Text = "Button1"
Me.Button1.UseVisualStyleBackColor = True
'
'Main
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(800, 450)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.RichTextBox1)
Me.Controls.Add(Me.lklb_Update)
Me.Controls.Add(Me.MenuStrip1)
Me.MainMenuStrip = Me.MenuStrip1
Me.Name = "Main"
Me.Text = "Form4"
Me.MenuStrip1.ResumeLayout(False)
Me.MenuStrip1.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents lklb_Update As LinkLabel
Friend WithEvents ToolTip1 As ToolTip
Friend WithEvents MenuStrip1 As MenuStrip
Friend WithEvents ToolStripMenuItem1 As ToolStripMenuItem
Friend WithEvents RichTextBox1 As RichTextBox
Friend WithEvents Button1 As Button
End Class

View File

@ -1,126 +0,0 @@
<?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>
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 17</value>
</metadata>
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

448
PKMG5DC/Main5.Designer.vb generated Normal file
View File

@ -0,0 +1,448 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Main5
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Main5))
Me.lklb_Update = New System.Windows.Forms.LinkLabel()
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip()
Me.tsmi_Options = New System.Windows.Forms.ToolStripMenuItem()
Me.HoverInfo = New System.Windows.Forms.ToolTip(Me.components)
Me.Button1 = New System.Windows.Forms.Button()
Me.pb_Donate = New System.Windows.Forms.PictureBox()
Me.gb_GameComp = New System.Windows.Forms.GroupBox()
Me.cb_White2 = New System.Windows.Forms.CheckBox()
Me.cb_Black2 = New System.Windows.Forms.CheckBox()
Me.cb_White = New System.Windows.Forms.CheckBox()
Me.cb_Black = New System.Windows.Forms.CheckBox()
Me.gb_Region = New System.Windows.Forms.GroupBox()
Me.cb_Region = New System.Windows.Forms.ComboBox()
Me.gb_DateLimit = New System.Windows.Forms.GroupBox()
Me.cb_MaxLimit = New System.Windows.Forms.CheckBox()
Me.lb_End = New System.Windows.Forms.Label()
Me.lb_Start = New System.Windows.Forms.Label()
Me.EndDatePicker = New System.Windows.Forms.DateTimePicker()
Me.StartDatePicker = New System.Windows.Forms.DateTimePicker()
Me.bt_ClearEM = New System.Windows.Forms.Button()
Me.lb_EventMsg = New System.Windows.Forms.Label()
Me.rtb_EventMsg = New System.Windows.Forms.RichTextBox()
Me.bt_Build = New System.Windows.Forms.Button()
Me.lklb_Author = New System.Windows.Forms.LinkLabel()
Me.lb_By = New System.Windows.Forms.Label()
Me.bt_Custom = New System.Windows.Forms.Button()
Me.lb_PGF = New System.Windows.Forms.Label()
Me.bt_PGF = New System.Windows.Forms.Button()
Me.tc_Cards = New System.Windows.Forms.TabControl()
Me.tp_Add = New System.Windows.Forms.TabPage()
Me.pnl_EditCard = New System.Windows.Forms.Panel()
Me.MenuStrip1.SuspendLayout()
CType(Me.pb_Donate, System.ComponentModel.ISupportInitialize).BeginInit()
Me.gb_GameComp.SuspendLayout()
Me.gb_Region.SuspendLayout()
Me.gb_DateLimit.SuspendLayout()
Me.tc_Cards.SuspendLayout()
Me.tp_Add.SuspendLayout()
Me.pnl_EditCard.SuspendLayout()
Me.SuspendLayout()
'
'lklb_Update
'
Me.lklb_Update.AutoSize = True
Me.lklb_Update.Location = New System.Drawing.Point(1, 4)
Me.lklb_Update.Name = "lklb_Update"
Me.lklb_Update.Size = New System.Drawing.Size(116, 13)
Me.lklb_Update.TabIndex = 6
Me.lklb_Update.TabStop = True
Me.lklb_Update.Text = "New Update Available!"
Me.HoverInfo.SetToolTip(Me.lklb_Update, "New Features! Download the new version")
'
'MenuStrip1
'
Me.MenuStrip1.Dock = System.Windows.Forms.DockStyle.None
Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsmi_Options})
Me.MenuStrip1.Location = New System.Drawing.Point(113, 0)
Me.MenuStrip1.Name = "MenuStrip1"
Me.MenuStrip1.Size = New System.Drawing.Size(69, 24)
Me.MenuStrip1.Stretch = False
Me.MenuStrip1.TabIndex = 29
Me.MenuStrip1.Text = "MenuStrip1"
'
'tsmi_Options
'
Me.tsmi_Options.Name = "tsmi_Options"
Me.tsmi_Options.Size = New System.Drawing.Size(61, 20)
Me.tsmi_Options.Text = "Options"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(30, 335)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 23)
Me.Button1.TabIndex = 31
Me.Button1.Text = "Button1"
Me.Button1.UseVisualStyleBackColor = True
'
'pb_Donate
'
Me.pb_Donate.BackColor = System.Drawing.SystemColors.Control
Me.pb_Donate.BackgroundImage = CType(resources.GetObject("pb_Donate.BackgroundImage"), System.Drawing.Image)
Me.pb_Donate.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
Me.pb_Donate.Cursor = System.Windows.Forms.Cursors.Hand
Me.pb_Donate.Location = New System.Drawing.Point(214, 4)
Me.pb_Donate.Name = "pb_Donate"
Me.pb_Donate.Size = New System.Drawing.Size(80, 22)
Me.pb_Donate.TabIndex = 32
Me.pb_Donate.TabStop = False
'
'gb_GameComp
'
Me.gb_GameComp.Controls.Add(Me.cb_White2)
Me.gb_GameComp.Controls.Add(Me.cb_Black2)
Me.gb_GameComp.Controls.Add(Me.cb_White)
Me.gb_GameComp.Controls.Add(Me.cb_Black)
Me.gb_GameComp.Location = New System.Drawing.Point(6, 67)
Me.gb_GameComp.Name = "gb_GameComp"
Me.gb_GameComp.Size = New System.Drawing.Size(142, 66)
Me.gb_GameComp.TabIndex = 33
Me.gb_GameComp.TabStop = False
Me.gb_GameComp.Text = "Game Compatibility"
'
'cb_White2
'
Me.cb_White2.AutoSize = True
Me.cb_White2.Location = New System.Drawing.Point(73, 41)
Me.cb_White2.Name = "cb_White2"
Me.cb_White2.Size = New System.Drawing.Size(63, 17)
Me.cb_White2.TabIndex = 3
Me.cb_White2.Text = "White 2"
Me.cb_White2.UseVisualStyleBackColor = True
'
'cb_Black2
'
Me.cb_Black2.AutoSize = True
Me.cb_Black2.Location = New System.Drawing.Point(12, 41)
Me.cb_Black2.Name = "cb_Black2"
Me.cb_Black2.Size = New System.Drawing.Size(62, 17)
Me.cb_Black2.TabIndex = 2
Me.cb_Black2.Text = "Black 2"
Me.cb_Black2.UseVisualStyleBackColor = True
'
'cb_White
'
Me.cb_White.AutoSize = True
Me.cb_White.Location = New System.Drawing.Point(73, 18)
Me.cb_White.Name = "cb_White"
Me.cb_White.Size = New System.Drawing.Size(54, 17)
Me.cb_White.TabIndex = 1
Me.cb_White.Text = "White"
Me.cb_White.UseVisualStyleBackColor = True
'
'cb_Black
'
Me.cb_Black.AutoSize = True
Me.cb_Black.Location = New System.Drawing.Point(12, 18)
Me.cb_Black.Name = "cb_Black"
Me.cb_Black.Size = New System.Drawing.Size(53, 17)
Me.cb_Black.TabIndex = 0
Me.cb_Black.Text = "Black"
Me.cb_Black.UseVisualStyleBackColor = True
'
'gb_Region
'
Me.gb_Region.Controls.Add(Me.cb_Region)
Me.gb_Region.Location = New System.Drawing.Point(6, 139)
Me.gb_Region.Name = "gb_Region"
Me.gb_Region.Size = New System.Drawing.Size(142, 41)
Me.gb_Region.TabIndex = 34
Me.gb_Region.TabStop = False
Me.gb_Region.Text = "Region"
'
'cb_Region
'
Me.cb_Region.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cb_Region.FormattingEnabled = True
Me.cb_Region.Items.AddRange(New Object() {"English (US/UK/AU)", "Français (France/Québec)", "Italiano (Italy)", "Deutsch (Germany)", "Español (Spain/Latin Americas)", "日本語 (Japan)", "한국어 (South Korea)"})
Me.cb_Region.Location = New System.Drawing.Point(6, 14)
Me.cb_Region.Name = "cb_Region"
Me.cb_Region.Size = New System.Drawing.Size(130, 21)
Me.cb_Region.TabIndex = 35
'
'gb_DateLimit
'
Me.gb_DateLimit.Controls.Add(Me.cb_MaxLimit)
Me.gb_DateLimit.Controls.Add(Me.lb_End)
Me.gb_DateLimit.Controls.Add(Me.lb_Start)
Me.gb_DateLimit.Controls.Add(Me.EndDatePicker)
Me.gb_DateLimit.Controls.Add(Me.StartDatePicker)
Me.gb_DateLimit.Location = New System.Drawing.Point(155, 67)
Me.gb_DateLimit.Name = "gb_DateLimit"
Me.gb_DateLimit.Size = New System.Drawing.Size(117, 113)
Me.gb_DateLimit.TabIndex = 35
Me.gb_DateLimit.TabStop = False
Me.gb_DateLimit.Text = "Date Limit"
'
'cb_MaxLimit
'
Me.cb_MaxLimit.AutoSize = True
Me.cb_MaxLimit.Location = New System.Drawing.Point(12, 89)
Me.cb_MaxLimit.Name = "cb_MaxLimit"
Me.cb_MaxLimit.Size = New System.Drawing.Size(95, 17)
Me.cb_MaxLimit.TabIndex = 4
Me.cb_MaxLimit.Text = "Auto Max Limit"
Me.cb_MaxLimit.UseVisualStyleBackColor = True
'
'lb_End
'
Me.lb_End.AutoSize = True
Me.lb_End.Location = New System.Drawing.Point(8, 51)
Me.lb_End.Name = "lb_End"
Me.lb_End.Size = New System.Drawing.Size(29, 13)
Me.lb_End.TabIndex = 3
Me.lb_End.Text = "End:"
'
'lb_Start
'
Me.lb_Start.AutoSize = True
Me.lb_Start.Location = New System.Drawing.Point(8, 16)
Me.lb_Start.Name = "lb_Start"
Me.lb_Start.Size = New System.Drawing.Size(32, 13)
Me.lb_Start.TabIndex = 2
Me.lb_Start.Text = "Start:"
'
'EndDatePicker
'
Me.EndDatePicker.CustomFormat = "yyyy/MM/dd"
Me.EndDatePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom
Me.EndDatePicker.Location = New System.Drawing.Point(8, 64)
Me.EndDatePicker.Name = "EndDatePicker"
Me.EndDatePicker.Size = New System.Drawing.Size(102, 20)
Me.EndDatePicker.TabIndex = 1
Me.EndDatePicker.Value = New Date(2018, 10, 5, 0, 0, 0, 0)
'
'StartDatePicker
'
Me.StartDatePicker.CustomFormat = "yyyy/MM/dd"
Me.StartDatePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom
Me.StartDatePicker.Location = New System.Drawing.Point(8, 29)
Me.StartDatePicker.Name = "StartDatePicker"
Me.StartDatePicker.Size = New System.Drawing.Size(102, 20)
Me.StartDatePicker.TabIndex = 0
Me.StartDatePicker.Value = New Date(2018, 10, 5, 0, 0, 0, 0)
'
'bt_ClearEM
'
Me.bt_ClearEM.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.bt_ClearEM.Location = New System.Drawing.Point(30, 294)
Me.bt_ClearEM.Name = "bt_ClearEM"
Me.bt_ClearEM.Size = New System.Drawing.Size(223, 21)
Me.bt_ClearEM.TabIndex = 38
Me.bt_ClearEM.Text = "Clear Text"
Me.bt_ClearEM.UseVisualStyleBackColor = True
'
'lb_EventMsg
'
Me.lb_EventMsg.AutoSize = True
Me.lb_EventMsg.Location = New System.Drawing.Point(30, 183)
Me.lb_EventMsg.Name = "lb_EventMsg"
Me.lb_EventMsg.Size = New System.Drawing.Size(84, 13)
Me.lb_EventMsg.TabIndex = 37
Me.lb_EventMsg.Text = "Event Message:"
'
'rtb_EventMsg
'
Me.rtb_EventMsg.Location = New System.Drawing.Point(30, 196)
Me.rtb_EventMsg.MaxLength = 252
Me.rtb_EventMsg.Name = "rtb_EventMsg"
Me.rtb_EventMsg.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.None
Me.rtb_EventMsg.Size = New System.Drawing.Size(223, 97)
Me.rtb_EventMsg.TabIndex = 36
Me.rtb_EventMsg.Text = ""
Me.rtb_EventMsg.WordWrap = False
'
'bt_Build
'
Me.bt_Build.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.bt_Build.Location = New System.Drawing.Point(125, 326)
Me.bt_Build.Name = "bt_Build"
Me.bt_Build.Size = New System.Drawing.Size(128, 46)
Me.bt_Build.TabIndex = 39
Me.bt_Build.Text = "Build Event ROM"
Me.bt_Build.UseVisualStyleBackColor = True
'
'lklb_Author
'
Me.lklb_Author.AutoSize = True
Me.lklb_Author.Location = New System.Drawing.Point(15, 434)
Me.lklb_Author.Name = "lklb_Author"
Me.lklb_Author.Size = New System.Drawing.Size(47, 13)
Me.lklb_Author.TabIndex = 40
Me.lklb_Author.TabStop = True
Me.lklb_Author.Text = "Regnum"
'
'lb_By
'
Me.lb_By.AutoSize = True
Me.lb_By.Location = New System.Drawing.Point(1, 434)
Me.lb_By.Name = "lb_By"
Me.lb_By.Size = New System.Drawing.Size(18, 13)
Me.lb_By.TabIndex = 41
Me.lb_By.Text = "by"
'
'bt_Custom
'
Me.bt_Custom.Font = New System.Drawing.Font("Microsoft Sans Serif", 32.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Document, CType(0, Byte))
Me.bt_Custom.Location = New System.Drawing.Point(6, 6)
Me.bt_Custom.Name = "bt_Custom"
Me.bt_Custom.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.bt_Custom.Size = New System.Drawing.Size(130, 23)
Me.bt_Custom.TabIndex = 44
Me.bt_Custom.Text = "Custom"
Me.bt_Custom.UseVisualStyleBackColor = True
'
'lb_PGF
'
Me.lb_PGF.AutoEllipsis = True
Me.lb_PGF.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.lb_PGF.Location = New System.Drawing.Point(6, 38)
Me.lb_PGF.Margin = New System.Windows.Forms.Padding(3, 3, 3, 0)
Me.lb_PGF.Name = "lb_PGF"
Me.lb_PGF.Size = New System.Drawing.Size(266, 17)
Me.lb_PGF.TabIndex = 43
Me.lb_PGF.Text = "Open .pgf ------->"
Me.lb_PGF.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'bt_PGF
'
Me.bt_PGF.Location = New System.Drawing.Point(142, 6)
Me.bt_PGF.Name = "bt_PGF"
Me.bt_PGF.Size = New System.Drawing.Size(130, 23)
Me.bt_PGF.TabIndex = 42
Me.bt_PGF.Text = "Open .pgf"
Me.bt_PGF.UseVisualStyleBackColor = True
'
'tc_Cards
'
Me.tc_Cards.Controls.Add(Me.tp_Add)
Me.tc_Cards.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.tc_Cards.ItemSize = New System.Drawing.Size(21, 18)
Me.tc_Cards.Location = New System.Drawing.Point(8, 27)
Me.tc_Cards.Name = "tc_Cards"
Me.tc_Cards.Padding = New System.Drawing.Point(2, 3)
Me.tc_Cards.SelectedIndex = 0
Me.tc_Cards.Size = New System.Drawing.Size(286, 404)
Me.tc_Cards.TabIndex = 45
'
'tp_Add
'
Me.tp_Add.Controls.Add(Me.pnl_EditCard)
Me.tp_Add.Location = New System.Drawing.Point(4, 22)
Me.tp_Add.Name = "tp_Add"
Me.tp_Add.Padding = New System.Windows.Forms.Padding(3)
Me.tp_Add.Size = New System.Drawing.Size(278, 378)
Me.tp_Add.TabIndex = 1
Me.tp_Add.Text = " +"
Me.tp_Add.UseVisualStyleBackColor = True
'
'pnl_EditCard
'
Me.pnl_EditCard.Controls.Add(Me.lb_EventMsg)
Me.pnl_EditCard.Controls.Add(Me.gb_GameComp)
Me.pnl_EditCard.Controls.Add(Me.bt_Custom)
Me.pnl_EditCard.Controls.Add(Me.gb_Region)
Me.pnl_EditCard.Controls.Add(Me.rtb_EventMsg)
Me.pnl_EditCard.Controls.Add(Me.bt_ClearEM)
Me.pnl_EditCard.Controls.Add(Me.lb_PGF)
Me.pnl_EditCard.Controls.Add(Me.gb_DateLimit)
Me.pnl_EditCard.Controls.Add(Me.bt_PGF)
Me.pnl_EditCard.Controls.Add(Me.Button1)
Me.pnl_EditCard.Controls.Add(Me.bt_Build)
Me.pnl_EditCard.Location = New System.Drawing.Point(0, 0)
Me.pnl_EditCard.Name = "pnl_EditCard"
Me.pnl_EditCard.Size = New System.Drawing.Size(278, 378)
Me.pnl_EditCard.TabIndex = 45
'
'Main5
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(302, 450)
Me.Controls.Add(Me.tc_Cards)
Me.Controls.Add(Me.lklb_Author)
Me.Controls.Add(Me.lb_By)
Me.Controls.Add(Me.pb_Donate)
Me.Controls.Add(Me.lklb_Update)
Me.Controls.Add(Me.MenuStrip1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MainMenuStrip = Me.MenuStrip1
Me.Name = "Main5"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "PKMG5DC"
Me.MenuStrip1.ResumeLayout(False)
Me.MenuStrip1.PerformLayout()
CType(Me.pb_Donate, System.ComponentModel.ISupportInitialize).EndInit()
Me.gb_GameComp.ResumeLayout(False)
Me.gb_GameComp.PerformLayout()
Me.gb_Region.ResumeLayout(False)
Me.gb_DateLimit.ResumeLayout(False)
Me.gb_DateLimit.PerformLayout()
Me.tc_Cards.ResumeLayout(False)
Me.tp_Add.ResumeLayout(False)
Me.pnl_EditCard.ResumeLayout(False)
Me.pnl_EditCard.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents lklb_Update As LinkLabel
Friend WithEvents HoverInfo As ToolTip
Friend WithEvents MenuStrip1 As MenuStrip
Friend WithEvents tsmi_Options As ToolStripMenuItem
Friend WithEvents Button1 As Button
Friend WithEvents pb_Donate As PictureBox
Friend WithEvents gb_GameComp As GroupBox
Friend WithEvents cb_White2 As CheckBox
Friend WithEvents cb_Black2 As CheckBox
Friend WithEvents cb_White As CheckBox
Friend WithEvents cb_Black As CheckBox
Friend WithEvents gb_Region As GroupBox
Friend WithEvents cb_Region As ComboBox
Friend WithEvents gb_DateLimit As GroupBox
Friend WithEvents cb_MaxLimit As CheckBox
Friend WithEvents lb_End As Label
Friend WithEvents lb_Start As Label
Friend WithEvents EndDatePicker As DateTimePicker
Friend WithEvents StartDatePicker As DateTimePicker
Friend WithEvents bt_ClearEM As Button
Friend WithEvents lb_EventMsg As Label
Friend WithEvents rtb_EventMsg As RichTextBox
Friend WithEvents bt_Build As Button
Friend WithEvents lklb_Author As LinkLabel
Friend WithEvents lb_By As Label
Friend WithEvents bt_Custom As Button
Friend WithEvents lb_PGF As Label
Friend WithEvents bt_PGF As Button
Friend WithEvents tc_Cards As TabControl
Friend WithEvents tp_Add As TabPage
Friend WithEvents pnl_EditCard As Panel
End Class

1439
PKMG5DC/Main5.resx Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,14 +2,17 @@
Imports Newtonsoft.Json
Imports Newtonsoft.Json.Linq
Public Class Main
Public Class Main5
#Region "Variables"
ReadOnly apppath As String = My.Application.Info.DirectoryPath 'Path to .exe directory
ReadOnly res As String = Path.GetFullPath(Application.StartupPath & "\..\..\Resources\") 'Path to Project Resources
ReadOnly TempPath As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\Temp" 'Path to Temp
Public Shared Local As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\Regnum\PKMG5DC" 'Path to Local folder
Public Shared ReadOnly apppath As String = My.Application.Info.DirectoryPath 'Path to .exe directory
Public Shared ReadOnly res As String = Path.GetFullPath(Application.StartupPath & "\..\..\Resources\") 'Path to Project Resources
Public Shared ReadOnly TempPath As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\Temp" 'Path to Temp
Public Shared ReadOnly Local As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\Regnum\PKMG5DC" 'Path to Local folder
ReadOnly langCksm As UShort() = {&H83BC, &H9D36, &H39AA, &H4418, &HE061, &HF57A} 'List of Language Checksums
ReadOnly langs As Byte() = {&H2, &H3, &H4, &H5, &H6} 'List of Language values
Dim mySettings As New IniFile
Dim pn_Settings As New pnl_Settings
Dim doneLoad As Boolean = False
#End Region
Private Sub Main_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@ -22,10 +25,16 @@ Public Class Main
rd /S/Q data
del arm9.bin arm7.bin banner.bin header.bin"}}
CreateFiles(tools)
'Process.Start(Local & "\tools\extract.bat").WaitForExit()
'File.Delete(Local & "\tools\data\data.bin")
'Save(Local & "\tools\data\data.bin", RichTextBox1.Text)
'Process.Start(Local & "\tools\compile.bat").WaitForExit()
'Process.Start(Local & "\tools\clean.bat").WaitForExit()
tp_Add_Enter(sender, e)
doneLoad = True
End Sub
Private Sub Main_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
Dim myIniFile As New IniFile
With myIniFile
With mySettings
.Filename = Local & "\settings.ini"
If .OpenIniFile() Then
'Dim MyValue As String = .GetValue("MyKey")
@ -103,7 +112,6 @@ Public Class Main
#End Region
#Region "Startup"
Private Sub CreateFolders(ByVal dirs As String())
Try
For i = 0 To UBound(dirs) Step 1
@ -150,17 +158,16 @@ Public Class Main
If Not File.Exists(Local & "\settings.ini") Then
File.Create(Local & "\settings.ini")
End If
Dim myIniFile As New IniFile
With myIniFile
With mySettings
.Filename = Local & "\settings.ini"
If .OpenIniFile() Then
My.Settings.ticket = .GetValue("Ticket")
'.SetValue("Ticket", My.Settings.ticket)
If Not .SaveIni Then
MessageBox.Show("Trouble by writing Ini-File")
MsgB("Trouble writing Ini-File")
End If
Else
MessageBox.Show("No Ini-File found")
MsgB("No Ini-File found")
End If
End With
End Sub
@ -245,4 +252,67 @@ Public Class Main
' End If
'End Sub
#End Region
Private Sub tp_Add_Enter(sender As Object, e As EventArgs) Handles tp_Add.Enter
Dim DelTab As TabPage = tc_Cards.SelectedTab
Dim NewTab As New TabPage()
Dim NewAddTab As New TabPage()
With NewAddTab
.Location = New System.Drawing.Point(4, 22)
.Text = " +"
.Name = "tp_Add"
.Padding = New System.Windows.Forms.Padding(0)
.Size = New System.Drawing.Size(278, 378)
.TabIndex = tc_Cards.TabPages.Count - 1
.UseVisualStyleBackColor = True
End With
With NewTab
.Location = New System.Drawing.Point(4, 22)
.Name = "tp_Card" & (NewAddTab.TabIndex + 1)
.Padding = New System.Windows.Forms.Padding(3)
.Size = New Size(278, 378)
.TabIndex = NewAddTab.TabIndex
.Text = "Card " & (NewAddTab.TabIndex + 1)
.UseVisualStyleBackColor = True
End With
tc_Cards.TabPages.Add(NewTab)
AddHandler NewTab.Leave, AddressOf Me.SavePanel
AddHandler NewTab.Enter, AddressOf Me.MovePanel
tc_Cards.TabPages.Remove(DelTab)
If tc_Cards.TabCount < 8 Then
tc_Cards.TabPages.Add(NewAddTab)
AddHandler NewAddTab.Enter, AddressOf Me.tp_Add_Enter
End If
End Sub
Private Sub MovePanel()
tc_Cards.SelectedTab.Controls.Add(Me.pnl_EditCard)
With pn_Settings
lb_PGF.Text = .pnl_Strings(tc_Cards.SelectedIndex)
rtb_EventMsg.Text = .pnl_Strings(tc_Cards.SelectedIndex + 8)
cb_MaxLimit.Checked = .maxLimit(tc_Cards.SelectedIndex)
cb_Region.SelectedIndex = .region(tc_Cards.SelectedIndex)
If .dates(tc_Cards.SelectedIndex) <> Nothing Then StartDatePicker.Value = .dates(tc_Cards.SelectedIndex)
If .dates(tc_Cards.SelectedIndex + 8) <> Nothing Then EndDatePicker.Value = .dates(tc_Cards.SelectedIndex + 8)
End With
End Sub
Private Sub SavePanel()
With pn_Settings
.pnl_Strings(tc_Cards.SelectedIndex) = lb_PGF.Text
.pnl_Strings(tc_Cards.SelectedIndex + 8) = rtb_EventMsg.Text
.maxLimit(tc_Cards.SelectedIndex) = cb_MaxLimit.Checked
.region(tc_Cards.SelectedIndex) = cb_Region.SelectedIndex
If doneLoad Then .dates(tc_Cards.SelectedIndex) = StartDatePicker.Value
If doneLoad Then .dates(tc_Cards.SelectedIndex + 8) = EndDatePicker.Value
End With
End Sub
Private Class pnl_Settings
Public pnl_Strings(15) As String
Public maxLimit(7) As Boolean
Public region(7) As Byte
Public dates(15) As Date
End Class
End Class

View File

@ -32,7 +32,7 @@ Namespace My
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.PKMG5DC.Main
Me.MainForm = Global.PKMG5DC.Main5
End Sub
End Class
End Namespace

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>true</MySubMain>
<MainForm>Main</MainForm>
<MainForm>Main5</MainForm>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>

View File

@ -35,7 +35,7 @@ Partial Class PGFCreator
Me.lbl_Ability = New System.Windows.Forms.Label()
Me.lbl_Species = New System.Windows.Forms.Label()
Me.cb_CardType = New System.Windows.Forms.ComboBox()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.HoverInfo = New System.Windows.Forms.ToolTip(Me.components)
Me.gb_Pokemon = New System.Windows.Forms.GroupBox()
Me.cx_Origin = New System.Windows.Forms.CheckBox()
Me.cx_Lang = New System.Windows.Forms.CheckBox()
@ -64,7 +64,7 @@ Partial Class PGFCreator
Me.tb_CardTitle = New System.Windows.Forms.TextBox()
Me.gb_Power = New System.Windows.Forms.GroupBox()
Me.nud_Power = New System.Windows.Forms.NumericUpDown()
Me.Label1 = New System.Windows.Forms.Label()
Me.lbl_Simple1 = New System.Windows.Forms.Label()
Me.gb_PKDetails.SuspendLayout()
Me.gb_Pokemon.SuspendLayout()
CType(Me.nud_Level, System.ComponentModel.ISupportInitialize).BeginInit()
@ -81,14 +81,14 @@ Partial Class PGFCreator
Me.lbl_PK5Name.Location = New System.Drawing.Point(13, 22)
Me.lbl_PK5Name.Margin = New System.Windows.Forms.Padding(3, 3, 3, 0)
Me.lbl_PK5Name.Name = "lbl_PK5Name"
Me.lbl_PK5Name.Size = New System.Drawing.Size(330, 17)
Me.lbl_PK5Name.Size = New System.Drawing.Size(282, 17)
Me.lbl_PK5Name.TabIndex = 10
Me.lbl_PK5Name.Text = "Open .pk5 ------->"
Me.lbl_PK5Name.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'btn_OpenPK5
'
Me.btn_OpenPK5.Location = New System.Drawing.Point(345, 18)
Me.btn_OpenPK5.Location = New System.Drawing.Point(301, 19)
Me.btn_OpenPK5.Name = "btn_OpenPK5"
Me.btn_OpenPK5.Size = New System.Drawing.Size(75, 23)
Me.btn_OpenPK5.TabIndex = 9
@ -111,6 +111,7 @@ Partial Class PGFCreator
Me.gb_PKDetails.TabIndex = 12
Me.gb_PKDetails.TabStop = False
Me.gb_PKDetails.Text = "Pokémon Info"
Me.gb_PKDetails.Visible = False
'
'lbl_Move4
'
@ -156,7 +157,7 @@ Partial Class PGFCreator
Me.lbl_IVs.Size = New System.Drawing.Size(28, 13)
Me.lbl_IVs.TabIndex = 3
Me.lbl_IVs.Text = "IVs: "
Me.ToolTip1.SetToolTip(Me.lbl_IVs, "HP/Atk/Def/SpA/SpD/Spe")
Me.HoverInfo.SetToolTip(Me.lbl_IVs, "HP/Atk/Def/SpA/SpD/Spe")
'
'lbl_Natures
'
@ -218,7 +219,7 @@ Partial Class PGFCreator
Me.gb_Pokemon.Controls.Add(Me.btn_OpenPK5)
Me.gb_Pokemon.Location = New System.Drawing.Point(16, 59)
Me.gb_Pokemon.Name = "gb_Pokemon"
Me.gb_Pokemon.Size = New System.Drawing.Size(435, 430)
Me.gb_Pokemon.Size = New System.Drawing.Size(402, 430)
Me.gb_Pokemon.TabIndex = 14
Me.gb_Pokemon.TabStop = False
Me.gb_Pokemon.Text = "Pokémon"
@ -226,7 +227,7 @@ Partial Class PGFCreator
'cx_Origin
'
Me.cx_Origin.AutoSize = True
Me.cx_Origin.Location = New System.Drawing.Point(244, 158)
Me.cx_Origin.Location = New System.Drawing.Point(226, 158)
Me.cx_Origin.Name = "cx_Origin"
Me.cx_Origin.Size = New System.Drawing.Size(132, 17)
Me.cx_Origin.TabIndex = 35
@ -246,7 +247,7 @@ Partial Class PGFCreator
'cx_IV
'
Me.cx_IV.AutoSize = True
Me.cx_IV.Location = New System.Drawing.Point(345, 119)
Me.cx_IV.Location = New System.Drawing.Point(307, 121)
Me.cx_IV.Name = "cx_IV"
Me.cx_IV.Size = New System.Drawing.Size(84, 17)
Me.cx_IV.TabIndex = 33
@ -256,7 +257,7 @@ Partial Class PGFCreator
'cx_PID
'
Me.cx_PID.AutoSize = True
Me.cx_PID.Location = New System.Drawing.Point(244, 119)
Me.cx_PID.Location = New System.Drawing.Point(214, 121)
Me.cx_PID.Name = "cx_PID"
Me.cx_PID.Size = New System.Drawing.Size(87, 17)
Me.cx_PID.TabIndex = 32
@ -266,7 +267,7 @@ Partial Class PGFCreator
'lbl_Nature
'
Me.lbl_Nature.AutoSize = True
Me.lbl_Nature.Location = New System.Drawing.Point(126, 105)
Me.lbl_Nature.Location = New System.Drawing.Point(110, 105)
Me.lbl_Nature.Name = "lbl_Nature"
Me.lbl_Nature.Size = New System.Drawing.Size(42, 13)
Me.lbl_Nature.TabIndex = 31
@ -277,7 +278,7 @@ Partial Class PGFCreator
Me.cb_Nature.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cb_Nature.FormattingEnabled = True
Me.cb_Nature.Items.AddRange(New Object() {"Random", "Adamant", "Bashful", "Bold", "Brave", "Calm", "Careful", "Docile", "Gentle", "Hardy", "Hasty", "Impish", "Jolly", "Lax", "Lonely", "Mild", "Modest", "Naive", "Naughty", "Quiet", "Quirky", "Rash", "Relaxed", "Sassy", "Serious", "Timid"})
Me.cb_Nature.Location = New System.Drawing.Point(129, 119)
Me.cb_Nature.Location = New System.Drawing.Point(113, 119)
Me.cb_Nature.Name = "cb_Nature"
Me.cb_Nature.Size = New System.Drawing.Size(94, 21)
Me.cb_Nature.TabIndex = 30
@ -304,7 +305,7 @@ Partial Class PGFCreator
'lbl_Level
'
Me.lbl_Level.AutoSize = True
Me.lbl_Level.Location = New System.Drawing.Point(356, 58)
Me.lbl_Level.Location = New System.Drawing.Point(311, 59)
Me.lbl_Level.Name = "lbl_Level"
Me.lbl_Level.Size = New System.Drawing.Size(36, 13)
Me.lbl_Level.TabIndex = 23
@ -312,7 +313,7 @@ Partial Class PGFCreator
'
'nud_Level
'
Me.nud_Level.Location = New System.Drawing.Point(359, 72)
Me.nud_Level.Location = New System.Drawing.Point(314, 73)
Me.nud_Level.Name = "nud_Level"
Me.nud_Level.Size = New System.Drawing.Size(60, 20)
Me.nud_Level.TabIndex = 22
@ -320,7 +321,7 @@ Partial Class PGFCreator
'lbl_OTGender
'
Me.lbl_OTGender.AutoSize = True
Me.lbl_OTGender.Location = New System.Drawing.Point(126, 58)
Me.lbl_OTGender.Location = New System.Drawing.Point(111, 58)
Me.lbl_OTGender.Name = "lbl_OTGender"
Me.lbl_OTGender.Size = New System.Drawing.Size(63, 13)
Me.lbl_OTGender.TabIndex = 27
@ -331,7 +332,7 @@ Partial Class PGFCreator
Me.cb_OTGender.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cb_OTGender.FormattingEnabled = True
Me.cb_OTGender.Items.AddRange(New Object() {"Male", "Female", "Recipient"})
Me.cb_OTGender.Location = New System.Drawing.Point(129, 72)
Me.cb_OTGender.Location = New System.Drawing.Point(114, 72)
Me.cb_OTGender.Name = "cb_OTGender"
Me.cb_OTGender.Size = New System.Drawing.Size(94, 21)
Me.cb_OTGender.TabIndex = 26
@ -358,7 +359,7 @@ Partial Class PGFCreator
'lbl_AbilitySlot
'
Me.lbl_AbilitySlot.AutoSize = True
Me.lbl_AbilitySlot.Location = New System.Drawing.Point(241, 58)
Me.lbl_AbilitySlot.Location = New System.Drawing.Point(211, 58)
Me.lbl_AbilitySlot.Name = "lbl_AbilitySlot"
Me.lbl_AbilitySlot.Size = New System.Drawing.Size(37, 13)
Me.lbl_AbilitySlot.TabIndex = 23
@ -369,7 +370,7 @@ Partial Class PGFCreator
Me.cb_AbilitySlot.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cb_AbilitySlot.FormattingEnabled = True
Me.cb_AbilitySlot.Items.AddRange(New Object() {"Ability 1", "Ability 2", "Hidden Ability", "Random (w/o HA)", "Random (w/ HA)"})
Me.cb_AbilitySlot.Location = New System.Drawing.Point(244, 72)
Me.cb_AbilitySlot.Location = New System.Drawing.Point(214, 72)
Me.cb_AbilitySlot.Name = "cb_AbilitySlot"
Me.cb_AbilitySlot.Size = New System.Drawing.Size(94, 21)
Me.cb_AbilitySlot.TabIndex = 22
@ -378,7 +379,7 @@ Partial Class PGFCreator
'
Me.gb_Item.Controls.Add(Me.lbl_Simple)
Me.gb_Item.Controls.Add(Me.cb_Item)
Me.gb_Item.Location = New System.Drawing.Point(471, 59)
Me.gb_Item.Location = New System.Drawing.Point(440, 59)
Me.gb_Item.Name = "gb_Item"
Me.gb_Item.Size = New System.Drawing.Size(435, 430)
Me.gb_Item.TabIndex = 15
@ -398,6 +399,7 @@ Partial Class PGFCreator
'
'cb_Item
'
Me.cb_Item.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.cb_Item.FormattingEnabled = True
Me.cb_Item.Location = New System.Drawing.Point(24, 18)
Me.cb_Item.Name = "cb_Item"
@ -407,7 +409,7 @@ Partial Class PGFCreator
'lbl_CardID
'
Me.lbl_CardID.AutoSize = True
Me.lbl_CardID.Location = New System.Drawing.Point(387, 18)
Me.lbl_CardID.Location = New System.Drawing.Point(355, 18)
Me.lbl_CardID.Name = "lbl_CardID"
Me.lbl_CardID.Size = New System.Drawing.Size(46, 13)
Me.lbl_CardID.TabIndex = 17
@ -415,7 +417,7 @@ Partial Class PGFCreator
'
'nud_CardID
'
Me.nud_CardID.Location = New System.Drawing.Point(390, 32)
Me.nud_CardID.Location = New System.Drawing.Point(358, 32)
Me.nud_CardID.Maximum = New Decimal(New Integer() {65535, 0, 0, 0})
Me.nud_CardID.Name = "nud_CardID"
Me.nud_CardID.Size = New System.Drawing.Size(60, 20)
@ -434,7 +436,7 @@ Partial Class PGFCreator
'
Me.btn_Done.Location = New System.Drawing.Point(16, 505)
Me.btn_Done.Name = "btn_Done"
Me.btn_Done.Size = New System.Drawing.Size(435, 23)
Me.btn_Done.Size = New System.Drawing.Size(402, 23)
Me.btn_Done.TabIndex = 19
Me.btn_Done.Text = "Done"
Me.btn_Done.UseVisualStyleBackColor = True
@ -442,7 +444,7 @@ Partial Class PGFCreator
'lbl_CardTitle
'
Me.lbl_CardTitle.AutoSize = True
Me.lbl_CardTitle.Location = New System.Drawing.Point(136, 18)
Me.lbl_CardTitle.Location = New System.Drawing.Point(121, 18)
Me.lbl_CardTitle.Name = "lbl_CardTitle"
Me.lbl_CardTitle.Size = New System.Drawing.Size(55, 13)
Me.lbl_CardTitle.TabIndex = 21
@ -450,7 +452,7 @@ Partial Class PGFCreator
'
'tb_CardTitle
'
Me.tb_CardTitle.Location = New System.Drawing.Point(137, 32)
Me.tb_CardTitle.Location = New System.Drawing.Point(122, 32)
Me.tb_CardTitle.MaxLength = 36
Me.tb_CardTitle.Name = "tb_CardTitle"
Me.tb_CardTitle.Size = New System.Drawing.Size(224, 20)
@ -459,8 +461,8 @@ Partial Class PGFCreator
'gb_Power
'
Me.gb_Power.Controls.Add(Me.nud_Power)
Me.gb_Power.Controls.Add(Me.Label1)
Me.gb_Power.Location = New System.Drawing.Point(922, 59)
Me.gb_Power.Controls.Add(Me.lbl_Simple1)
Me.gb_Power.Location = New System.Drawing.Point(881, 59)
Me.gb_Power.Name = "gb_Power"
Me.gb_Power.Size = New System.Drawing.Size(435, 430)
Me.gb_Power.TabIndex = 16
@ -475,22 +477,22 @@ Partial Class PGFCreator
Me.nud_Power.Size = New System.Drawing.Size(60, 20)
Me.nud_Power.TabIndex = 17
'
'Label1
'lbl_Simple1
'
Me.Label1.AutoSize = True
Me.Label1.ForeColor = System.Drawing.SystemColors.AppWorkspace
Me.Label1.Location = New System.Drawing.Point(161, 200)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(98, 26)
Me.Label1.TabIndex = 1
Me.Label1.Text = "That's all" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Pretty simple isn't it."
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.lbl_Simple1.AutoSize = True
Me.lbl_Simple1.ForeColor = System.Drawing.SystemColors.AppWorkspace
Me.lbl_Simple1.Location = New System.Drawing.Point(161, 200)
Me.lbl_Simple1.Name = "lbl_Simple1"
Me.lbl_Simple1.Size = New System.Drawing.Size(98, 26)
Me.lbl_Simple1.TabIndex = 1
Me.lbl_Simple1.Text = "That's all" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Pretty simple isn't it."
Me.lbl_Simple1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'PGFCreator
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1371, 540)
Me.ClientSize = New System.Drawing.Size(1328, 540)
Me.Controls.Add(Me.gb_Power)
Me.Controls.Add(Me.lbl_CardTitle)
Me.Controls.Add(Me.tb_CardTitle)
@ -531,7 +533,7 @@ Partial Class PGFCreator
Friend WithEvents lbl_IVs As Label
Friend WithEvents lbl_Natures As Label
Friend WithEvents lbl_Ability As Label
Friend WithEvents ToolTip1 As ToolTip
Friend WithEvents HoverInfo As ToolTip
Friend WithEvents gb_Pokemon As GroupBox
Friend WithEvents gb_Item As GroupBox
Friend WithEvents cb_Item As ComboBox
@ -560,5 +562,5 @@ Partial Class PGFCreator
Friend WithEvents lbl_Simple As Label
Friend WithEvents gb_Power As GroupBox
Friend WithEvents nud_Power As NumericUpDown
Friend WithEvents Label1 As Label
Friend WithEvents lbl_Simple1 As Label
End Class

View File

@ -117,10 +117,10 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="HoverInfo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="HoverInfo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -7,9 +7,9 @@ Public Class PGFCreator
"Mild", "Quiet", "Bashful", "Rash", "Calm", "Gentle", "Sassy", "Careful", "Quirky"} 'List of Natures
Private Sub PGFCreator_Load(sender As Object, e As EventArgs) Handles MyBase.Load
#If DEBUG Then
Me.Size = New Size(1387, 579)
Me.Size = New Size(1344, 579)
#Else
Me.Size = New Size(483, 579)
Me.Size = New Size(452, 579)
cb_CardType.Items.Remove("Pass Power")
#End If
PopulateItems(cb_Item)
@ -27,6 +27,28 @@ Public Class PGFCreator
cx_Lang.Checked = True
cx_Origin.Checked = True
cb_Item.SelectedIndex = 0
WC.EventTitle = ""
EnDisAblePKM(False)
End Sub
'Enables/Disables controls until a .pk5 is given
Private Sub EnDisAblePKM(Enable As Boolean)
cb_AbilitySlot.Enabled = Enable
cb_Gender.Enabled = Enable
cb_Nature.Enabled = Enable
cb_OTGender.Enabled = Enable
cb_Shiny.Enabled = Enable
cx_IV.Enabled = Enable
cx_Lang.Enabled = Enable
cx_Origin.Enabled = Enable
cx_PID.Enabled = Enable
nud_Level.Enabled = Enable
lbl_AbilitySlot.Enabled = Enable
lbl_Gender.Enabled = Enable
lbl_Level.Enabled = Enable
lbl_Nature.Enabled = Enable
lbl_OTGender.Enabled = Enable
lbl_Shiny.Enabled = Enable
End Sub
'Updates the WC with selected settings
@ -40,15 +62,16 @@ Public Class PGFCreator
cx_PID_CheckedChanged(sender, e)
cx_IV_CheckedChanged(sender, e)
cx_Lang_CheckedChanged(sender, e)
cx_Origin_CheckedChanged(sender, e)
Cx_Origin_CheckedChanged(sender, e)
End Sub
'Grabs values from PK5
Private Sub GrabValues()
Try
With WC
'Try
With WC
Select Case WC.CardType
Case 1
Case 1
If lbl_PK5Name.Text <> "Open .pk5 ------->" Then
.TID = InputPK5.TID
.SID = InputPK5.SID
If cx_Origin.Checked = False Then .Origin = InputPK5.Origin
@ -78,15 +101,14 @@ Public Class PGFCreator
.Level = InputPK5.Level
ConvertValues()
Desc()
Case 2
.TID = GetItemID(cb_Item.Text)
Case 3
End If
Case Else
End Select
.CardFrom = &H44
.Status = 1
WC.CardFrom = &H44
WC.Status = 1
End With
Catch ex As Exception
End Try
'Catch ex As Exception
'End Try
End Sub
'Converts value format
@ -127,9 +149,68 @@ Public Class PGFCreator
TypeMove(lbl_Move2, lbl_Move2.Text)
TypeMove(lbl_Move3, lbl_Move3.Text)
TypeMove(lbl_Move4, lbl_Move4.Text)
Me.Refresh()
gb_PKDetails.Visible = True
End With
End Sub
'Figures out Language
Private Function Language(id As Byte)
Select Case id
Case &H1
Return "日本語 (Japan)"
Case &H2
Return "English (US/UK/AU)"
Case &H3
Return "Français (France/Québec)"
Case &H4
Return "Italiano (Italy)"
Case &H5
Return "Deutsch (Germany)"
Case &H7
Return "Español (Spain/Latin Americas)"
Case &H8
Return "한국어 (South Korea)"
Case Else
Return ""
End Select
End Function
'Figures out Origin
Private Function Origin(id As Byte)
Select Case id
Case &H1
Return "Sapphire"
Case &H2
Return "Ruby"
Case &H3
Return "Emerald"
Case &H4
Return "FireRed"
Case &H5
Return "LeafGreen"
Case &HF
Return "Colosseum/XD"
Case &HA
Return "Diamond"
Case &HB
Return "Pearl"
Case &HC
Return "Platinum"
Case &H7
Return "HeartGold"
Case &H8
Return "SoulSilver"
Case &H14
Return "White"
Case &H15
Return "Black"
Case &H16
Return "White 2"
Case &H17
Return "Black 2"
Case Else
Return ""
End Select
End Function
#Region "Controls"
'Change Card Type
Private Sub Cb_CardType_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cb_CardType.SelectedIndexChanged
@ -183,6 +264,7 @@ Public Class PGFCreator
lbl_PK5Name.Text = myFile
InputPK5.Data = File.ReadAllBytes(OpenFile.FileName)
End If
EnDisAblePKM(True)
GrabValues()
UpdateValues(sender, e)
End Sub
@ -233,9 +315,12 @@ Public Class PGFCreator
Case True
WC.PID = InputPK5.PID
cx_PID.Text = "Set PID"
HoverInfo.SetToolTip(cx_PID, "PID will be fixed To the PID from the .pk5
PID: " & Hex(InputPK5.PID))
Case False
WC.PID = &H0
cx_PID.Text = "Random PID"
HoverInfo.SetToolTip(cx_PID, "PID will be randomized upon recieval in-game")
End Select
End Sub
@ -250,6 +335,8 @@ Public Class PGFCreator
WC.IV_SPA = InputPK5.IV_SPA
WC.IV_SPD = InputPK5.IV_SPD
cx_IV.Text = "Set IVs"
HoverInfo.SetToolTip(cx_IV, "IVs will be fixed to the IVs from the .pk5
" & lbl_IVs.Text)
Case False
WC.IV_HP = &HFF
WC.IV_ATK = &HFF
@ -258,6 +345,7 @@ Public Class PGFCreator
WC.IV_SPA = &HFF
WC.IV_SPD = &HFF
cx_IV.Text = "Random IVs"
HoverInfo.SetToolTip(cx_IV, "IVs will be randomized upon recieval in-game")
End Select
End Sub
@ -267,9 +355,12 @@ Public Class PGFCreator
Case True
WC.Language = &H0
cx_Lang.Text = "Recipient Language"
HoverInfo.SetToolTip(cx_Lang, "Language will be the recieving game's language")
Case False
WC.Language = InputPK5.Language
cx_Lang.Text = "Set Language"
HoverInfo.SetToolTip(cx_Lang, "Language will be fixed to the language from the .pk5
Language: " & Language(InputPK5.Language))
End Select
End Sub
@ -278,27 +369,32 @@ Public Class PGFCreator
Select Case cx_Origin.Checked
Case True
WC.Origin = &H0
cx_Lang.Text = "Recipient Origin Game"
cx_Origin.Text = "Recipient Origin Game"
HoverInfo.SetToolTip(cx_Origin, "Origin will be the recieving game's origin")
Case False
WC.Origin = InputPK5.Origin
cx_Lang.Text = "Set Origin Game"
cx_Origin.Text = "Set Origin Game"
HoverInfo.SetToolTip(cx_Origin, "Origin will be fixed to the origin from the .pk5
Game: " & Origin(InputPK5.Origin))
End Select
End Sub
'Choose Item
Private Sub Cb_Item_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cb_Item.SelectedIndexChanged
WC.TID = GetItemID(cb_Item.Text)
GrabValues()
End Sub
'Choose Pass Power ID
'No Known Info on this
Private Sub Nud_Power_ValueChanged(sender As Object, e As EventArgs) Handles nud_Power.ValueChanged
WC.TID = nud_Power.Value
GrabValues()
End Sub
'Output Button
Private Sub Btn_Done_Click(sender As Object, e As EventArgs) Handles btn_Done.Click
My.Computer.FileSystem.WriteAllBytes(Main.Local & "\output.pgf", WC.Data, False)
My.Computer.FileSystem.WriteAllBytes(Main5.Local & "\output.pgf", WC.Data, False)
End Sub
#End Region
End Class

View File

@ -128,10 +128,10 @@
<None Include="Form3.vb">
<SubType>Form</SubType>
</None>
<Compile Include="Main.Designer.vb">
<DependentUpon>Main.vb</DependentUpon>
<Compile Include="Main5.Designer.vb">
<DependentUpon>Main5.vb</DependentUpon>
</Compile>
<Compile Include="Main.vb">
<Compile Include="Main5.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="IniFile.vb" />
@ -154,10 +154,10 @@
<Compile Include="options.Designer.vb">
<DependentUpon>options.vb</DependentUpon>
</Compile>
<Compile Include="options.vb">
<None Include="options.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="PCD.vb" />
</None>
<None Include="PCD.vb" />
<Compile Include="PGF.vb" />
<Compile Include="PGFCreator.Designer.vb">
<DependentUpon>PGFCreator.vb</DependentUpon>
@ -182,8 +182,8 @@
<EmbeddedResource Include="Form3.resx">
<DependentUpon>Form3.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Main.resx">
<DependentUpon>Main.vb</DependentUpon>
<EmbeddedResource Include="Main5.resx">
<DependentUpon>Main5.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>

Binary file not shown.

View File

@ -1,4 +1,4 @@
# Gen 5 Pokémon Distribution ROM Creator ![Language](https://img.shields.io/badge/Language-Visual%20Basic-blue.svg) ![Version](https://img.shields.io/badge/dynamic/json.svg?label=Version&url=https%3A%2F%2Fraw.githubusercontent.com%2FPlasticJustice%2FPKMG5DC%2Fmaster%2FGen5%2520Distribution%2520Creator%2Fbin%2FDebug%2Fversion.json&query=%24.version&colorB=10ADED&prefix=v)
# Gen 5 Pokémon Distribution ROM Creator ![Language](https://img.shields.io/badge/Language-Visual%20Basic-blue.svg) ![Version](https://img.shields.io/badge/dynamic/json.svg?label=Version&url=https%3A%2F%2Fraw.githubusercontent.com%2FPlasticJustice%2FPKMG5DC%2Fmaster%2FPKMG5DC%2Fbin%2FDebug%2Fversion.json&query=%24.version&colorB=10ADED&prefix=v)
This program can build custom Gen 5 Pokémon Distribution ROMs from a .pgf event file and a clean copy of the Liberty Ticket distribution ROM (both not included).