Esempio n. 1
0
        public override void ReadData(FastBinaryReader reader, Object additionalInfo)
        {
            Root = (RICustomData)reader.Tag;

            base.ReadData(reader, additionalInfo);

            // Hint is no longer used. This line is left here for backward compatibility
            reader.ReadSafeString();

            ColumnPos = reader.ReadInt16();
            Column    = Root.Columns[ColumnPos];
            Value     = null;

            if (!reader.IsNull())
            {
                switch (Column.FieldTypeId)
                {
                case RICustomDataFieldIdType.Decimal: Value = reader.ReadDecimal(); break;

                case RICustomDataFieldIdType.Integer: Value = reader.ReadInt64(); break;

                case RICustomDataFieldIdType.DateTime: Value = reader.ReadDateTime(); break;

                case RICustomDataFieldIdType.Boolean: Value = reader.ReadBoolean(); break;

                case RICustomDataFieldIdType.String: Value = reader.ReadString(); break;

                case RICustomDataFieldIdType.Object: Value = reader.ReadString(); break;

                case RICustomDataFieldIdType.Unknown: Value = reader.ReadString(); break;

                default: break;
                }
            }
        }
Esempio n. 2
0
        private void Init(IEnumerable <RICustomDataColumn> columns, Boolean bShowColumns, Boolean isPropertyGrid)
        {
            Root           = this;
            Level          = -1;
            Columns        = columns.ToArray();
            ShowColumns    = bShowColumns;
            IsPropertyGrid = isPropertyGrid;
            HasDetails     = false;
            AllowSort      = true;

            if (Columns.Length == 0)
            {
                Columns = new RICustomDataColumn[] { new RICustomDataColumn(String.Empty) };
            }
        }
Esempio n. 3
0
 public RICustomData(String caption, Boolean bShowColumns, Boolean isPropertyGrid) : base(null, caption, RICustomDataElementType.Container, 0)
 {
     RICustomDataColumn[] columns = new RICustomDataColumn[] { new RICustomDataColumn(String.Empty) };
     Init(columns, bShowColumns, isPropertyGrid);
 }
Esempio n. 4
0
 internal RICustomDataField(RICustomData root, Object value, Int16 cPos, Int16 level) : base(root, RICustomDataElementType.Field, level)
 {
     Value     = value;
     ColumnPos = cPos;
     Column    = root.Columns[cPos];
 }