From f9b4c1950b20c40889f801ae17b8a545ec2fd193 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 15 Aug 2020 19:13:15 -0400 Subject: [PATCH] Add Catch Rate to KChart (#2972) --- PKHeX.WinForms/Subforms/KChart.Designer.cs | 10 ++++++++++ PKHeX.WinForms/Subforms/KChart.cs | 1 + 2 files changed, 11 insertions(+) diff --git a/PKHeX.WinForms/Subforms/KChart.Designer.cs b/PKHeX.WinForms/Subforms/KChart.Designer.cs index 2c6997cc9..6d0b57080 100644 --- a/PKHeX.WinForms/Subforms/KChart.Designer.cs +++ b/PKHeX.WinForms/Subforms/KChart.Designer.cs @@ -34,6 +34,7 @@ private void InitializeComponent() 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 @@ private void InitializeComponent() this.SpecName, this.New, this.BST, + this.CatchRate, this.Type1, this.Type2, this.HP, @@ -118,6 +120,13 @@ private void InitializeComponent() 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 void InitializeComponent() 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; diff --git a/PKHeX.WinForms/Subforms/KChart.cs b/PKHeX.WinForms/Subforms/KChart.cs index 76f6a710a..0663c295f 100644 --- a/PKHeX.WinForms/Subforms/KChart.cs +++ b/PKHeX.WinForms/Subforms/KChart.cs @@ -54,6 +54,7 @@ private void PopEntry(int index) 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);