Now personal stock window is loaded asyncronous

(not locking the initial window)
This commit is contained in:
2022-02-22 20:46:02 +01:00
parent d8f6ce4650
commit 95a9537af9
3 changed files with 81 additions and 2 deletions

View File

@ -140,7 +140,7 @@ namespace StockInfoCore
ReloadData();
}
private void btnValueView_Click(object sender, EventArgs e)
private async void btnValueView_Click(object sender, EventArgs e)
{
//if(!GlobalStopwatch.IsRunning && GlobalStopwatch.EllapsedMillis>0)
// GlobalStopwatch.Restart();
@ -155,7 +155,8 @@ namespace StockInfoCore
var person = _personRepository.GetPersonById(SelectedPersonId);
Cursor.Current = Cursors.WaitCursor;
_stockMarketRepository.LoadStockMarketList(SelectedPersonId);
await _stockMarketRepository.LoadStockMarketListAsync(SelectedPersonId);
_stockWindow.ConnectedPerson = person;
_stockWindow.Stocks = _stockMarketRepository.StockMarketList;