count() public method

public count ( ) : int
return int
Example #1
0
        internal bool save(CSXml.cXml xDoc, XmlNode nodeFather)
        {
            CSXml.cXmlProperty xProperty = null;
            XmlNode            nodeObj   = null;

            xProperty = new CSXml.cXmlProperty();

            xProperty.setName(m_key);
            nodeObj = xDoc.addNodeToNode(nodeFather, xProperty);

            xProperty.setName("Key");
            xProperty.setValue(eTypes.eText, m_key);
            xDoc.addPropertyToNode(nodeObj, xProperty);

            // TODO: fix me - this is Spanish - English bug we should use Index
            //
            xProperty.setName("Indice");
            xProperty.setValue(eTypes.eInteger, m_index);
            xDoc.addPropertyToNode(nodeObj, xProperty);

            xProperty.setName("IdField");
            xProperty.setValue(eTypes.eText, m_idField);
            xDoc.addPropertyToNode(nodeObj, xProperty);

            xProperty.setName("HasFormulaHide");
            xProperty.setValue(eTypes.eBoolean, m_hasFormulaHide);
            xDoc.addPropertyToNode(nodeObj, xProperty);

            if (!m_aspect.save(xDoc, nodeObj))
            {
                return(false);
            }
            if (!m_formulaHide.save(xDoc, nodeObj))
            {
                return(false);
            }

            xProperty.setName(C_NODERPTCONTROLS);
            nodeObj = xDoc.addNodeToNode(nodeObj, xProperty);

            cReportControl ctrl = null;

            for (int _i = 0; _i < m_controls.count(); _i++)
            {
                ctrl = m_controls.item(_i);
                ctrl.save(xDoc, nodeObj);
            }

            return(true);
        }
Example #2
0
        private cReportControls getControlsInZOrder(cReportControls col)
        {
            int i = 0;
            cReportControl ctrl = null;
            cReportControls ctrls = null;

            ctrls = new cReportControls();
            ctrls.setCopyColl(col.getCopyColl());
            ctrls.setTypeSection(col.getTypeSection());
            ctrls.setSectionLine(col.getSectionLine());

            // we load a new collection ordered by zorder
            //
            while (col.count() > 0)
            {
                // we search the lower zorder in this collection
                //
                i = 32767;
                for (int _i = 0; _i < col.count(); _i++)
                {
                    ctrl = col.item(_i);
                    if (ctrl.getLabel().getAspect().getNZOrder() < i)
                    {
                        i = ctrl.getLabel().getAspect().getNZOrder();
                    }
                }

                for (int _i = 0; _i < col.count(); _i++)
                {
                    ctrl = col.item(_i);
                    if (ctrl.getLabel().getAspect().getNZOrder() == i)
                    {
                        col.remove(ctrl.getKey());
                        ctrls.add(ctrl, ctrl.getKey());
                        break;
                    }
                }
                i = i + 1;
            }
            return ctrls;
        }