Exemple #1
0
        public void copy(LabelEntryBase lebFrom)
        {
            iType = lebFrom.iType;
            iRepeat = lebFrom.iRepeat;
            fRepeatOffset = lebFrom.fRepeatOffset;

            sFontName = String.Copy( lebFrom.sFontName );
            sText = String.Copy( lebFrom.sText );

            iWidth = lebFrom.iWidth;
            iHeight = lebFrom.iHeight;

            iAlignX = lebFrom.iAlignX;
            iAlignY = lebFrom.iAlignY;

            fSize = lebFrom.fSize;
            fStartX = lebFrom.fStartX;
            fStartY = lebFrom.fStartY;
            fEndX = lebFrom.fEndX;
            fEndY = lebFrom.fEndY;
        }
        public void copy(LabelEntryBase lebFrom)
        {
            iType         = lebFrom.iType;
            iRepeat       = lebFrom.iRepeat;
            fRepeatOffset = lebFrom.fRepeatOffset;

            sFontName = String.Copy(lebFrom.sFontName);
            sText     = String.Copy(lebFrom.sText);

            iWidth  = lebFrom.iWidth;
            iHeight = lebFrom.iHeight;

            iAlignX = lebFrom.iAlignX;
            iAlignY = lebFrom.iAlignY;

            fSize   = lebFrom.fSize;
            fStartX = lebFrom.fStartX;
            fStartY = lebFrom.fStartY;
            fEndX   = lebFrom.fEndX;
            fEndY   = lebFrom.fEndY;
        }
Exemple #3
0
        public void addPages(string sLabelFormat, List <LabelInfo> lItems)
        {
            lFormats = new List <LabelEntryBase>();

            string[] sTextList = sLabelFormat.Split(new char[] { '~' });
            foreach (string sItem in sTextList)
            {
                if (sItem.Length > 0)
                {
                    lFormats.Add(LabelEntryBase.create(sItem));
                }
            }

            if (lItems == null)
            {
                LabelPage lpNew = new LabelPage();
                lpNew.populate(lFormats);
                lPages.Add(lpNew);
            }
            else
            {
                int iMaxRepeat = getMaxRepeat(lFormats);

                if (lItems.Count() == 0 || iMaxRepeat == 0)
                {
                    return;
                }

                int iCount = (int)Math.Ceiling((decimal)lItems.Count() / iMaxRepeat);

                for (int iX = 0; iX < iCount; iX++)
                {
                    LabelPage lpNew = new LabelPage();
                    lpNew.populate(lFormats, lItems, iX * iMaxRepeat);
                    lPages.Add(lpNew);
                }
            }
        }
Exemple #4
0
 public static LabelEntryBase create(string sFormat)
 {
     LabelEntryBase lebTemp = new LabelEntryBase();
     return lebTemp.populate(sFormat);
 }
        public static LabelEntryBase create(string sFormat)
        {
            LabelEntryBase lebTemp = new LabelEntryBase();

            return(lebTemp.populate(sFormat));
        }