public async void HentdataFraDiskAsync() { this.Gameliste.Clear(); StorageFile file = await Localfolder.GetFileAsync(filnavn); string jsonText = await FileIO.ReadTextAsync(file); Gameliste.indsætJson(jsonText); }
public async void HentdataFraDiscAsync() { try { this.Gameliste.Clear(); StorageFile file = await localfolder.GetFileAsync(filnavn); string jsonText = await FileIO.ReadTextAsync(file); Gameliste.indsætJson(jsonText); } catch { MessageDialog messageDialog = new MessageDialog("Filnavn højst sandsynligt ændret eller der ikke er gemt"); await messageDialog.ShowAsync(); } }