-
-
Save mcarbenay/edbcabcfcabe2ee639c00861d1b9cf58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static MettreAJour() { | |
// on obtient une ref. sur le store en mode "écriture" | |
Windows.ApplicationModel.Contacts.ContactManager.requestStoreAsync( | |
Windows.ApplicationModel.Contacts.ContactStoreAccessType.appContactsReadWrite | |
).done(function (store) { | |
// on énumère les listes pour vérifier si la notre existe | |
// déjà : si oui, on l'update sinon on la créé | |
store.findContactListsAsync().done(function (lists) { | |
var laListe = null; | |
for (var i = 0; i < lists.length; i++) { | |
if (lists[i].displayName == ListeContactSample.listName) { | |
laListe = lists[i]; | |
} | |
} | |
if (laListe == null) { | |
ListeContactSample.createContactList(store); | |
} | |
else { | |
ListeContactSample.refreshContactList(laListe); | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment