Use wider sprite boxes for Mystery Gift album display

This commit is contained in:
Kurt
2021-04-09 16:37:32 -07:00
parent b3b60894b6
commit d73baebad2
2 changed files with 23 additions and 20 deletions

View File

@@ -56,7 +56,7 @@ private void InitializeComponent()
// 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(391, 326);
this.B_Save.Location = new System.Drawing.Point(533, 476);
this.B_Save.Name = "B_Save";
this.B_Save.Size = new System.Drawing.Size(75, 23);
this.B_Save.TabIndex = 9;
@@ -67,7 +67,7 @@ private void InitializeComponent()
// 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(320, 326);
this.B_Cancel.Location = new System.Drawing.Point(462, 476);
this.B_Cancel.Name = "B_Cancel";
this.B_Cancel.Size = new System.Drawing.Size(71, 23);
this.B_Cancel.TabIndex = 8;
@@ -78,18 +78,18 @@ private void InitializeComponent()
// B_Output
//
this.B_Output.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.B_Output.Location = new System.Drawing.Point(391, 12);
this.B_Output.Location = new System.Drawing.Point(533, 12);
this.B_Output.Name = "B_Output";
this.B_Output.Size = new System.Drawing.Size(75, 23);
this.B_Output.TabIndex = 2;
this.B_Output.Text = "Output";
this.B_Output.Text = "Export";
this.B_Output.UseVisualStyleBackColor = true;
this.B_Output.Click += new System.EventHandler(this.B_Output_Click);
//
// B_Import
//
this.B_Import.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.B_Import.Location = new System.Drawing.Point(391, 34);
this.B_Import.Location = new System.Drawing.Point(533, 34);
this.B_Import.Name = "B_Import";
this.B_Import.Size = new System.Drawing.Size(75, 23);
this.B_Import.TabIndex = 3;
@@ -106,7 +106,7 @@ private void InitializeComponent()
this.LB_Received.Location = new System.Drawing.Point(12, 31);
this.LB_Received.Name = "LB_Received";
this.LB_Received.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.LB_Received.Size = new System.Drawing.Size(78, 316);
this.LB_Received.Size = new System.Drawing.Size(78, 472);
this.LB_Received.Sorted = true;
this.LB_Received.TabIndex = 1;
this.LB_Received.KeyDown += new System.Windows.Forms.KeyEventHandler(this.LB_Received_KeyDown);
@@ -141,7 +141,7 @@ private void InitializeComponent()
this.RTB.Location = new System.Drawing.Point(111, 59);
this.RTB.Name = "RTB";
this.RTB.ReadOnly = true;
this.RTB.Size = new System.Drawing.Size(355, 100);
this.RTB.Size = new System.Drawing.Size(497, 100);
this.RTB.TabIndex = 4;
this.RTB.Text = "";
//
@@ -157,7 +157,7 @@ private void InitializeComponent()
// L_QR
//
this.L_QR.AutoSize = true;
this.L_QR.Location = new System.Drawing.Point(249, 7);
this.L_QR.Location = new System.Drawing.Point(259, 21);
this.L_QR.Name = "L_QR";
this.L_QR.Size = new System.Drawing.Size(26, 13);
this.L_QR.TabIndex = 62;
@@ -167,9 +167,9 @@ private void InitializeComponent()
// PB_Preview
//
this.PB_Preview.BackColor = System.Drawing.Color.Transparent;
this.PB_Preview.Location = new System.Drawing.Point(242, 23);
this.PB_Preview.Location = new System.Drawing.Point(295, 2);
this.PB_Preview.Name = "PB_Preview";
this.PB_Preview.Size = new System.Drawing.Size(40, 30);
this.PB_Preview.Size = new System.Drawing.Size(68, 56);
this.PB_Preview.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.PB_Preview.TabIndex = 63;
this.PB_Preview.TabStop = false;
@@ -212,13 +212,13 @@ private void InitializeComponent()
this.FLP_Gifts.AutoScroll = true;
this.FLP_Gifts.Location = new System.Drawing.Point(111, 164);
this.FLP_Gifts.Name = "FLP_Gifts";
this.FLP_Gifts.Size = new System.Drawing.Size(355, 153);
this.FLP_Gifts.Size = new System.Drawing.Size(497, 306);
this.FLP_Gifts.TabIndex = 5;
//
// B_UnusedAll
//
this.B_UnusedAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.B_UnusedAll.Location = new System.Drawing.Point(111, 326);
this.B_UnusedAll.Location = new System.Drawing.Point(253, 476);
this.B_UnusedAll.Name = "B_UnusedAll";
this.B_UnusedAll.Size = new System.Drawing.Size(71, 23);
this.B_UnusedAll.TabIndex = 6;
@@ -229,7 +229,7 @@ private void InitializeComponent()
// B_UsedAll
//
this.B_UsedAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.B_UsedAll.Location = new System.Drawing.Point(182, 326);
this.B_UsedAll.Location = new System.Drawing.Point(324, 476);
this.B_UsedAll.Name = "B_UsedAll";
this.B_UsedAll.Size = new System.Drawing.Size(75, 23);
this.B_UsedAll.TabIndex = 7;
@@ -242,7 +242,7 @@ private void InitializeComponent()
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(492, 369);
this.ClientSize = new System.Drawing.Size(634, 511);
this.Controls.Add(this.B_UnusedAll);
this.Controls.Add(this.B_UsedAll);
this.Controls.Add(this.FLP_Gifts);
@@ -260,7 +260,7 @@ private void InitializeComponent()
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(700, 600);
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(500, 400);
this.MinimumSize = new System.Drawing.Size(650, 550);
this.Name = "SAV_Wondercard";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Wonder Card I/O";

View File

@@ -6,6 +6,7 @@
using System.Linq;
using System.Windows.Forms;
using PKHeX.Drawing;
using PKHeX.WinForms.Controls;
using static PKHeX.Core.MessageStrings;
namespace PKHeX.WinForms
@@ -14,6 +15,7 @@ public partial class SAV_Wondercard : Form
{
private readonly SaveFile Origin;
private readonly SaveFile SAV;
private readonly SummaryPreviewer Summary = new();
public SAV_Wondercard(SaveFile sav, DataMysteryGift? g = null)
{
@@ -28,13 +30,14 @@ public SAV_Wondercard(SaveFile sav, DataMysteryGift? g = null)
5 or 6 or 7 => PopulateViewGiftsG567().ToArray(),
_ => throw new ArgumentException("Game not supported."),
};
foreach (PictureBox pb in pba)
foreach (var pb in pba)
{
pb.AllowDrop = true;
pb.DragDrop += BoxSlot_DragDrop;
pb.DragEnter += BoxSlot_DragEnter;
pb.MouseDown += BoxSlot_MouseDown;
pb.ContextMenuStrip = mnuVSD;
pb.MouseHover += (_, _) => Summary.Show(pb, mga.Gifts[pba.IndexOf(pb)]);
}
SetGiftBoxes();
@@ -584,8 +587,8 @@ private static FlowLayoutPanel GetFlowLayoutPanel()
{
return new()
{
Width = 305,
Height = 34,
Width = 480,
Height = 60,
Padding = new Padding(0),
Margin = new Padding(0),
};
@@ -595,7 +598,7 @@ private static Label GetLabel(string text)
{
return new()
{
Size = new Size(40, 34),
Size = new Size(40, 60),
AutoSize = false,
TextAlign = ContentAlignment.MiddleRight,
Text = text,
@@ -608,7 +611,7 @@ private static PictureBox GetPictureBox()
{
return new()
{
Size = new Size(42, 32),
Size = new Size(70, 58),
SizeMode = PictureBoxSizeMode.CenterImage,
BorderStyle = BorderStyle.FixedSingle,
BackColor = Color.Transparent,