mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-16 09:08:02 +00:00
02420d3e93
* Handle some nullable cases Refactor MysteryGift into a second abstract class (backed by a byte array, or fake data) Make some classes have explicit constructors instead of { } initialization * Handle bits more obviously without null * Make SaveFile.BAK explicitly readonly again * merge constructor methods to have readonly fields * Inline some properties * More nullable handling * Rearrange box actions define straightforward classes to not have any null properties * Make extrabyte reference array immutable * Move tooltip creation to designer * Rearrange some logic to reduce nesting * Cache generated fonts * Split mystery gift album purpose * Handle more tooltips * Disallow null setters * Don't capture RNG object, only type enum * Unify learnset objects Now have readonly properties which are never null don't new() empty learnsets (>800 Learnset objects no longer created, total of 2400 objects since we also new() a move & level array) optimize g1/2 reader for early abort case * Access rewrite Initialize blocks in a separate object, and get via that object removes a couple hundred "might be null" warnings since blocks are now readonly getters some block references have been relocated, but interfaces should expose all that's needed put HoF6 controls in a groupbox, and disable * Readonly personal data * IVs non nullable for mystery gift * Explicitly initialize forced encounter moves * Make shadow objects readonly & non-null Put murkrow fix in binary data resource, instead of on startup * Assign dex form fetch on constructor Fixes legality parsing edge cases also handle cxd parse for valid; exit before exception is thrown in FrameGenerator * Remove unnecessary null checks * Keep empty value until init SetPouch sets the value to an actual one during load, but whatever * Readonly team lock data * Readonly locks Put locked encounters at bottom (favor unlocked) * Mail readonly data / offset Rearrange some call flow and pass defaults Add fake classes for SaveDataEditor mocking Always party size, no need to check twice in stat editor use a fake save file as initial data for savedata editor, and for gamedata (wow i found a usage) constrain eventwork editor to struct variable types (uint, int, etc), thus preventing null assignment errors
204 lines
No EOL
7.6 KiB
C#
204 lines
No EOL
7.6 KiB
C#
using System.ComponentModel;
|
|
using System.Windows.Forms;
|
|
|
|
namespace PKHeX.WinForms
|
|
{
|
|
partial class QR
|
|
{
|
|
/// <summary>
|
|
/// Required designer variable.
|
|
/// </summary>
|
|
private 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);
|
|
qr?.Dispose();
|
|
}
|
|
|
|
#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()
|
|
{
|
|
this.PB_QR = new System.Windows.Forms.PictureBox();
|
|
this.NUD_Box = new System.Windows.Forms.NumericUpDown();
|
|
this.label1 = new System.Windows.Forms.Label();
|
|
this.label2 = new System.Windows.Forms.Label();
|
|
this.NUD_Slot = new System.Windows.Forms.NumericUpDown();
|
|
this.label3 = new System.Windows.Forms.Label();
|
|
this.NUD_Copies = new System.Windows.Forms.NumericUpDown();
|
|
this.B_Refresh = new System.Windows.Forms.Button();
|
|
((System.ComponentModel.ISupportInitialize)(this.PB_QR)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.NUD_Box)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.NUD_Slot)).BeginInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.NUD_Copies)).BeginInit();
|
|
this.SuspendLayout();
|
|
//
|
|
// PB_QR
|
|
//
|
|
this.PB_QR.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
| System.Windows.Forms.AnchorStyles.Right)));
|
|
this.PB_QR.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
|
this.PB_QR.Location = new System.Drawing.Point(2, 1);
|
|
this.PB_QR.Name = "PB_QR";
|
|
this.PB_QR.Size = new System.Drawing.Size(405, 455);
|
|
this.PB_QR.TabIndex = 0;
|
|
this.PB_QR.TabStop = false;
|
|
this.PB_QR.Click += new System.EventHandler(this.PB_QR_Click);
|
|
//
|
|
// NUD_Box
|
|
//
|
|
this.NUD_Box.Location = new System.Drawing.Point(38, 465);
|
|
this.NUD_Box.Maximum = new decimal(new int[] {
|
|
32,
|
|
0,
|
|
0,
|
|
0});
|
|
this.NUD_Box.Minimum = new decimal(new int[] {
|
|
1,
|
|
0,
|
|
0,
|
|
0});
|
|
this.NUD_Box.Name = "NUD_Box";
|
|
this.NUD_Box.Size = new System.Drawing.Size(61, 20);
|
|
this.NUD_Box.TabIndex = 2;
|
|
this.NUD_Box.Value = new decimal(new int[] {
|
|
1,
|
|
0,
|
|
0,
|
|
0});
|
|
//
|
|
// label1
|
|
//
|
|
this.label1.AutoSize = true;
|
|
this.label1.Location = new System.Drawing.Point(4, 467);
|
|
this.label1.Name = "label1";
|
|
this.label1.Size = new System.Drawing.Size(28, 13);
|
|
this.label1.TabIndex = 3;
|
|
this.label1.Text = "Box:";
|
|
//
|
|
// label2
|
|
//
|
|
this.label2.AutoSize = true;
|
|
this.label2.Location = new System.Drawing.Point(105, 467);
|
|
this.label2.Name = "label2";
|
|
this.label2.Size = new System.Drawing.Size(28, 13);
|
|
this.label2.TabIndex = 5;
|
|
this.label2.Text = "Slot:";
|
|
//
|
|
// NUD_Slot
|
|
//
|
|
this.NUD_Slot.Location = new System.Drawing.Point(139, 465);
|
|
this.NUD_Slot.Maximum = new decimal(new int[] {
|
|
30,
|
|
0,
|
|
0,
|
|
0});
|
|
this.NUD_Slot.Minimum = new decimal(new int[] {
|
|
1,
|
|
0,
|
|
0,
|
|
0});
|
|
this.NUD_Slot.Name = "NUD_Slot";
|
|
this.NUD_Slot.Size = new System.Drawing.Size(61, 20);
|
|
this.NUD_Slot.TabIndex = 4;
|
|
this.NUD_Slot.Value = new decimal(new int[] {
|
|
1,
|
|
0,
|
|
0,
|
|
0});
|
|
//
|
|
// label3
|
|
//
|
|
this.label3.AutoSize = true;
|
|
this.label3.Location = new System.Drawing.Point(211, 467);
|
|
this.label3.Name = "label3";
|
|
this.label3.Size = new System.Drawing.Size(42, 13);
|
|
this.label3.TabIndex = 7;
|
|
this.label3.Text = "Copies:";
|
|
//
|
|
// NUD_Copies
|
|
//
|
|
this.NUD_Copies.Location = new System.Drawing.Point(259, 465);
|
|
this.NUD_Copies.Maximum = new decimal(new int[] {
|
|
960,
|
|
0,
|
|
0,
|
|
0});
|
|
this.NUD_Copies.Minimum = new decimal(new int[] {
|
|
1,
|
|
0,
|
|
0,
|
|
0});
|
|
this.NUD_Copies.Name = "NUD_Copies";
|
|
this.NUD_Copies.Size = new System.Drawing.Size(52, 20);
|
|
this.NUD_Copies.TabIndex = 6;
|
|
this.NUD_Copies.Value = new decimal(new int[] {
|
|
1,
|
|
0,
|
|
0,
|
|
0});
|
|
//
|
|
// B_Refresh
|
|
//
|
|
this.B_Refresh.Location = new System.Drawing.Point(317, 464);
|
|
this.B_Refresh.Name = "B_Refresh";
|
|
this.B_Refresh.Size = new System.Drawing.Size(80, 23);
|
|
this.B_Refresh.TabIndex = 8;
|
|
this.B_Refresh.Text = "Refresh";
|
|
this.B_Refresh.UseVisualStyleBackColor = true;
|
|
this.B_Refresh.Click += new System.EventHandler(this.UpdateBoxSlotCopies);
|
|
//
|
|
// QR
|
|
//
|
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
this.ClientSize = new System.Drawing.Size(409, 407);
|
|
this.Controls.Add(this.B_Refresh);
|
|
this.Controls.Add(this.label3);
|
|
this.Controls.Add(this.NUD_Copies);
|
|
this.Controls.Add(this.label2);
|
|
this.Controls.Add(this.NUD_Slot);
|
|
this.Controls.Add(this.label1);
|
|
this.Controls.Add(this.NUD_Box);
|
|
this.Controls.Add(this.PB_QR);
|
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
|
this.Icon = global::PKHeX.WinForms.Properties.Resources.Icon;
|
|
this.MaximizeBox = false;
|
|
this.MinimizeBox = false;
|
|
this.Name = "QR";
|
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
|
this.Text = "PKHeX QR Code (Click QR to Copy Image)";
|
|
((System.ComponentModel.ISupportInitialize)(this.PB_QR)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.NUD_Box)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.NUD_Slot)).EndInit();
|
|
((System.ComponentModel.ISupportInitialize)(this.NUD_Copies)).EndInit();
|
|
this.ResumeLayout(false);
|
|
this.PerformLayout();
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
private PictureBox PB_QR;
|
|
private NumericUpDown NUD_Box;
|
|
private Label label1;
|
|
private Label label2;
|
|
private NumericUpDown NUD_Slot;
|
|
private Label label3;
|
|
private NumericUpDown NUD_Copies;
|
|
private Button B_Refresh;
|
|
}
|
|
} |