Пример #1
0
        protected override void SetValues(XlTable _xt, int _col, DDEChannelsMarketEventArgs _ddeMEA)
        {
            switch (_col)
            {
            case 0:
                _ddeMEA.Account = _xt.StringValue;
                break;

            case 1:
                _ddeMEA.Securyti = _xt.StringValue;
                break;

            case 2:
                _ddeMEA.CurrentNettoPosition = _xt.FloatValue;
                break;

            case 3:
                _ddeMEA.ActiveBuy = _xt.FloatValue;
                break;

            case 4:
                _ddeMEA.ActiveSell = _xt.FloatValue;
                break;
            }
        }
Пример #2
0
        protected override void SetValues(XlTable _xt, int _col, DDEChannelsMarketEventArgs _ddeMEA)
        {
            switch (_col)
            {
            case 0:
                _ddeMEA.Date = _xt.StringValue;
                break;

            case 1:
                _ddeMEA.Number = _xt.FloatValue;
                break;

            case 2:
                _ddeMEA.Time = _xt.StringValue;
                break;

            case 3:
                _ddeMEA.Securyti = _xt.StringValue;
                break;

            case 4:
                _ddeMEA.Operation = _xt.StringValue;
                break;

            case 5:
                _ddeMEA.Price = (double)_xt.FloatValue;
                break;

            case 6:
                _ddeMEA.Quantity = _xt.FloatValue;
                break;

            case 7:
                _ddeMEA.Balance = _xt.FloatValue;
                break;

            case 8:
                _ddeMEA.Status = _xt.StringValue;
                break;

            case 9:
                _ddeMEA.Comment = _xt.StringValue;
                break;

            case 10:
                _ddeMEA.Account = _xt.StringValue;
                break;

            case 11:
                _ddeMEA.Trans_ID = _xt.FloatValue.ToString();
                break;
            }
        }
Пример #3
0
        protected override void SetValues(XlTable _xt, int _col, DDEChannelsMarketEventArgs _ddeMEA)
        {
            switch (_col)
            {
            case 0:
                _ddeMEA.TimeChange = _xt.StringValue;
                break;

            case 1:
                _ddeMEA.Price = (double)_xt.FloatValue;
                break;

            case 2:
                _ddeMEA.Bid = (decimal)_xt.FloatValue;
                break;

            case 3:
                _ddeMEA.Offer = (decimal)_xt.FloatValue;
                break;

            case 4:
                _ddeMEA.High_possible_price = (decimal)_xt.FloatValue;
                break;

            case 5:
                _ddeMEA.Minimum_possible_price = (decimal)_xt.FloatValue;
                break;

            case 6:
                _ddeMEA.StepPrice = (decimal)_xt.FloatValue;
                break;

            case 7:
                _ddeMEA.Securyti = _xt.StringValue;
                break;

            case 8:
                _ddeMEA.ClassCode = _xt.StringValue;
                break;

            case 9:
                _ddeMEA.Time = _xt.StringValue;     // время последней сделки
                break;
            }
        }
Пример #4
0
        protected override void ProcessTable(XlTable xt)
        {
            DDeChannelsServiceEventArgs ddeServiceEventArgs = new DDeChannelsServiceEventArgs();

            ddeServiceEventArgs.SetCountRowsExport(xt.Rows);

            ObtainingDataStartedEvent(this, ddeServiceEventArgs);

            int xtRows = xt.Rows;

            for (int row = 0; row < xtRows; row++)
            {
                DDEChannelsMarketEventArgs ddeMarketEventArgs = new DDEChannelsMarketEventArgs();

                xt.ReadValue();
                ddeMarketEventArgs.Number = xt.FloatValue;

                xt.ReadValue();
                ddeMarketEventArgs.Securyti = xt.StringValue;

                xt.ReadValue();
                ddeMarketEventArgs.Price = (double)xt.FloatValue;

                xt.ReadValue();
                ddeMarketEventArgs.Date = xt.StringValue;

                xt.ReadValue();
                ddeMarketEventArgs.Time = xt.StringValue;

                xt.ReadValue();
                ddeMarketEventArgs.TimeMsc = xt.FloatValue;

                xt.ReadValue();
                ddeMarketEventArgs.Operation = xt.StringValue;

                xt.ReadValue();
                ddeMarketEventArgs.Quantity = (double)xt.FloatValue;

                LoadedLineEvent(this, ddeMarketEventArgs);
            }
            ObtainingDataCompletedEvent(this, ddeServiceEventArgs);
        }
        protected override void ProcessTable(XlTable xt)
        {
            DDeChannelsServiceEventArgs ddeServiceEventArgs = new DDeChannelsServiceEventArgs();

            ddeServiceEventArgs.SetCountRowsExport(xt.Rows);

            ObtainingDataStartedEvent(this, ddeServiceEventArgs);

            int xtRows = xt.Rows;

            for (int row = 0; row < xtRows; row++)
            {
                DDEChannelsMarketEventArgs ddeMarketEventArgs = new DDEChannelsMarketEventArgs();

                for (int col = 0; col < xt.Columns; col++)
                {
                    xt.ReadValue();
                    SetValues(xt, col, ddeMarketEventArgs);
                }
                LoadedLineEvent(this, ddeMarketEventArgs);
            }
            ObtainingDataCompletedEvent(this, ddeServiceEventArgs);
        }
 // abstract metods
 protected abstract void SetValues(XlTable _xt, int _col, DDEChannelsMarketEventArgs _ddeMEA);