Add Catch Rate to KChart (#2972)

This commit is contained in:
Matt 2020-08-15 19:13:15 -04:00 committed by GitHub
parent 1e6858c349
commit f9b4c1950b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -34,6 +34,7 @@
this.SpecName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.New = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.BST = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CatchRate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Type1 = new System.Windows.Forms.DataGridViewImageColumn();
this.Type2 = new System.Windows.Forms.DataGridViewImageColumn();
this.HP = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -61,6 +62,7 @@
this.SpecName,
this.New,
this.BST,
this.CatchRate,
this.Type1,
this.Type2,
this.HP,
@ -118,6 +120,13 @@
this.BST.ReadOnly = true;
this.BST.Width = 53;
//
// CatchRate
//
this.CatchRate.HeaderText = "Catch Rate";
this.CatchRate.Name = "CatchRate";
this.CatchRate.ReadOnly = true;
this.CatchRate.Width = 85;
//
// Type1
//
this.Type1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
@ -228,6 +237,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn SpecName;
private System.Windows.Forms.DataGridViewCheckBoxColumn New;
private System.Windows.Forms.DataGridViewTextBoxColumn BST;
private System.Windows.Forms.DataGridViewTextBoxColumn CatchRate;
private System.Windows.Forms.DataGridViewImageColumn Type1;
private System.Windows.Forms.DataGridViewImageColumn Type2;
private System.Windows.Forms.DataGridViewTextBoxColumn HP;

View file

@ -54,6 +54,7 @@ namespace PKHeX.WinForms
row.Cells[r++].Value = GetIsNative(p, s);
row.Cells[r].Style.BackColor = ImageUtil.ColorBaseStatTotal(p.BST);
row.Cells[r++].Value = p.BST.ToString("000");
row.Cells[r++].Value = p.CatchRate.ToString("000");
row.Cells[r++].Value = SpriteUtil.GetTypeSprite(p.Type1, SAV.Generation);
row.Cells[r++].Value = p.Type1 == p.Type2 ? SpriteUtil.Spriter.Transparent : SpriteUtil.GetTypeSprite(p.Type2, SAV.Generation);
row.Cells[r].Style.BackColor = ImageUtil.ColorBaseStat(p.HP);