public void ClearDemo() { foreach (ParsedDemo Demo in Demos) { Demo.Dispose(); } Demos.Clear(); Display.ClearDemos(); GC.Collect(); Display.Invalidate(); ClockState(false); }
public async Task LoadDemosHeader() { NotificationMessage = "Loading..."; IsBusy = true; HasNotification = true; try { List <string> folders = new List <string>(); if (SelectedFolder != null) { folders.Add(SelectedFolder); } else { folders = Folders.ToList(); } Demos.Clear(); var demos = await _demosService.GetDemosHeader(folders); foreach (var demo in demos) { Demos.Add(demo); } DataGridDemosCollection.Refresh(); } catch (Exception e) { Logger.Instance.Log(e); } finally { IsBusy = false; HasNotification = false; } }