Exemplo n.º 1
0
        void OrderBookOrderUpdated(object?sender, Fix.OrderBookEventArgs e)
        {
            Fix.Order order = e.Order;

            if (_orderTable.Rows.Find(order.ClOrdID) is not OrderDataRow row)
            {
                return;
            }

            row.Order = order;
            UpdateRow(row);
        }
Exemplo n.º 2
0
        void OrderBookOrderUpdated(object sender, Fix.OrderBookEventArgs ev)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new MethodInvoker(() => OrderBookOrderUpdated(sender, ev)));
                return;
            }

            Fix.Order order = ev.Order;

            if (_orderTable.Rows.Find(order.ClOrdID) is not OrderDataRow row)
            {
                return;
            }

            row.Order = order;
            UpdateRow(row);
            _orderGrid.RefreshEdit();
        }
Exemplo n.º 3
0
        void OrderBookOrderInserted(object sender, Fix.OrderBookEventArgs e)
        {
            Fix.Order order = e.Order;
            if (_orderTable.Rows.Find(order.ClOrdID) is OrderDataRow)
            {
                return;
            }

            OrderDataRow row = (OrderDataRow)_orderTable.NewRow();

            row.Order = order;
            row[OrderDataTable.ColumnClOrdId] = order.ClOrdID;
            //
            // Prime these with 0's so the grid looks pretty.
            //
            row[OrderDataTable.ColumnDone]     = 0;
            row[OrderDataTable.ColumnLeaves]   = 0;
            row[OrderDataTable.ColumnAvgPrice] = 0;
            UpdateRow(row);
            _orderTable.Rows.Add(row);
        }