Readme update & warning about SV WCIDs editings

This commit is contained in:
Manu
2022-11-28 11:36:10 +01:00
parent 9318cd8021
commit 26970d4023
2 changed files with 38 additions and 21 deletions

View File

@@ -177,30 +177,46 @@ namespace SwitchGiftDataManager.WinForm
private void BtnApply_Click(object sender, EventArgs e)
{
try
var proceed = true;
if(CurrentGame is Games.SCVI)
{
var list = GetCurrentList();
var wcid = UInt16.Parse(TxtWCID.Text);
var index = list.GetIndex(wcid);
if (index == -1)
var warning = "WARNING\n\n" +
"WCID editings in SV wondecards might impact the entity's TID and SID, resulting in an illegal Pok<6F>mon.\n" +
"Do not share Pok<6F>mon obtained with the use of edited wondercards.\n" +
"\nDo you want to coninue?";
var disclaimer = MessageBox.Show(warning, "Disclaimer", MessageBoxButtons.YesNo);
if (disclaimer == DialogResult.No)
proceed = false;
}
if (proceed)
{
try
{
list.SetWCID(ListBoxWC.SelectedIndex, wcid);
list.Sort();
UpdateWCList();
ListBoxWC.SelectedIndex = list.GetIndex(wcid);
BtnApply.Enabled = false;
var list = GetCurrentList();
var wcid = UInt16.Parse(TxtWCID.Text);
var index = list.GetIndex(wcid);
if (index == -1)
{
list.SetWCID(ListBoxWC.SelectedIndex, wcid);
list.Sort();
UpdateWCList();
ListBoxWC.SelectedIndex = list.GetIndex(wcid);
BtnApply.Enabled = false;
}
else
{
MessageBox.Show($"WCID {wcid} already exists.");
return;
}
}
else
catch (Exception ex)
{
MessageBox.Show($"WCID {wcid} already exists.");
MessageBox.Show(ex.ToString());
return;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
return;
}
}
private void BtnRemove_Click(object sender, EventArgs e)