Use pokegrid for encounter db browser

Add icons for the database contextmenu items
This commit is contained in:
Kurt 2019-10-05 14:29:15 -07:00
parent 40db929166
commit e81deff512
4 changed files with 51 additions and 1118 deletions

View file

@ -47,6 +47,7 @@
this.Menu_Import = new System.Windows.Forms.ToolStripMenuItem();
this.Menu_DeleteClones = new System.Windows.Forms.ToolStripMenuItem();
this.P_Results = new System.Windows.Forms.Panel();
this.pokeGrid1 = new PKHeX.WinForms.Controls.PokeGrid();
this.CB_Ability = new System.Windows.Forms.ComboBox();
this.CB_HeldItem = new System.Windows.Forms.ComboBox();
this.CB_Nature = new System.Windows.Forms.ComboBox();
@ -96,7 +97,6 @@
this.mnuView = new System.Windows.Forms.ToolStripMenuItem();
this.mnuDelete = new System.Windows.Forms.ToolStripMenuItem();
this.hover = new System.Windows.Forms.ToolTip(this.components);
this.pokeGrid1 = new PKHeX.WinForms.Controls.PokeGrid();
this.menuStrip1.SuspendLayout();
this.P_Results.SuspendLayout();
this.FLP_Egg.SuspendLayout();
@ -277,6 +277,15 @@
this.P_Results.Size = new System.Drawing.Size(285, 352);
this.P_Results.TabIndex = 66;
//
// pokeGrid1
//
this.pokeGrid1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.pokeGrid1.Location = new System.Drawing.Point(2, 2);
this.pokeGrid1.Margin = new System.Windows.Forms.Padding(0);
this.pokeGrid1.Name = "pokeGrid1";
this.pokeGrid1.Size = new System.Drawing.Size(251, 346);
this.pokeGrid1.TabIndex = 2;
//
// CB_Ability
//
this.CB_Ability.Anchor = System.Windows.Forms.AnchorStyles.Left;
@ -928,25 +937,19 @@
//
// mnuView
//
this.mnuView.Image = global::PKHeX.WinForms.Properties.Resources.other;
this.mnuView.Name = "mnuView";
this.mnuView.Size = new System.Drawing.Size(107, 22);
this.mnuView.Text = "View";
//
// mnuDelete
//
this.mnuDelete.Image = global::PKHeX.WinForms.Properties.Resources.nocheck;
this.mnuDelete.Name = "mnuDelete";
this.mnuDelete.Size = new System.Drawing.Size(107, 22);
this.mnuDelete.Text = "Delete";
this.mnuDelete.Click += new System.EventHandler(this.ClickDelete);
//
// pokeGrid1
//
this.pokeGrid1.Location = new System.Drawing.Point(2, 2);
this.pokeGrid1.Margin = new System.Windows.Forms.Padding(0);
this.pokeGrid1.Name = "pokeGrid1";
this.pokeGrid1.Size = new System.Drawing.Size(251, 346);
this.pokeGrid1.TabIndex = 2;
//
// SAV_Database
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

File diff suppressed because it is too large Load diff

View file

@ -23,28 +23,16 @@ namespace PKHeX.WinForms
{
InitializeComponent();
ToolStripMenuItem mnuView = new ToolStripMenuItem {Name = "mnuView", Text = "View"};
ToolStripMenuItem mnuView = new ToolStripMenuItem {Name = "mnuView", Text = "View", Image = Resources.other };
ContextMenuStrip mnu = new ContextMenuStrip();
mnu.Items.AddRange(new ToolStripItem[] { mnuView });
PKME_Tabs = f1;
PKXBOXES = new[]
{
bpkx1, bpkx2, bpkx3, bpkx4, bpkx5, bpkx6,
bpkx7, bpkx8, bpkx9, bpkx10,bpkx11,bpkx12,
bpkx13,bpkx14,bpkx15,bpkx16,bpkx17,bpkx18,
bpkx19,bpkx20,bpkx21,bpkx22,bpkx23,bpkx24,
bpkx25,bpkx26,bpkx27,bpkx28,bpkx29,bpkx30,
bpkx31,bpkx32,bpkx33,bpkx34,bpkx35,bpkx36,
bpkx37,bpkx38,bpkx39,bpkx40,bpkx41,bpkx42,
bpkx43,bpkx44,bpkx45,bpkx46,bpkx47,bpkx48,
bpkx49,bpkx50,bpkx51,bpkx52,bpkx53,bpkx54,
bpkx55,bpkx56,bpkx57,bpkx58,bpkx59,bpkx60,
bpkx61,bpkx62,bpkx63,bpkx64,bpkx65,bpkx66,
};
pokeGrid1.InitializeGrid(6, 11);
pokeGrid1.SetBackground(Resources.box_wp_clean);
PKXBOXES = pokeGrid1.Entries.ToArray();
// Enable Scrolling when hovered over
foreach (var slot in PKXBOXES)
@ -334,7 +322,7 @@ namespace PKHeX.WinForms
protected override void OnMouseWheel(MouseEventArgs e)
{
if (!PAN_Box.RectangleToScreen(PAN_Box.ClientRectangle).Contains(MousePosition))
if (!pokeGrid1.RectangleToScreen(pokeGrid1.ClientRectangle).Contains(MousePosition))
return;
int oldval = SCR_Box.Value;
int newval = oldval + (e.Delta < 0 ? 1 : -1);

View file

@ -24,9 +24,9 @@ namespace PKHeX.WinForms
{
InitializeComponent();
ToolStripMenuItem mnuView = new ToolStripMenuItem { Name = "mnuView", Text = "View" };
ToolStripMenuItem mnuSaveMG = new ToolStripMenuItem { Name = "mnuSaveMG", Text = "Save Gift" };
ToolStripMenuItem mnuSavePK = new ToolStripMenuItem { Name = "mnuSavePK", Text = "Save PKM" };
ToolStripMenuItem mnuView = new ToolStripMenuItem { Name = "mnuView", Text = "View", Image = Resources.other };
ToolStripMenuItem mnuSaveMG = new ToolStripMenuItem { Name = "mnuSaveMG", Text = "Save Gift", Image = Resources.gift };
ToolStripMenuItem mnuSavePK = new ToolStripMenuItem { Name = "mnuSavePK", Text = "Save PKM", Image = Resources.savePKM };
WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
ContextMenuStrip mnu = new ContextMenuStrip();