Minor clean

This commit is contained in:
Kurt 2019-11-26 10:45:36 -08:00
parent 0f96b3c4d5
commit 6627d7e2f4
3 changed files with 8 additions and 9 deletions

View file

@ -98,6 +98,7 @@ namespace PKHeX.Core
public override int CurrentBox { get => BoxLayout.CurrentBox; set => BoxLayout.CurrentBox = value; }
protected int BattleBoxOffset;
public bool BattleBoxLocked
{
get => Data[BattleBoxOffset + 0x358] != 0; // wifi/live

View file

@ -17,7 +17,7 @@ namespace PKHeX.Core
get => Encoding.ASCII.GetString(Data, 0x39, 3);
set
{
for (int i = 0; i < 3; i++)
for (int i = 0; i < 3; i++)
Data[0x39 + i] = (byte) (value.Length > i ? value[i] : '0');
SAV.Edited = true;
}

View file

@ -122,8 +122,7 @@ namespace PKHeX.WinForms
int index = Bytes.IndexOf(nud);
Raw[index] = (byte)nud.Value;
string str = GetString();
TB_Text.Text = str;
TB_Text.Text = GetString();
editing = false;
}
@ -190,13 +189,12 @@ namespace PKHeX.WinForms
private static ushort[] GetChars(int generation)
{
switch (generation)
return generation switch
{
case 6:
case 7:
return chars67;
default: return Array.Empty<ushort>();
}
6 => chars67,
7 => chars67,
_ => Array.Empty<ushort>()
};
}
private static readonly ushort[] chars67 =