Exemplo n.º 1
0
        internal void PutDdeData(byte[] data)
        {
            DataReceived = DateTime.UtcNow;

            using (XlTable xt = new XlTable(data))
                ProcessTable(xt);
        }
Exemplo n.º 2
0
        protected override void ProcessTable(XlTable xt)
        {
            Rows.Clear();

            for (int row = 0; row < xt.Rows; row++)
            {
                T item = new T();

                for (int col = 0; col < xt.Columns; col++)
                {
                    xt.ReadValue();

                    switch (xt.ValueType)
                    {
                    case XlTable.BlockType.Float:
                        _properties[col].SetValue(item, (decimal)xt.FloatValue);
                        break;

                    case XlTable.BlockType.String:
                        if (xt.StringValue != string.Empty)
                        {
                            _properties[col].SetValue(item, xt.StringValue);
                        }
                        break;

                    default:
                        break;
                    }
                }

                Rows.Add(item);
            }

            OnUpdated(this, Rows);
        }
Exemplo n.º 3
0
        internal void PutDdeData(byte[] data)
        {
            DataReceived = DateTime.UtcNow;

            using (XlTable xt = new XlTable(data))
                ProcessTable(xt);
        }
Exemplo n.º 4
0
 protected abstract void ProcessTable(XlTable xt);
Exemplo n.º 5
0
 protected abstract void ProcessTable(XlTable xt);