|
|
|
@ -61,28 +61,35 @@ public partial class PageProfiles : ContentPage
|
|
|
|
|
|
|
|
|
|
async void Button_ClickedModify(System.Object sender, System.EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
/*
|
|
|
|
|
if (ProfileManager.Players.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
await DisplayAlert("Info", "There is no player actually\nPlease add one", "Ok");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string result = await DisplayPromptAsync("Info", $"Choose a name to modify : ", "Ok");
|
|
|
|
|
Debug.WriteLine("Answer: " + result);
|
|
|
|
|
if (result != null)
|
|
|
|
|
if (result == null)
|
|
|
|
|
{
|
|
|
|
|
Debug.WriteLine("Did not found");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
string tomodify = await DisplayPromptAsync("Info", $"How will you rename it ?: ", "Ok");
|
|
|
|
|
Debug.WriteLine("Answer: " + tomodify);
|
|
|
|
|
if (tomodify == null)
|
|
|
|
|
{
|
|
|
|
|
string tomodify = await DisplayPromptAsync("Info", $"How will you rename it ?: ", "Ok");
|
|
|
|
|
Debug.WriteLine("Answer: " + tomodify);
|
|
|
|
|
if (tomodify != null)
|
|
|
|
|
{
|
|
|
|
|
Debug.WriteLine("bam, modified");
|
|
|
|
|
bool ismodified = MyStub.Modify(result, tomodify);
|
|
|
|
|
|
|
|
|
|
if (ismodified)
|
|
|
|
|
{
|
|
|
|
|
Debug.WriteLine("Modified");
|
|
|
|
|
}
|
|
|
|
|
else Debug.WriteLine("Player not found");
|
|
|
|
|
}
|
|
|
|
|
Debug.WriteLine("Did not found");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else Debug.WriteLine("Did not found");
|
|
|
|
|
*/
|
|
|
|
|
Debug.WriteLine("bam, modified");
|
|
|
|
|
bool ismodified = ProfileManager.ModifyPlayer(result, tomodify);
|
|
|
|
|
|
|
|
|
|
if (ismodified)
|
|
|
|
|
{
|
|
|
|
|
Debug.WriteLine("Modified");
|
|
|
|
|
ProfileManager.SaveData();
|
|
|
|
|
}
|
|
|
|
|
else Debug.WriteLine("Player not found");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|