private async Task SetStatus() { Miror miror = DataAccess.GetMiror(); if (miror != null && miror.IsPaired) { GlobalStatusManager.Instance.GlobalStatus = EGlobalStatus.Paired; } else if (miror != null && !miror.IsPaired) { GlobalStatusManager.Instance.GlobalStatus = EGlobalStatus.FirstLaunch; } else { GlobalStatusManager.Instance.GlobalStatus = EGlobalStatus.FirstLaunch; string id = await APIManager.GetMirorId(); DataAccess.AddEntity <Miror>(new Miror() { Id = id, IsPaired = false }); } }
// Récupère l'ID depuis l'API private async Task GetIdFromDatabase() { id = await APIManager.GetMirorId(); }