Exemplo n.º 1
0
        void CreateColumnNameRow(TableEx table, string[] columnNames, Font font, CellValueInfo.ValueProcessHandler process)
        {
            List <CellValueInfo> cellValueInfoList = new List <CellValueInfo>();
            CellValueInfo        cellInfo;

            for (int i = 0; i < table.colAmount; i++)
            {
                cellInfo               = new CellValueInfo();
                cellInfo.type          = CellValueType.String;
                cellInfo.valueProcess += process;

                cellInfo.value = columnNames[i];
                cellInfo.font  = font;
                cellValueInfoList.Add(cellInfo);
            }

            table.CreateNewAutoRow(cellValueInfoList.ToArray());
        }
Exemplo n.º 2
0
        public void SetCellFixedSizeValue(int rowIdx, int colIdx, SizeF fixedSize, CellValueInfo.ValueProcessHandler valueProcess, object value = null, Font font = null)
        {
            CellValueInfo cellValueInfo;

            cellValueInfo               = new CellValueInfo();
            cellValueInfo.type          = CellValueType.FixedSize;
            cellValueInfo.fixedSize     = fixedSize;
            cellValueInfo.value         = value;
            cellValueInfo.font          = font;
            cellValueInfo.valueProcess += valueProcess;

            string key = GetRowColKey(rowIdx, colIdx);

            if (cellValueInfoDict.ContainsKey(key) == false)
            {
                cellValueInfoDict.Add(key, cellValueInfo);
            }
            else
            {
                cellValueInfoDict[key] = cellValueInfo;
            }
        }
Exemplo n.º 3
0
        public void SetCellStringValue(int rowIdx, int colIdx, string value, Font font, CellValueInfo.ValueProcessHandler valueProcess)
        {
            CellValueInfo cellValueInfo;

            cellValueInfo               = new CellValueInfo();
            cellValueInfo.type          = CellValueType.String;
            cellValueInfo.value         = value;
            cellValueInfo.font          = font;
            cellValueInfo.valueProcess += valueProcess;

            string key = GetRowColKey(rowIdx, colIdx);

            if (cellValueInfoDict.ContainsKey(key) == false)
            {
                cellValueInfoDict.Add(key, cellValueInfo);
            }
            else
            {
                cellValueInfoDict[key] = cellValueInfo;
            }
        }