Ejemplo n.º 1
0
        public void CancellAllOrders(object sender, ExecutedRoutedEventArgs e)
        {
            CDataCancellAllOrders cancellAllOrders = (CDataCancellAllOrders)e.Parameter;
            CCancellAllOrders     cao = new CCancellAllOrders();

            List <int> lst = ViewModelDispatcher.GetConIdWithOrders();

            foreach (var conId in lst)
            {
                Communicator.SendDataToServer(conId, cao, enmTradingEvent.CancellAllOrders);
            }
        }
Ejemplo n.º 2
0
        public void CloseAllPositions(object sender, ExecutedRoutedEventArgs e)
        {
            CDataCloseAllPos   dataCloseAllPos = (CDataCloseAllPos)e.Parameter;
            CCloseAllPositions closeAllPos     = new CCloseAllPositions();

            List <int> lst = ViewModelDispatcher.GetConIdLstWithOpenedPos();

            foreach (var conId in lst)
            {
                Communicator.SendDataToServer(conId, closeAllPos, enmTradingEvent.CloseAllPositions);
            }
        }