applying new struckture and working vlc

This commit is contained in:
Elias Quinn
2025-06-12 14:34:51 +01:00
parent c8906c1471
commit afe5d2f5ff
75 changed files with 1045 additions and 613 deletions

View File

@@ -37,14 +37,14 @@ public class Jason_Writer
// Load one list of locJason objects from JSON file with given name
public List<locJason> LoadList(string listName)
public async Task<List<locJason>> LoadListAsync(string listName)
{
string filePath = Path.Combine(_folderPath, $"{listName}.json");
if (!File.Exists(filePath))
return new List<locJason>(); // Return empty list if file doesn't exist
return new List<locJason>();
string jsonString = File.ReadAllText(filePath);
string jsonString = await File.ReadAllTextAsync(filePath);
return JsonConvert.DeserializeObject<List<locJason>>(jsonString) ?? new List<locJason>();
}