コード例 #1
0
        public BarcodeState(AxBarCodeWiz bc)
        {
            enumSCALE_MODE oldScaleMode = bc.ScaleMode;

            bc.ScaleMode = enumSCALE_MODE.Scale_Millimeter;
            symb         = bc.Symbology;
            optCheck     = bc.OptionalCheckChar;
            orient       = bc.Orientation;
            heigth       = bc.BarcodeHeight;
            nbWigth      = bc.NarrowBarWidth;
            bcTextPos    = bc.BarcodeTextPosition;
            border       = bc.Border;
            qZone        = bc.QuietZone;
            topFont      = bc.TopTextFont;
            bcFont       = bc.BarcodeTextFont;
            botFont      = bc.BottomTextFont;
            fColor       = bc.ForeColor;
            bColor       = bc.BackColor;
            bBars        = bc.BearerBars;
            bc.ScaleMode = oldScaleMode;
        }
コード例 #2
0
        public void ApplyState(AxBarCodeWiz bc)
        {
            enumSCALE_MODE oldScaleMode = bc.ScaleMode;

            bc.ScaleMode           = enumSCALE_MODE.Scale_Millimeter;
            bc.Symbology           = symb;
            bc.OptionalCheckChar   = optCheck;
            bc.Orientation         = orient;
            bc.BarcodeHeight       = heigth;
            bc.NarrowBarWidth      = nbWigth;
            bc.BarcodeTextPosition = bcTextPos;
            bc.Border          = border;
            bc.QuietZone       = qZone;
            bc.TopTextFont     = topFont;
            bc.BarcodeTextFont = bcFont;
            bc.BottomTextFont  = botFont;
            bc.ForeColor       = fColor;
            bc.BackColor       = bColor;
            bc.BearerBars      = bBars;
            bc.ScaleMode       = oldScaleMode;
        }
コード例 #3
0
        public BcPrintDocument(AxBarCodeWiz bc, BcProject project)
        {
            this.bc             = bc;
            DefaultPageSettings = project.pageSettings;
            table = project.table;
            data  = project.data;
            project.state.ApplyState(bc);
            xDist          = project.layout.xDist;
            yDist          = project.layout.yDist;
            title          = project.layout.title;
            titleFont      = project.layout.titleFont;
            printTitleOnce = project.layout.printTitleOnce;
            bs             = new BindingSource();
            bs.DataSource  = table;
            bs.Sort        = data.sort;
            MarginsConverter mc = new MarginsConverter();

            xDist = (float)PrinterUnitConvert.Convert(xDist * 10,
                                                      PrinterUnit.TenthsOfAMillimeter,
                                                      PrinterUnit.Display);
            yDist = (float)PrinterUnitConvert.Convert(yDist * 10,
                                                      PrinterUnit.TenthsOfAMillimeter,
                                                      PrinterUnit.Display);
        }