UNPKG

stimulsoft-forms

Version:
1,116 lines 204 kB
import StiRectangleGeometry from "../properties/StiRectangleGeometry"; import { StiLocalizationService } from "../services/sti-localization.service"; import Color from "../system/Color"; import { Enum } from "../system/Enum"; import { HatchStyle, StiBarcodeType, StiBodyBrush, StiQRCodeBodyShapeType, StiQRCodeErrorCorrectionLevel, StiQRCodeEyeBallShapeType, StiQRCodeEyeFrameShapeType, StiQRCodeSize, } from "../system/enums"; import { StiFormElement } from "./base/StiFormElement"; import { StiLabelItem } from "./text/StiLabelItem"; import { StiTextItem } from "./text/StiTextItem"; export class StiBarcodeElement extends StiFormElement { propertyChanged(propName) { this._isChanged = true; } get backColor() { return this._backColor; } set backColor(value) { let oldValue = this._backColor; if (oldValue != value) { this._backColor = value; this._backColor.changesInterceptor = this; this._isChanged = true; } } get foreColor() { return this._foreColor; } set foreColor(value) { let oldValue = this._foreColor; if (oldValue != value) { this._foreColor = value; value.changesInterceptor = this; this._isChanged = true; } } get style() { return this._style; } set style(value) { let oldValue = this._style; if (oldValue != value) { this._style = value; this.setStyle(value); this._isChanged = true; } } get Width() { return this._width; } set Width(value) { let oldValue = this._width; if (oldValue != value) { this._width = value; this._isChanged = true; } } get Height() { return this._height; } set Height(value) { let oldValue = this._height; if (oldValue != value) { this._height = value; this._isChanged = true; } } constructor() { super(); this.type = "BarCodeElement"; this.tooltip = ""; this._description = new StiTextItem(); this._barcodeType = StiBarcodeType.QRCode; this._matrixSize = StiQRCodeSize.Automatic; this._errorCorrectionLevel = StiQRCodeErrorCorrectionLevel.Level1; this._bodyBrushType = StiBodyBrush.Solid; this._bodyBrushColor = Color.black(); this._startBodyBrushColor = Color.black(); this._endBodyBrushColor = Color.black(); this._bodyBrushBackColor = Color.transparent(); this._bodyBrushForeColor = Color.black(); this._bodyShapeType = StiQRCodeBodyShapeType.Square; this._bodyBrushAngle = 0; this._bodyBrushHatchStyle = HatchStyle.Horizontal; this._bodyBrushFocus = 0.5; this._bodyBrushBlend = 0.2; this._bodyBrushDrawHatch = false; this._eyeBallBrushType = StiBodyBrush.Solid; this._eyeBallBrushColor = Color.black(); this._startEyeBallBrushColor = Color.black(); this._endEyeBallBrushColor = Color.black(); this._eyeBallBrushBackColor = Color.transparent(); this._eyeBallBrushForeColor = Color.black(); this._eyeBallShapeType = StiQRCodeEyeBallShapeType.Square; this._eyeBallBrushAngle = 0; this._eyeBallBrushHatchStyle = HatchStyle.Horizontal; this._eyeBallBrushFocus = 0.5; this._eyeBallBrushBlend = 0.2; this._eyeBallBrushDrawHatch = false; this._eyeFrameBrushType = StiBodyBrush.Solid; this._eyeFrameBrushColor = Color.black(); this._startEyeFrameBrushColor = Color.black(); this._endEyeFrameBrushColor = Color.black(); this._eyeFrameBrushBackColor = Color.transparent(); this._eyeFrameBrushForeColor = Color.black(); this._eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Square; this._eyeFrameBrushAngle = 0; this._eyeFrameBrushHatchStyle = HatchStyle.Horizontal; this._eyeFrameBrushFocus = 0.5; this._eyeFrameBrushBlend = 0.2; this._eyeFrameBrushDrawHatch = false; this._codeString = StiLocalizationService.get("Components", "StiBarCode"); this._width = 90; this._height = 90; this._style = 1; this._backColor = Color.transparent(); this._foreColor = Color.black(); this.showProgress = false; this.showBodyBrushEditor = false; this.showEyeBallBrushEditor = false; this.showEyeFrameBrushEditor = false; this.geometry = new StiRectangleGeometry(170, 110); this.label = new StiLabelItem(this, StiLocalizationService.get("Components", "StiBarCode")); this.backColor = Color.transparent(); this.foreColor = Color.black(); this.bodyBrushColor = Color.black(); this.startBodyBrushColor = Color.black(); this.endBodyBrushColor = Color.black(); this.bodyBrushBackColor = Color.transparent(); this.bodyBrushForeColor = Color.black(); this.eyeBallBrushColor = Color.black(); this.startEyeBallBrushColor = Color.black(); this.endEyeBallBrushColor = Color.black(); this.eyeBallBrushBackColor = Color.transparent(); this.eyeBallBrushForeColor = Color.black(); this.eyeFrameBrushColor = Color.black(); this.startEyeFrameBrushColor = Color.black(); this.endEyeFrameBrushColor = Color.black(); this.eyeFrameBrushBackColor = Color.transparent(); this.eyeFrameBrushForeColor = Color.black(); } getUsedFonts(usedFonts) { super.getUsedFonts(usedFonts); usedFonts.add(this.description.font.family, this.arrayOfStylesToString(this.description.font.style), this.description.font.size); } isChanged() { return super.isChanged() || this.label?.isChanged() || this.description?.isChanged(); } setStyle(value) { switch (value) { case 1: this.backColor = Color.transparent(); this.bodyBrushType = StiBodyBrush.Solid; this.bodyBrushColor = Color.black(); this.bodyShapeType = StiQRCodeBodyShapeType.Square; this.eyeBallBrushType = StiBodyBrush.Solid; this.eyeBallBrushColor = Color.black(); this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Square; this.eyeFrameBrushType = StiBodyBrush.Solid; this.eyeFrameBrushColor = Color.black(); this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Square; break; case 2: this.backColor = Color.transparent(); this.bodyBrushType = StiBodyBrush.Solid; this.bodyBrushColor = Color.fromArgb(96, 75, 117); this.bodyShapeType = StiQRCodeBodyShapeType.Diamond; this.eyeBallBrushType = StiBodyBrush.Gradient; this.startEyeBallBrushColor = Color.fromArgb(3, 152, 152); this.endEyeBallBrushColor = Color.fromArgb(44, 110, 154); this.eyeBallBrushAngle = 30; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Round1; this.eyeFrameBrushType = StiBodyBrush.Glass; this.eyeFrameBrushColor = Color.fromArgb(118, 202, 226); this.eyeFrameBrushDrawHatch = false; this.eyeFrameBrushBlend = 0.2; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Round1; break; case 3: this.backColor = Color.transparent(); this.bodyBrushType = StiBodyBrush.Solid; this.bodyBrushColor = Color.fromArgb(85, 85, 85); this.bodyShapeType = StiQRCodeBodyShapeType.Circle; this.eyeBallBrushType = StiBodyBrush.Glare; this.startEyeBallBrushColor = Color.fromArgb(100, 115, 53); this.endEyeBallBrushColor = Color.fromArgb(137, 73, 106); this.eyeBallBrushAngle = 5; this.eyeBallBrushFocus = 0.5; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Circle; this.eyeFrameBrushType = StiBodyBrush.Glass; this.eyeFrameBrushColor = Color.fromArgb(57, 94, 133); this.eyeFrameBrushDrawHatch = false; this.eyeFrameBrushBlend = 0.2; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Circle; break; case 4: this.backColor = Color.transparent(); this.bodyBrushType = StiBodyBrush.Glare; this.startBodyBrushColor = Color.fromArgb(116, 46, 44); this.endBodyBrushColor = Color.fromArgb(33, 77, 132); this.bodyBrushAngle = 7; this.bodyBrushFocus = 0.9; this.bodyShapeType = StiQRCodeBodyShapeType.RoundedSquare; this.eyeBallBrushType = StiBodyBrush.Hatch; this.eyeBallBrushHatchStyle = HatchStyle.LargeCheckerBoard; this.eyeBallBrushForeColor = Color.fromArgb(120, 57, 72); this.eyeBallBrushBackColor = Color.fromArgb(105, 82, 137); this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Round; this.eyeFrameBrushType = StiBodyBrush.Gradient; this.startEyeFrameBrushColor = Color.fromArgb(90, 1, 179); this.endEyeFrameBrushColor = Color.fromArgb(59, 73, 144); this.eyeFrameBrushAngle = 30; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Round; break; case 5: this.backColor = Color.transparent(); this.bodyBrushType = StiBodyBrush.Glare; this.startBodyBrushColor = Color.fromArgb(184, 5, 8); this.endBodyBrushColor = Color.fromArgb(48, 117, 132); this.bodyBrushAngle = 3; this.bodyBrushFocus = 0.5; this.bodyShapeType = StiQRCodeBodyShapeType.ZebraCross1; this.eyeBallBrushType = StiBodyBrush.Solid; this.eyeBallBrushColor = Color.fromArgb(12, 172, 172); this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Circle; this.eyeFrameBrushType = StiBodyBrush.Gradient; this.startEyeFrameBrushColor = Color.fromArgb(191, 0, 178); this.endEyeFrameBrushColor = Color.fromArgb(193, 0, 64); this.eyeFrameBrushAngle = 10; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Round1; break; case 6: this.backColor = Color.transparent(); this.bodyBrushType = StiBodyBrush.Glare; this.startBodyBrushColor = Color.fromArgb(73, 57, 99); this.endBodyBrushColor = Color.fromArgb(1, 123, 46); this.bodyBrushAngle = 3; this.bodyBrushFocus = 0.5; this.bodyShapeType = StiQRCodeBodyShapeType.Dot; this.eyeBallBrushType = StiBodyBrush.Solid; this.eyeBallBrushColor = Color.fromArgb(36, 82, 143); this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Dots; this.eyeFrameBrushType = StiBodyBrush.Glare; this.startEyeFrameBrushColor = Color.fromArgb(179, 1, 166); this.endEyeFrameBrushColor = Color.fromArgb(49, 53, 28); this.eyeFrameBrushAngle = 10; this.eyeFrameBrushFocus = 0.8; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Dots; break; case 7: this.backColor = Color.fromArgb(37, 86, 99); this.bodyBrushType = StiBodyBrush.Hatch; this.bodyBrushHatchStyle = HatchStyle.DashedHorizontal; this.bodyBrushForeColor = Color.fromArgb(216, 238, 243); this.bodyBrushBackColor = Color.fromArgb(229, 185, 183); this.bodyShapeType = StiQRCodeBodyShapeType.Square; this.eyeBallBrushType = StiBodyBrush.Gradient; this.startEyeBallBrushColor = Color.fromArgb(242, 242, 242); this.endEyeBallBrushColor = Color.fromArgb(255, 147, 147); this.eyeBallBrushAngle = 4; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Square; this.eyeFrameBrushType = StiBodyBrush.Glare; this.startEyeFrameBrushColor = Color.fromArgb(178, 161, 199); this.endEyeFrameBrushColor = Color.fromArgb(253, 234, 218); this.eyeFrameBrushAngle = 4; this.eyeFrameBrushFocus = 0.5; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Square; break; case 8: this.backColor = Color.fromArgb(87, 118, 157); this.bodyBrushType = StiBodyBrush.Gradient; this.startBodyBrushColor = Color.fromArgb(219, 238, 243); this.endBodyBrushColor = Color.fromArgb(203, 184, 168); this.bodyBrushAngle = 5; this.bodyShapeType = StiQRCodeBodyShapeType.Dot; this.eyeBallBrushType = StiBodyBrush.Gradient; this.startEyeBallBrushColor = Color.fromArgb(219, 238, 243); this.endEyeBallBrushColor = Color.fromArgb(203, 184, 168); this.eyeBallBrushAngle = 5; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Square; this.eyeFrameBrushType = StiBodyBrush.Gradient; this.startEyeFrameBrushColor = Color.fromArgb(219, 238, 243); this.endEyeFrameBrushColor = Color.fromArgb(203, 184, 168); this.eyeFrameBrushAngle = 5; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Square; break; case 9: this.backColor = Color.fromArgb(144, 60, 57); this.bodyBrushType = StiBodyBrush.Gradient; this.startBodyBrushColor = Color.fromArgb(219, 238, 243); this.endBodyBrushColor = Color.fromArgb(251, 213, 181); this.bodyBrushAngle = 3; this.bodyShapeType = StiQRCodeBodyShapeType.Square; this.eyeBallBrushType = StiBodyBrush.Gradient; this.startEyeBallBrushColor = Color.fromArgb(219, 238, 243); this.endEyeBallBrushColor = Color.fromArgb(251, 213, 181); this.eyeBallBrushAngle = 3; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Square; this.eyeFrameBrushType = StiBodyBrush.Gradient; this.startEyeFrameBrushColor = Color.fromArgb(219, 238, 243); this.endEyeFrameBrushColor = Color.fromArgb(251, 213, 181); this.eyeFrameBrushAngle = 3; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Square; break; case 10: this.backColor = Color.fromArgb(37, 86, 99); this.bodyBrushType = StiBodyBrush.Hatch; this.bodyBrushHatchStyle = HatchStyle.DashedHorizontal; this.bodyBrushForeColor = Color.fromArgb(219, 238, 243); this.bodyBrushBackColor = Color.fromArgb(229, 185, 183); this.bodyShapeType = StiQRCodeBodyShapeType.Square; this.eyeBallBrushType = StiBodyBrush.Hatch; this.eyeBallBrushHatchStyle = HatchStyle.DashedHorizontal; this.eyeBallBrushForeColor = Color.fromArgb(219, 238, 243); this.eyeBallBrushBackColor = Color.fromArgb(229, 185, 183); this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Square; this.eyeFrameBrushType = StiBodyBrush.Hatch; this.eyeFrameBrushHatchStyle = HatchStyle.DashedHorizontal; this.eyeFrameBrushForeColor = Color.fromArgb(219, 238, 243); this.eyeFrameBrushBackColor = Color.fromArgb(229, 185, 183); this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Square; break; case 11: this.foreColor = Color.fromArgb(191, 178, 205); this.backColor = Color.fromArgb(38, 38, 38); this.bodyBrushType = StiBodyBrush.Gradient; this.startBodyBrushColor = Color.fromArgb(254, 243, 255); this.endBodyBrushColor = Color.fromArgb(154, 143, 167); this.bodyBrushAngle = 1; this.bodyShapeType = StiQRCodeBodyShapeType.Diamond; this.eyeBallBrushType = StiBodyBrush.Empty; this.startEyeBallBrushColor = Color.fromArgb(254, 243, 255); this.endEyeBallBrushColor = Color.fromArgb(154, 143, 167); this.eyeBallBrushAngle = 3; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Square; this.eyeFrameBrushType = StiBodyBrush.Empty; this.startEyeFrameBrushColor = Color.fromArgb(254, 243, 255); this.endEyeFrameBrushColor = Color.fromArgb(154, 143, 16); this.eyeFrameBrushAngle = 1; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Square; break; case 12: this.backColor = Color.fromArgb(37, 86, 99); this.bodyBrushType = StiBodyBrush.Glare; this.startBodyBrushColor = Color.fromArgb(178, 161, 199); this.endBodyBrushColor = Color.fromArgb(0, 255, 120); this.bodyBrushAngle = 3; this.bodyBrushFocus = 0.5; this.bodyShapeType = StiQRCodeBodyShapeType.Dot; this.eyeBallBrushType = StiBodyBrush.Solid; this.eyeBallBrushColor = Color.fromArgb(141, 179, 226); this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Dots; this.eyeFrameBrushType = StiBodyBrush.Gradient; this.startEyeFrameBrushColor = Color.fromArgb(255, 147, 251); this.endEyeFrameBrushColor = Color.fromArgb(146, 208, 80); this.eyeFrameBrushAngle = 4; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Dots; break; case 13: this.backColor = Color.transparent(); this.bodyBrushType = StiBodyBrush.Solid; this.bodyBrushColor = Color.fromArgb(28, 125, 138); this.bodyShapeType = StiQRCodeBodyShapeType.ZebraVertical; this.eyeBallBrushType = StiBodyBrush.Solid; this.eyeBallBrushColor = Color.fromArgb(211, 136, 84); this.eyeBallShapeType = StiQRCodeEyeBallShapeType.ZebraHorizontal; this.eyeFrameBrushType = StiBodyBrush.Solid; this.eyeFrameBrushColor = Color.fromArgb(88, 66, 111); this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Round; break; case 14: this.backColor = Color.transparent(); this.bodyBrushType = StiBodyBrush.Solid; this.bodyBrushColor = Color.fromArgb(34, 82, 94); this.bodyShapeType = StiQRCodeBodyShapeType.RoundedSquare; this.eyeBallBrushType = StiBodyBrush.Solid; this.eyeBallBrushColor = Color.fromArgb(34, 82, 94); this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Square; this.eyeFrameBrushType = StiBodyBrush.Solid; this.eyeFrameBrushColor = Color.fromArgb(34, 82, 94); this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Square; break; case 15: this.backColor = Color.transparent(); this.bodyBrushType = StiBodyBrush.Hatch; this.bodyBrushHatchStyle = HatchStyle.DarkHorizontal; this.bodyBrushForeColor = Color.fromArgb(176, 71, 67); this.bodyBrushBackColor = Color.fromArgb(91, 139, 150); this.bodyShapeType = StiQRCodeBodyShapeType.Square; this.eyeBallBrushType = StiBodyBrush.Glare; this.startEyeBallBrushColor = Color.fromArgb(191, 183, 184); this.endEyeBallBrushColor = Color.fromArgb(199, 29, 28); this.eyeBallBrushAngle = 30; this.eyeBallBrushFocus = 0.5; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Square; this.eyeFrameBrushType = StiBodyBrush.Glare; this.startEyeFrameBrushColor = Color.fromArgb(102, 79, 128); this.endEyeFrameBrushColor = Color.fromArgb(189, 95, 32); this.eyeFrameBrushAngle = 0; this.eyeFrameBrushFocus = 0; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Square; break; case 16: this.backColor = Color.transparent(); this.bodyBrushType = StiBodyBrush.Gradient; this.startBodyBrushColor = Color.fromArgb(147, 60, 53); this.endBodyBrushColor = Color.fromArgb(122, 106, 66); this.bodyBrushAngle = 3; this.bodyShapeType = StiQRCodeBodyShapeType.ZebraCross2; this.eyeBallBrushType = StiBodyBrush.Gradient; this.startEyeBallBrushColor = Color.fromArgb(147, 60, 53); this.endEyeBallBrushColor = Color.fromArgb(122, 106, 66); this.eyeBallBrushAngle = 3; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Square; this.eyeFrameBrushType = StiBodyBrush.Gradient; this.startEyeFrameBrushColor = Color.fromArgb(147, 60, 53); this.endEyeFrameBrushColor = Color.fromArgb(122, 106, 66); this.eyeFrameBrushAngle = 3; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Square; break; case 17: this.backColor = Color.transparent(); this.bodyBrushType = StiBodyBrush.Gradient; this.startBodyBrushColor = Color.fromArgb(203, 7, 203); this.endBodyBrushColor = Color.fromArgb(18, 158, 177); this.bodyBrushAngle = 5; this.bodyShapeType = StiQRCodeBodyShapeType.Square; this.eyeBallBrushType = StiBodyBrush.Gradient; this.startEyeBallBrushColor = Color.fromArgb(203, 7, 203); this.endEyeBallBrushColor = Color.fromArgb(18, 158, 177); this.eyeBallBrushAngle = 5; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Square; this.eyeFrameBrushType = StiBodyBrush.Gradient; this.startEyeFrameBrushColor = Color.fromArgb(203, 7, 203); this.endEyeFrameBrushColor = Color.fromArgb(18, 158, 177); this.eyeFrameBrushAngle = 5; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Square; break; case 18: this.backColor = Color.transparent(); this.bodyBrushType = StiBodyBrush.Gradient; this.startBodyBrushColor = Color.fromArgb(138, 57, 0); this.endBodyBrushColor = Color.fromArgb(137, 3, 15); this.bodyBrushAngle = 3; this.bodyShapeType = StiQRCodeBodyShapeType.Star; this.eyeBallBrushType = StiBodyBrush.Hatch; this.eyeBallBrushHatchStyle = HatchStyle.Plaid; this.eyeBallBrushForeColor = Color.fromArgb(81, 68, 115); this.eyeBallBrushBackColor = Color.fromArgb(125, 42, 35); this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Round3; this.eyeFrameBrushType = StiBodyBrush.Gradient; this.startEyeFrameBrushColor = Color.fromArgb(131, 50, 49); this.endEyeFrameBrushColor = Color.fromArgb(42, 82, 92); this.eyeFrameBrushAngle = 8; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Round3; break; case 19: this.backColor = Color.fromArgb(37, 86, 99); this.bodyBrushType = StiBodyBrush.Glare; this.startBodyBrushColor = Color.fromArgb(0, 226, 120); this.endBodyBrushColor = Color.yellow(); this.bodyBrushAngle = 3; this.bodyBrushFocus = 0.5; this.bodyShapeType = StiQRCodeBodyShapeType.ZebraCross1; this.eyeBallBrushType = StiBodyBrush.Gradient; this.startEyeBallBrushColor = Color.fromArgb(178, 161, 199); this.endEyeBallBrushColor = Color.white(); this.eyeBallBrushAngle = 4; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.ZebraVertical; this.eyeFrameBrushType = StiBodyBrush.Hatch; this.eyeFrameBrushHatchStyle = HatchStyle.DarkVertical; this.eyeFrameBrushForeColor = Color.fromArgb(253, 234, 218); this.eyeFrameBrushBackColor = Color.fromArgb(198, 217, 240); this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Dots; break; case 20: this.backColor = Color.fromArgb(37, 86, 99); this.bodyBrushType = StiBodyBrush.Glare; this.startBodyBrushColor = Color.fromArgb(255, 147, 147); this.endBodyBrushColor = Color.fromArgb(219, 238, 243); this.bodyBrushAngle = 0; this.bodyBrushFocus = 0.5; this.bodyShapeType = StiQRCodeBodyShapeType.ZebraCross2; this.eyeBallBrushType = StiBodyBrush.Glass; this.eyeBallBrushColor = Color.fromArgb(147, 255, 255); this.eyeBallBrushDrawHatch = false; this.eyeBallBrushBlend = 0.2; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Circle; this.eyeFrameBrushType = StiBodyBrush.Gradient; this.startEyeFrameBrushColor = Color.fromArgb(255, 147, 251); this.endEyeFrameBrushColor = Color.fromArgb(255, 147, 14); this.eyeFrameBrushAngle = 5; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Round1; break; case 21: this.backColor = Color.fromArgb(37, 86, 99); this.bodyBrushType = StiBodyBrush.Gradient; this.startBodyBrushColor = Color.white(); this.endBodyBrushColor = Color.fromArgb(165, 165, 165); this.bodyBrushAngle = 3; this.bodyShapeType = StiQRCodeBodyShapeType.Circle; this.eyeBallBrushType = StiBodyBrush.Glare; this.startEyeBallBrushColor = Color.fromArgb(215, 227, 188); this.endEyeBallBrushColor = Color.fromArgb(255, 147, 251); this.eyeBallBrushAngle = 5; this.eyeBallBrushFocus = 0.5; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Circle; this.eyeFrameBrushType = StiBodyBrush.Glass; this.eyeFrameBrushColor = Color.fromArgb(219, 229, 241); this.eyeFrameBrushDrawHatch = false; this.eyeFrameBrushBlend = 0.2; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Circle; break; case 22: this.backColor = Color.fromArgb(37, 86, 99); this.bodyBrushType = StiBodyBrush.Glare; this.startBodyBrushColor = Color.fromArgb(229, 182, 183); this.endBodyBrushColor = Color.fromArgb(141, 179, 226); this.bodyBrushAngle = 7; this.bodyBrushFocus = 0.9; this.bodyShapeType = StiQRCodeBodyShapeType.RoundedSquare; this.eyeBallBrushType = StiBodyBrush.Hatch; this.eyeBallBrushHatchStyle = HatchStyle.LargeCheckerBoard; this.eyeBallBrushForeColor = Color.fromArgb(204, 193, 217); this.eyeBallBrushBackColor = Color.fromArgb(242, 220, 219); this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Round; this.eyeFrameBrushType = StiBodyBrush.Glare; this.startEyeFrameBrushColor = Color.fromArgb(201, 147, 255); this.endEyeFrameBrushColor = Color.fromArgb(219, 229, 241); this.eyeFrameBrushAngle = 5; this.eyeFrameBrushFocus = 0.5; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Round; break; case 23: this.backColor = Color.fromArgb(37, 86, 99); this.bodyBrushType = StiBodyBrush.Gradient; this.startBodyBrushColor = Color.fromArgb(165, 165, 165); this.endBodyBrushColor = Color.white(); this.bodyBrushAngle = 3; this.bodyShapeType = StiQRCodeBodyShapeType.Diamond; this.eyeBallBrushType = StiBodyBrush.Glare; this.startEyeBallBrushColor = Color.fromArgb(147, 255, 255); this.endEyeBallBrushColor = Color.fromArgb(112, 48, 160); this.eyeBallBrushAngle = 5; this.eyeBallBrushFocus = 0.5; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Round1; this.eyeFrameBrushType = StiBodyBrush.Glass; this.eyeFrameBrushColor = Color.fromArgb(216, 238, 243); this.eyeFrameBrushDrawHatch = false; this.eyeFrameBrushBlend = 0.2; this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Round1; break; case 24: this.backColor = Color.fromArgb(37, 86, 99); this.bodyBrushType = StiBodyBrush.Glare; this.startBodyBrushColor = Color.fromArgb(255, 40, 100); this.endBodyBrushColor = Color.fromArgb(146, 215, 80); this.bodyBrushAngle = 3; this.bodyBrushFocus = 0.5; this.bodyShapeType = StiQRCodeBodyShapeType.ZebraHorizontal; this.eyeBallBrushType = StiBodyBrush.Gradient; this.startEyeBallBrushColor = Color.fromArgb(0, 176, 240); this.endEyeBallBrushColor = Color.fromArgb(229, 224, 236); this.eyeBallBrushAngle = 0; this.eyeBallShapeType = StiQRCodeEyeBallShapeType.Star; this.eyeFrameBrushType = StiBodyBrush.Hatch; this.eyeFrameBrushHatchStyle = HatchStyle.DashedUpwardDiagonal; this.eyeFrameBrushForeColor = Color.fromArgb(184, 204, 228); this.eyeFrameBrushBackColor = Color.fromArgb(178, 161, 199); this.eyeFrameShapeType = StiQRCodeEyeFrameShapeType.Circle; break; } } resetChanged() { super.resetChanged(); if (this.label != null) { this.label.resetChanged(); } if (this.description != null) { this.description.resetChanged(); } } get description() { return this._description; } set description(value) { let oldValue = this._description; if (oldValue != value) { this._description = value; this._isChanged = true; } } get barcodeType() { return this._barcodeType; } set barcodeType(value) { let oldValue = this._barcodeType; if (oldValue != value) { this._barcodeType = value; this._isChanged = true; } } get matrixSize() { return this._matrixSize; } set matrixSize(value) { let oldValue = this._matrixSize; if (oldValue != value) { this._matrixSize = value; this._isChanged = true; } } get errorCorrectionLevel() { return this._errorCorrectionLevel; } set errorCorrectionLevel(value) { let oldValue = this._errorCorrectionLevel; if (oldValue != value) { this._errorCorrectionLevel = value; this._isChanged = true; } } get codeString() { return this._codeString; } set codeString(value) { let oldValue = this._codeString; if (oldValue != value) { this._codeString = value; this._isChanged = true; } } get eyeBallBrushType() { return this._eyeBallBrushType; } set eyeBallBrushType(value) { let oldValue = this._eyeBallBrushType; if (oldValue != value) { this._eyeBallBrushType = value; this._isChanged = true; } } get eyeBallBrushColor() { return this._eyeBallBrushColor; } set eyeBallBrushColor(value) { let oldValue = this._eyeBallBrushColor; if (oldValue != value) { this._eyeBallBrushColor = value; this._eyeBallBrushColor.changesInterceptor = this; this._isChanged = true; } } get startEyeBallBrushColor() { return this._startEyeBallBrushColor; } set startEyeBallBrushColor(value) { let oldValue = this._startEyeBallBrushColor; if (oldValue != value) { this._startEyeBallBrushColor = value; this._startEyeBallBrushColor.changesInterceptor = this; this._isChanged = true; } } get endEyeBallBrushColor() { return this._endEyeBallBrushColor; } set endEyeBallBrushColor(value) { let oldValue = this._endEyeBallBrushColor; if (oldValue != value) { this._endEyeBallBrushColor = value; this._endEyeBallBrushColor.changesInterceptor = this; this._isChanged = true; } } get eyeBallBrushBackColor() { return this._eyeBallBrushBackColor; } set eyeBallBrushBackColor(value) { let oldValue = this._eyeBallBrushBackColor; if (oldValue != value) { this._eyeBallBrushBackColor = value; this._eyeBallBrushBackColor.changesInterceptor = this; this._isChanged = true; } } get eyeBallBrushForeColor() { return this._eyeBallBrushForeColor; } set eyeBallBrushForeColor(value) { let oldValue = this._eyeBallBrushForeColor; if (oldValue != value) { this._eyeBallBrushForeColor = value; this._eyeBallBrushForeColor.changesInterceptor = this; this._isChanged = true; } } get eyeBallShapeType() { return this._eyeBallShapeType; } set eyeBallShapeType(value) { let oldValue = this._eyeBallShapeType; if (oldValue != value) { this._eyeBallShapeType = value; this._isChanged = true; } } get eyeBallBrushAngle() { return this._eyeBallBrushAngle; } set eyeBallBrushAngle(value) { let oldValue = this._eyeBallBrushAngle; if (oldValue != value) { if (value <= 0) { this._eyeBallBrushAngle = 0; } else { this._eyeBallBrushAngle = value; } this._isChanged = true; } } get eyeBallBrushHatchStyle() { return this._eyeBallBrushHatchStyle; } set eyeBallBrushHatchStyle(value) { let oldValue = this._eyeBallBrushHatchStyle; if (oldValue != value) { this._eyeBallBrushHatchStyle = value; this._isChanged = true; } } get eyeBallBrushFocus() { return this._eyeBallBrushFocus; } set eyeBallBrushFocus(value) { let oldValue = this._eyeBallBrushFocus; if (oldValue != value) { if (value <= 0) { this._eyeBallBrushFocus = 0; } else { this._eyeBallBrushFocus = value; } this._isChanged = true; } } get eyeBallBrushBlend() { return this._eyeBallBrushBlend; } set eyeBallBrushBlend(value) { let oldValue = this._eyeBallBrushBlend; if (oldValue != value) { if (value <= 0) { this._eyeBallBrushBlend = 0; } else { this._eyeBallBrushBlend = value; } this._isChanged = true; } } get eyeBallBrushDrawHatch() { return this._eyeBallBrushDrawHatch; } set eyeBallBrushDrawHatch(value) { let oldValue = this._eyeBallBrushDrawHatch; if (oldValue != value) { this._eyeBallBrushDrawHatch = value; this._isChanged = true; } } get bodyBrushType() { return this._bodyBrushType; } set bodyBrushType(value) { let oldValue = this._bodyBrushType; if (oldValue != value) { this._bodyBrushType = value; this._isChanged = true; } } get bodyBrushColor() { return this._bodyBrushColor; } set bodyBrushColor(value) { let oldValue = this._bodyBrushColor; if (oldValue != value) { this._bodyBrushColor = value; this._bodyBrushColor.changesInterceptor = this; this._isChanged = true; } } get startBodyBrushColor() { return this._startBodyBrushColor; } set startBodyBrushColor(value) { let oldValue = this._startBodyBrushColor; if (oldValue != value) { this._startBodyBrushColor = value; this._startBodyBrushColor.changesInterceptor = this; this._isChanged = true; } } get endBodyBrushColor() { return this._endBodyBrushColor; } set endBodyBrushColor(value) { let oldValue = this._endBodyBrushColor; if (oldValue != value) { this._endBodyBrushColor = value; this._endBodyBrushColor.changesInterceptor = this; this._isChanged = true; } } get bodyBrushBackColor() { return this._bodyBrushBackColor; } set bodyBrushBackColor(value) { let oldValue = this._bodyBrushBackColor; if (oldValue != value) { this._bodyBrushBackColor = value; this._bodyBrushBackColor.changesInterceptor = this; this._isChanged = true; } } get bodyBrushForeColor() { return this._bodyBrushForeColor; } set bodyBrushForeColor(value) { let oldValue = this._bodyBrushForeColor; if (oldValue != value) { this._bodyBrushForeColor = value; this._bodyBrushForeColor.changesInterceptor = this; this._isChanged = true; } } get bodyShapeType() { return this._bodyShapeType; } set bodyShapeType(value) { let oldValue = this._bodyShapeType; if (oldValue != value) { this._bodyShapeType = value; this._isChanged = true; } } get bodyBrushAngle() { return this._bodyBrushAngle; } set bodyBrushAngle(value) { let oldValue = this._bodyBrushAngle; if (oldValue != value) { if (value <= 0) { this._bodyBrushAngle = 0; } else { this._bodyBrushAngle = value; } this._isChanged = true; } } get bodyBrushHatchStyle() { return this._bodyBrushHatchStyle; } set bodyBrushHatchStyle(value) { let oldValue = this._bodyBrushHatchStyle; if (oldValue != value) { this._bodyBrushHatchStyle = value; this._isChanged = true; } } get bodyBrushFocus() { return this._bodyBrushFocus; } set bodyBrushFocus(value) { let oldValue = this._bodyBrushFocus; if (oldValue != value) { if (value <= 0) { this._bodyBrushFocus = 0; } else { this._bodyBrushFocus = value; } this._isChanged = true; } } get bodyBrushBlend() { return this._bodyBrushBlend; } set bodyBrushBlend(value) { let oldValue = this._bodyBrushBlend; if (oldValue != value) { if (value <= 0) { this._bodyBrushBlend = 0; } else { this._bodyBrushBlend = value; } this._isChanged = true; } } get bodyBrushDrawHatch() { return this._bodyBrushDrawHatch; } set bodyBrushDrawHatch(value) { let oldValue = this._bodyBrushDrawHatch; if (oldValue != value) { this._bodyBrushDrawHatch = value; this._isChanged = true; } } get eyeFrameBrushType() { return this._eyeFrameBrushType; } set eyeFrameBrushType(value) { let oldValue = this._eyeFrameBrushType; if (oldValue != value) { this._eyeFrameBrushType = value; this._isChanged = true; } } get eyeFrameBrushColor() { return this._eyeFrameBrushColor; } set eyeFrameBrushColor(value) { let oldValue = this._eyeFrameBrushColor; if (oldValue != value) { this._eyeFrameBrushColor = value; this._eyeFrameBrushColor.changesInterceptor = this; this._isChanged = true; } } get startEyeFrameBrushColor() { return this._startEyeFrameBrushColor; } set startEyeFrameBrushColor(value) { let oldValue = this._startEyeFrameBrushColor; if (oldValue != value) { this._startEyeFrameBrushColor = value; this._startEyeFrameBrushColor.changesInterceptor = this; this._isChanged = true; } } get endEyeFrameBrushColor() { return this._endEyeFrameBrushColor; } set endEyeFrameBrushColor(value) { let oldValue = this._endEyeFrameBrushColor; if (oldValue != value) { this._endEyeFrameBrushColor = value; this._endEyeFrameBrushColor.changesInterceptor = this; this._isChanged = true; } } get eyeFrameBrushBackColor() { return this._eyeFrameBrushBackColor; } set eyeFrameBrushBackColor(value) { let oldValue = this._eyeFrameBrushBackColor; if (oldValue != value) { this._eyeFrameBrushBackColor = value; this._eyeFrameBrushBackColor.changesInterceptor = this; this._isChanged = true; } } get eyeFrameBrushForeColor() { return this._eyeFrameBrushForeColor; } set eyeFrameBrushForeColor(value) { let oldValue = this._eyeFrameBrushForeColor; if (oldValue != value) { this._eyeFrameBrushForeColor = value; this._eyeFrameBrushForeColor.changesInterceptor = this; this._isChanged = true; } } get eyeFrameShapeType() { return this._eyeFrameShapeType; } set eyeFrameShapeType(value) { let oldValue = this._eyeFrameShapeType; if (oldValue != value) { this._eyeFrameShapeType = value; this._isChanged = true; } } get eyeFrameBrushAngle() { return this._eyeFrameBrushAngle; } set eyeFrameBrushAngle(value) { let oldValue = this._eyeFrameBrushAngle; if (oldValue != value) { if (value <= 0) { this._eyeFrameBrushAngle = 0; } else { this._eyeFrameBrushAngle = value; } this._isChanged = true; } } get eyeFrameBrushHatchStyle() { return this._eyeFrameBrushHatchStyle; } set eyeFrameBrushHatchStyle(value) { let oldValue = this._eyeFrameBrushHatchStyle; if (oldValue != value) { this._eyeFrameBrushHatchStyle = value; this._isChanged = true; } } get eyeFrameBrushFocus() { return this._eyeFrameBrushFocus; } set eyeFrameBrushFocus(value) { let oldValue = this._eyeFrameBrushFocus; if (oldValue != value) { if (value <= 0) { this._eyeFrameBrushFocus = 0; } else { this._eyeFrameBrushFocus = value; } this._isChanged = true; } } get eyeFrameBrushBlend() { return this._eyeFrameBrushBlend; } set eyeFrameBrushBlend(value) { let oldValue = this._eyeFrameBrushBlend; if (oldValue != value) { if (value <= 0) { this._eyeFrameBrushBlend = 0; } else { this._eyeFrameBrushBlend = value; } this._isChanged = true; } } get eyeFrameBrushDrawHatch() { return this._eyeFrameBrushDrawHatch; } set eyeFrameBrushDrawHatch(value) { let oldValue = this._eyeFrameBrushDrawHatch; if (oldValue != value) { this._eyeFrameBrushDrawHatch = value; this._isChanged = true; } } saveToJsonObject(options) { if (this.element && this.element.nativeElement) { if (this.element.nativeElement?.offsetWidth > 0 && this.element.nativeElement?.offsetHeight > 0 && (this.barcodeType == StiBarcodeType.Aztec || this.barcodeType == StiBarcodeType.QRCode || this.barcodeType == StiBarcodeType.DataMatrix || this.barcodeType == StiBarcodeType.Maxicode)) { if (this.element.nativeElement?.offsetWidth < this.element.nativeElement?.offsetHeight) { this.Width = this.element.nativeElement?.offsetWidth; this.Height = this.element.nativeElement?.offsetWidth; } else { this.Width = this.element.nativeElement?.offsetHeight; this.Height = this.element.nativeElement?.offsetHeight; } } else { this.Width = this.element.nativeElement?.offsetWidth; this.Height = this.element.nativeElement?.offsetHeight; } } let jObject = super.saveToJsonObject(options); jObject.addPropertyJObject("Label", this.label.saveToJsonObject(options)); jObject.addPropertyJObject("Description", this.description.saveToJsonObject(options)); jObject.addPropertyEnum("BarcodeType", StiBarcodeType, this.barcodeType); jObject.addPropertyString("CodeString", this.codeString); // jObject.addPropertyString("Tooltip", this.tooltip); jObject.addPropertyNumber("Width", this.Width); jObject.addPropertyNumber("Height", this.Height); jObject.addPropertyNumber("Style", this.style); jObject.addPropertyColor("BackColor", this.backColor); jObject.addPropertyColor("ForeColor", this.foreColor); jObject.addPropertyEnum("MatrixSize", StiQRCodeSize, this.matrixSize); jObject.addPropertyEnum("ErrorCorrectionLevel", StiQRCodeErrorCorrectionLevel, this.errorCorrectionLevel); jObject.addPropertyEnum("BodyBrushType", StiBodyBrush, this.bodyBrushType); jObject.addPropertyEnum("EyeBallBrushType", StiBodyBrush, this.eyeBallBrushType); jObject.addPropertyEnum("EyeFrameBrushType", StiBodyBrush, this.eyeFrameBrushType); jObject.addPropertyEnum("BodyShapeType", StiQRCodeBodyShapeType, this.bodyShapeType); jObject.addPropertyColor("BodyBrushColor", this.bodyBrushColor); jObject.addPropertyColor("StartBodyBrushColor", this.startBodyBrushColor); jObject.addPropertyColor("EndBodyBrushColor", this.endBodyBrushColor); jObject.addPropertyColor("BodyBrushForeColor", this.bodyBrushForeColor); jObject.addPropertyColor("BodyBrushBackColor", this.bodyBrushBackColor); jObject.addPropertyNumber("BodyBrushAngle", this.bodyBrushAngle); jObject.addPropertyEnum("BodyBrushHatchStyle", HatchStyle, this.bodyBrushHatchStyle); jObject.addPropertyNumber("BodyBrushFocus", this.bodyBrushFocus); jObject.addPropertyNumber("BodyBrushBlend", this.bodyBrushBlend); jObject.addPropertyBool("BodyBrushDrawHatch", this.bodyBrushDrawHatch); jObject.addPropertyColor("EyeBallBrushColor", this.eyeBallBrushColor); jObject.addPropertyColor("StartEyeBallBrushColor", this.startEyeBallBrushColor); jObject.addPropertyColor("EndEyeBallBrushColor", this.endEyeBallBrushColor); jObject.addPropertyEnum("EyeBallShapeType", StiQRCodeEyeBallShapeType, this.eyeBallShapeType); jObject.addPropertyColor("EyeBallBrushForeColor", this.eyeBallBrushForeColor); jObject.addPropertyColor("EyeBallBrushBackColor", this.eyeBallBrushBackColor); jObject.addPropertyNumber("EyeBallBrushAngle", this.eyeBallBrushAngle); jObject.addPropertyNumber("EyeBallBrushBlend", this.eyeBallBrushBlend); jObject.addPropertyEnum("EyeBallBrushHatchStyle", HatchStyle, this.eyeBallBrushHatchStyle); jObject.addPropertyNumber("EyeBallBrushFocus", this.eyeBallBrushFocus); jObject.addPropertyBool("EyeBallBrushDrawHatch", this.eyeBallBrushDrawHatch); jObject.addPropertyColor("EyeFrameBrushColor", this.eyeFrameBrushColor); jObject.addPropertyColor("StartEyeFrameBrushColor", this.startEyeFrameBrushColor); jObject.addPropertyColor("EndEyeFrameBrushColor", this.endEyeFrameBrushColor); jObject.addPropertyEnum("EyeFrameShapeType", StiQRCodeEyeFrameShapeType, this.eyeFrameShapeType); jObject.addPropertyColor("EyeFrameBrushForeColor", this.eyeFrameBrushForeColor); jO