void client_StopLimitOrderAccepted(object sender, Core.SharedDto.Orders.StopLimitOrderDto e) { UiDispatcher.Dispatcher.Invoke(() => { ActiveStopLimitOrders.Add(new StopLimitOrderViewModel(e, client)); }); }
void client_StopLimitOrderDeleted(object sender, Core.SharedDto.Orders.StopLimitOrderDto e) { UiDispatcher.Dispatcher.Invoke(() => { var order = ActiveStopLimitOrders.FirstOrDefault(a => a.OrderId == e.ExchangeOrderId); if (order == null) { return; } ActiveStopLimitOrders.Remove(order); order.Dispose(); }); }