private async Task <int> GetNotes() { ListofItems = new List <NotedItem>(); //retives it then if null its converts it to 0 string SAoN = await SecureStorage.GetAsync("NotesAmount_Key"); int AmountOfNotes = Convert.ToInt32(SAoN); if (AmountOfNotes.Equals(0)) { return(0); } string KeyNote = "SecureNoteKey"; for (int i = 1; i <= AmountOfNotes; i++) { //Loop to each item and string NoteJSON = await SecureStorage.GetAsync(string.Join("_", KeyNote, i)); //if there is nothing there just skip it if (!Equals(NoteJSON, null)) { //if there is something there move it ListofItems.Add(NotedItem.Static_PraseJSON(NoteJSON)); } } NotesDisplay.ItemsSource = ListofItems; return(1); }
//for some reason this works ???? private async void GetNoteFromMemory(int ID) { string NoteKey = string.Join("_", "SecureNoteKey", ID); string JSONNote = await SecureStorage.GetAsync(NoteKey); Memo = NotedItem.Static_PraseJSON(JSONNote); }