public void listBoxTicker_SelectedIndexChanged_UIResultHandler(RequestItemGroup resultResponse) { if (Helper.IsResultHasErrors(resultResponse)) { return; } Dictionary <int, PriceCandle> priceHistory = (Dictionary <int, PriceCandle>)resultResponse.items[0].result.resultData; chart = new PriceChart(ticker, Graphics.FromHwnd(panelChart.Handle), 0, 0, panelChart.Width, panelChart.Height); chart.SetData(priceHistory, ConvertDataType.BAR_5, ConvertDataType.BAR_15); chart.ReDrawFull(); Text = "Chart " + market.MarketName() + " " + ticker; timerLastPrice.Start(); }
public void buttonLoadChartData_UIResultHandler(RequestItemGroup resultResponse) { if (Helper.IsResultHasErrors(resultResponse)) { return; } Dictionary <int, PriceCandle> priceHistory = (Dictionary <int, PriceCandle>)resultResponse.items[0].result.resultData; if (chart == null || ticker == null) { return; } chart = new PriceChart(ticker, Graphics.FromHwnd(panelChart.Handle), 0, 0, panelChart.Width, panelChart.Height); chart.SetData(priceHistory, convertFromPeriod, viewResultPeriod); chart.ReDrawFull(); loadRequeststarted = false; timerLastPrice.Start(); }