コード例 #1
0
 void client_StopLimitOrderAccepted(object sender, Core.SharedDto.Orders.StopLimitOrderDto e)
 {
     UiDispatcher.Dispatcher.Invoke(() =>
     {
         ActiveStopLimitOrders.Add(new StopLimitOrderViewModel(e, client));
     });
 }
コード例 #2
0
        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();
            });
        }