private void OnAddonsSelected(object sender, JsonItemNote e) { _popup.AddonsSelected -= OnAddonsSelected; var message = "User select:"; foreach (var item in e.NoteInfo) { if (item.IsSelected) { message += $" {item.Name}"; } } DisplayAlert("Result", message, "Ok"); }
private async Task <JsonItemNote> GetData() { var itemsr = string.Empty; /// var client = RestService.HttpClient; var client = new System.Net.Http.HttpClient(); var response = await client.GetAsync("http://172.16.101.236/GetItemNote.php"); JsonItemNote ObjItemList = new JsonItemNote(); if (response.IsSuccessStatusCode) { string NoteInfoList = response.Content.ReadAsStringAsync().Result; ObjItemList = JsonConvert.DeserializeObject <JsonItemNote>(NoteInfoList); foreach (JsonItemnoteClass t in ObjItemList.NoteInfo) { // FlagNu = t.Name; itemsr = t.Name; // itemname = t.Name; } } return(ObjItemList); }
private async void GetItemNote() { _note = await GetData(); AddonOne.ItemsSource = _note.NoteInfo; }