/// <summary> /// Donne en pourcent l'espace occupé par les données dans le roaming /// </summary> /// <returns>le pourcentage</returns> public static async Task <int> GetEspaceRoamingOccupePourcent() { var espaceMax = (ApplicationData.Current.RoamingStorageQuota > 0) ? ApplicationData.Current.RoamingStorageQuota * 1000 : ContexteStatic.RoaminsStorageQuotaBis * 1000; var espaceOccupe = await ComFile.GetSizeRoamingFolder(); return((int)((100 * espaceOccupe) / espaceMax)); }
/// <summary> /// Genere les categories pour les mouvement (celles par défaut, celles en base) /// </summary> public static async Task GenerateCategorieMouvement() { await ComFile.GetSizeRoamingFolder(); await GenerateCategoriesParentDefaut(); await GenerateSousCategoriesDefaut(); if (App.ModeApp == AppareilEnum.ModeAppareilPrincipal) { await AjoutCategorieUserFmBdd(); } else { await AjoutCategorieUserFmRoaming(); } //tri par ordre alphabétique foreach (var category in ListeCategoriesMouvement) { category.SousCategorieList.Sort((x, y) => string.CompareOrdinal(x.Libelle, y.Libelle)); } ListeCategoriesMouvement.Sort((x, y) => string.CompareOrdinal(x.Libelle, y.Libelle)); }