예제 #1
0
        /// <summary>
        /// Adds a labelsst element to the internal list
        /// </summary>
        /// <param name="labelsstdata">A LABELSSTData element</param>
        public void addLabelSST(LabelSst labelsst)
        {
            this.LABELSSTList.Add(labelsst);
            RowData    rowData = this.getSpecificRow(labelsst.rw);
            StringCell cell    = new StringCell();

            cell.setValue(labelsst.isst);
            cell.Col        = labelsst.col;
            cell.Row        = labelsst.rw;
            cell.TemplateID = labelsst.ixfe;
            rowData.addCell(cell);
        }
        private List <CellInfo> GetStringCellInfo(int cellCount, int charCount)
        {
            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < charCount; i++)
            {
                sb.Append('a');
            }
            for (int i = 0; i < cellCount; i++)
            {
                StringCell stringCell = new StringCell(sb.ToString());
                Global.LocalStorage.SaveStringCell(stringCell);
            }
            var             cells        = Global.LocalStorage.GetEnumerator();
            List <CellInfo> cellInfoList = new List <CellInfo>();

            while (cells.MoveNext())
            {
                cellInfoList.Add(cells.Current);
            }
            return(cellInfoList);
        }
예제 #3
0
        /// <param name="size">Ignored unless string</param>
        public bool AddCell(string type, string name, int size)
        {
            switch (type)
            {
            case "uint8":
                var newUint8 = new UInt8Cell(nextCellIndx);
                AddCell(newUint8, name, size);
                return(true);

            case "int8":
                var newInt8 = new Int8Cell(nextCellIndx);
                AddCell(newInt8, name, size);
                return(true);

            case "uint16":
                var newUint16 = new UInt16Cell(nextCellIndx);
                AddCell(newUint16, name, size);
                return(true);

            case "int16":
                var newInt16 = new Int16Cell(nextCellIndx);
                AddCell(newInt16, name, size);
                return(true);

            case "uint32":
                var newUint32 = new UInt32Cell(nextCellIndx);
                AddCell(newUint32, name, size);
                return(true);

            case "int32":
                var newInt32 = new Int32Cell(nextCellIndx);
                AddCell(newInt32, name, size);
                return(true);

            case "uint64":
                var newUint64 = new UInt64Cell(nextCellIndx);
                AddCell(newUint64, name, size);
                return(true);

            case "int64":
                var newInt64 = new Int64Cell(nextCellIndx);
                AddCell(newInt64, name, size);
                return(true);

            case "float32":
                var newFloat32 = new Float32Cell(nextCellIndx);
                AddCell(newFloat32, name, size);
                return(true);

            case "float64":
                var newFloat64 = new Float64Cell(nextCellIndx);
                AddCell(newFloat64, name, size);
                return(true);

            case "string":
                var newString = new StringCell(nextCellIndx);
                AddCell(newString, name, size);
                return(true);
            }

            return(false);
        }