Simplify conteststat editor usage

make consistent with interface names
This commit is contained in:
Kurt 2018-06-02 22:04:32 -07:00
parent ae3b6a7fa1
commit 27e917551f
3 changed files with 15 additions and 46 deletions

View file

@ -11,32 +11,32 @@ namespace PKHeX.WinForms.Controls
InitializeComponent();
}
public int Sheen
public int CNT_Sheen
{
get => Util.ToInt32(TB_Sheen.Text);
set => TB_Sheen.Text = value.ToString();
}
public int Cool
public int CNT_Cool
{
get => Util.ToInt32(TB_Cool.Text);
set => TB_Cool.Text = value.ToString();
}
public int Beauty
public int CNT_Beauty
{
get => Util.ToInt32(TB_Beauty.Text);
set => TB_Beauty.Text = value.ToString();
}
public int Cute
public int CNT_Cute
{
get => Util.ToInt32(TB_Cute.Text);
set => TB_Cute.Text = value.ToString();
}
public int Smart
public int CNT_Smart
{
get => Util.ToInt32(TB_Smart.Text);
set => TB_Smart.Text = value.ToString();
}
public int Tough
public int CNT_Tough
{
get => Util.ToInt32(TB_Tough.Text);
set => TB_Tough.Text = value.ToString();
@ -48,9 +48,9 @@ namespace PKHeX.WinForms.Controls
tb.Text = "255";
}
public void ToggleInterface(int gen)
public void ToggleInterface(object o, int gen = PKX.Generation)
{
if (gen < 3)
if (!(o is IContestStats))
{
Visible = false;
return;
@ -61,36 +61,5 @@ namespace PKHeX.WinForms.Controls
Label_Smart.Visible = smart; // show smart gen3-5
Label_Clever.Visible = !smart; // show clever gen6+
}
public int CNT_Cool
{
get => Cool;
set => Cool = value;
}
public int CNT_Beauty
{
get => Beauty;
set => Beauty = value;
}
public int CNT_Cute
{
get => Cute;
set => Cute = value;
}
public int CNT_Smart
{
get => Smart;
set => Smart = value;
}
public int CNT_Tough
{
get => Tough;
set => Tough = value;
}
public int CNT_Sheen
{
get => Sheen;
set => Sheen = value;
}
}
}

View file

@ -2507,17 +2507,17 @@
//
// Contest
//
this.Contest.Beauty = 0;
this.Contest.Cool = 0;
this.Contest.Cute = 0;
this.Contest.CNT_Beauty = 0;
this.Contest.CNT_Cool = 0;
this.Contest.CNT_Cute = 0;
this.Contest.CNT_Sheen = 0;
this.Contest.CNT_Smart = 0;
this.Contest.CNT_Tough = 0;
this.Contest.Location = new System.Drawing.Point(21, 247);
this.Contest.Margin = new System.Windows.Forms.Padding(0);
this.Contest.Name = "Contest";
this.Contest.Sheen = 0;
this.Contest.Size = new System.Drawing.Size(230, 50);
this.Contest.Smart = 0;
this.Contest.TabIndex = 117;
this.Contest.Tough = 0;
//
// TID_Trainer
//

View file

@ -1524,7 +1524,7 @@ namespace PKHeX.WinForms.Controls
FLP_EncounterType.Visible = gen >= 4 && gen <= 6;
FLP_TimeOfDay.Visible = gen == 2;
Contest.ToggleInterface(gen);
Contest.ToggleInterface(pkm, gen);
Stats.ToggleInterface(gen);
CenterSubEditors();