private void GetEntry() { // Load Bools for the data int pk = species; // Load Partitions for (int i = 0; i < 9; i++) { CP[i].Checked = specbools[i, pk - 1]; } for (int i = 0; i < 7; i++) { CL[i].Checked = langbools[i, pk - 1]; } int gt = SAV.Personal[pk].Gender; CHK_P2.Enabled = CHK_P4.Enabled = CHK_P6.Enabled = CHK_P8.Enabled = gt != 254; // Not Female-Only CHK_P3.Enabled = CHK_P5.Enabled = CHK_P7.Enabled = CHK_P9.Enabled = !(gt == 0 || (gt == 255)); // Not Male-Only and Not Genderless CLB_FormsSeen.Items.Clear(); CLB_FormDisplayed.Items.Clear(); int fc = SAV.Personal[species].FormeCount; int f = SAV.B2W2 ? SaveUtil.GetDexFormIndexB2W2(species, fc) : SaveUtil.GetDexFormIndexBW(species, fc); if (f < 0) { return; } string[] forms = PKX.GetFormList(species, GameInfo.Strings.types, GameInfo.Strings.forms, Main.GenderSymbols); if (forms.Length < 1) { return; } for (int i = 0; i < forms.Length; i++) // Seen { CLB_FormsSeen.Items.Add(forms[i], formbools[f + i + 0 * FormLen * 8]); } for (int i = 0; i < forms.Length; i++) // Seen Shiny { CLB_FormsSeen.Items.Add("* " + forms[i], formbools[f + i + 1 * FormLen * 8]); } for (int i = 0; i < forms.Length; i++) // Displayed { CLB_FormDisplayed.Items.Add(forms[i], formbools[f + i + 2 * FormLen * 8]); } for (int i = 0; i < forms.Length; i++) // Displayed Shiny { CLB_FormDisplayed.Items.Add("* " + forms[i], formbools[f + i + 3 * FormLen * 8]); } }
private void SetEntry() { if (species < 0) { return; } specbools[0, species - 1] = CHK_P1.Checked; specbools[1, species - 1] = CHK_P2.Checked; specbools[2, species - 1] = CHK_P3.Checked; specbools[3, species - 1] = CHK_P4.Checked; specbools[4, species - 1] = CHK_P5.Checked; specbools[5, species - 1] = CHK_P6.Checked; specbools[6, species - 1] = CHK_P7.Checked; specbools[7, species - 1] = CHK_P8.Checked; specbools[8, species - 1] = CHK_P9.Checked; langbools[0, species - 1] = CHK_L1.Checked; langbools[1, species - 1] = CHK_L2.Checked; langbools[2, species - 1] = CHK_L3.Checked; langbools[3, species - 1] = CHK_L4.Checked; langbools[4, species - 1] = CHK_L5.Checked; langbools[5, species - 1] = CHK_L6.Checked; langbools[6, species - 1] = CHK_L7.Checked; int fc = SAV.Personal[species].FormeCount; int f = SAV.B2W2 ? SaveUtil.GetDexFormIndexB2W2(species, fc) : SaveUtil.GetDexFormIndexBW(species, fc); if (f < 0) { return; } for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++) // Seen { formbools[f + i + 0 * FormLen * 8] = CLB_FormsSeen.GetItemChecked(i); } for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++) // Seen Shiny { formbools[f + i + 1 * FormLen * 8] = CLB_FormsSeen.GetItemChecked(i + CLB_FormsSeen.Items.Count / 2); } editing = true; for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++) // Displayed { formbools[f + i + 2 * FormLen * 8] = CLB_FormDisplayed.GetItemChecked(i); } for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++) // Displayed Shiny { formbools[f + i + 3 * FormLen * 8] = CLB_FormDisplayed.GetItemChecked(i + CLB_FormDisplayed.Items.Count / 2); } editing = false; }
private void SetEntry() { if (species < 0) { return; } for (int i = 0; i < 9; i++) { specbools[i, species - 1] = CP[i].Checked; } if (species <= 493) { for (int i = 0; i < 7; i++) { langbools[i, species - 1] = CL[i].Checked; } } int fc = SAV.Personal[species].FormeCount; int f = SAV.B2W2 ? SaveUtil.GetDexFormIndexB2W2(species, fc) : SaveUtil.GetDexFormIndexBW(species, fc); if (f < 0) { return; } for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++) // Seen { formbools[f + i + 0 * FormLen * 8] = CLB_FormsSeen.GetItemChecked(i); } for (int i = 0; i < CLB_FormsSeen.Items.Count / 2; i++) // Seen Shiny { formbools[f + i + 1 * FormLen * 8] = CLB_FormsSeen.GetItemChecked(i + CLB_FormsSeen.Items.Count / 2); } editing = true; for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++) // Displayed { formbools[f + i + 2 * FormLen * 8] = CLB_FormDisplayed.GetItemChecked(i); } for (int i = 0; i < CLB_FormDisplayed.Items.Count / 2; i++) // Displayed Shiny { formbools[f + i + 3 * FormLen * 8] = CLB_FormDisplayed.GetItemChecked(i + CLB_FormDisplayed.Items.Count / 2); } editing = false; }