private async Task LoadData() { IsWorking = true; await Task.Delay(150); await Task.Run(() => { Escapes = EscapeModel.GetDatedEscapes(DateTime.Now.AddYears(-100), DateTime.Now.AddYears(100)); Deaths = DeathModel.GetDatedDeaths(DateTime.Now.AddYears(-100), DateTime.Now.AddYears(100)); }); IsWorking = false; }
public void FilterDeaths() { if (DeathSince == null || DeathTo == null) { IsWorking = true; Deaths = DeathModel.GetDatedDeaths(DateTime.Now.AddYears(-100), DateTime.Now.AddYears(100)); IsWorking = false; } else { IsWorking = true; Deaths = DeathModel.GetDatedDeaths(DeathSince, DeathTo); IsWorking = false; } }