Example #1
0
        internal void PutDdeData(byte[] data)
        {
            DataReceived = DateTime.UtcNow;

            using (XlTable xt = new XlTable(data))
                ProcessTable(xt);
        }
Example #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);
        }
        internal void PutDdeData(byte[] data)
        {
            DataReceived = DateTime.UtcNow;

            using (XlTable xt = new XlTable(data))
                ProcessTable(xt);
        }
Example #4
0
 protected abstract void ProcessTable(XlTable xt);
 protected abstract void ProcessTable(XlTable xt);