public async void UpdateLabelStatus(tradeInfo info) { this.Invoke((EventHandler) delegate { this.label2.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); this.label4.Text = info.last_price.ToString(); this.label6.Text = info.hold.ToString(); this.label8.Text = info.amount24h.ToString(); this.label12.Text = info.last_index.ToString("f"); this.label14.Text = info.last_price.ToString("f"); this.label16.Text = (info.last_index - info.last_price).ToString("f"); }); }
private void RequestHandler_NotifyOrderData(List <TradeDepthsEntity> list, tradeInfo tradeInfo) { try { if (list == null || !list.Any()) { return; } DapperDbContext context = new DapperDbContext(CurrentConfig.ConnectionString); context.InsertTradeDetailsDataAsync(list); //context.InsertTradeInfoAsync(tradeInfo); context.InsertTradeInfo(tradeInfo); //Task.WaitAll(t1, t2); } catch (Exception e) { logPrint(string.Format("{0}-{1}", "RequestHandler_NotifyOrderData", e.Message)); } //BTMrefreshSign = true; }