public void ActionPrintText(string objectIdentifier, string content, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PageModeBuilder nativeObject))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.ActionPrintText(content);

            promise.Resolve();
        }
        public void StyleHorizontalPositionBy(string objectIdentifier, double position, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PageModeBuilder nativeObject))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.StyleHorizontalPositionBy(position);

            promise.Resolve();
        }
Exemple #3
0
        public void StyleHorizontalTabPositions(string objectIdentifier, int[] positions, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PrinterBuilder nativeObject))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.StyleHorizontalTabPositions(positions);

            promise.Resolve();
        }
        public void SettingAutomaticPageLength(string objectIdentifier, bool enable, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out BezelSettingBuilder nativeObject))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.SettingAutomaticPageLength(enable);

            promise.Resolve();
        }
        public void StyleCharacterSpace(string objectIdentifier, double width, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PageModeBuilder nativeObject))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.StyleCharacterSpace(width);

            promise.Resolve();
        }
Exemple #6
0
        public void StyleLineSpace(string objectIdentifier, double height, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PrinterBuilder nativeObject))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.StyleLineSpace(height);

            promise.Resolve();
        }
        public void AddRaw(string objectIdentifier, byte[] content, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out DocumentBuilder nativeObject))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.AddRaw(content);

            promise.Resolve();
        }
        public void SettingPrintableArea(string objectIdentifier, double width, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out DocumentBuilder nativeObject))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.SettingPrintableArea(width);

            promise.Resolve();
        }
Exemple #9
0
        public void StyleUnderLine(string objectIdentifier, bool enable, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PrinterBuilder nativeObject))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.StyleUnderLine(enable);

            promise.Resolve();
        }
        public void SettingTopMargin(string objectIdentifier, double height, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out DocumentBuilder nativeObject))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.SettingTopMargin(height);

            promise.Resolve();
        }
        public void Add(string objectIdentifier, string printerBuilderIdentifier, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PrinterBuilder nativeObject) ||
                !GetObject(printerBuilderIdentifier, out PrinterBuilder printerBuilder))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.Add(printerBuilder);

            promise.Resolve();
        }
        public void ActionPrintQRCode(string objectIdentifier, string content, string model, string level, int cellSize, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PrinterBuilder nativeObject) ||
                !StarIO10ValueConverter.ToPrinterQRCodeParameter(content, model, level, cellSize, out QRCodeParameter parameter))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.ActionPrintQRCode(parameter);

            promise.Resolve();
        }
        public void ActionPrintPdf417(string objectIdentifier, string content, int column, int line, int module, int aspect, string level, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PrinterBuilder nativeObject) ||
                !StarIO10ValueConverter.ToPrinterPdf417Parameter(content, column, line, module, aspect, level, out Pdf417Parameter parameter))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.ActionPrintPdf417(parameter);

            promise.Resolve();
        }
        public void ActionPrintBarcode(string objectIdentifier, string content, string symbology, bool printHri, int barDots, string barRatioLevel, double height, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PrinterBuilder nativeObject) ||
                !StarIO10ValueConverter.ToPrinterBarcodeParameter(content, symbology, printHri, barDots, barRatioLevel, height, out BarcodeParameter parameter))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.ActionPrintBarcode(parameter);

            promise.Resolve();
        }
 public static void StaticVoidPromise(int x, IReactPromise <JSValue.Void> promise)
 {
     if (x % 2 == 0)
     {
         promise.Resolve();
     }
     else
     {
         promise.Reject(new ReactError {
             Message = "Odd unexpected"
         });
     }
 }
        public void ActionDrive(string objectIdentifier, string channel, int repeat, int onTime, int offTime, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out BuzzerBuilder nativeObject) ||
                !StarIO10ValueConverter.ToBuzzerDriveParameter(channel, repeat, onTime, offTime, out DriveParameter parameter))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.ActionDrive(parameter);

            promise.Resolve();
        }
        public void SettingHoldPrint(string objectIdentifier, bool enable, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out DocumentBuilder nativeObject) ||
                !StarIO10ValueConverter.ToPrinterHoldPrintParameter(enable, out HoldPrintParameter parameter))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.SettingHoldPrint(parameter);

            promise.Resolve();
        }
        public void SettingLabel(string objectIdentifier, bool start, bool end, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out DocumentBuilder nativeObject) ||
                !StarIO10ValueConverter.ToPrinterLabelParameter(start, end, out LabelParameter parameter))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.SettingLabel(parameter);

            promise.Resolve();
        }
        public void StyleFont(string objectIdentifier, string type, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PrinterBuilder nativeObject) ||
                !StarIO10ValueConverter.ToPrinterFontType(type, out FontType nativeType))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.StyleFont(nativeType);

            promise.Resolve();
        }
 public static void StaticNegatePromise(int x, IReactPromise <int> promise)
 {
     if (x >= 0)
     {
         promise.Resolve(-x);
     }
     else
     {
         promise.Reject(new ReactError {
             Message = "Already negative"
         });
     }
 }
        public void ActionDriveOneTimeSound(string objectIdentifier, byte[] source, int volume, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out MelodySpeakerBuilder nativeObject) ||
                !StarIO10ValueConverter.ToMelodySpeakerDriveOneTimeSoundParameter(source, volume, out DriveOneTimeSoundParameter parameter))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.ActionDriveOneTimeSound(parameter);

            promise.Resolve();
        }
Exemple #22
0
        public void StyleCharacterEncoding(string objectIdentifier, string type, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out DisplayBuilder nativeObject) ||
                !StarIO10ValueConverter.ToDisplayCharacterEncodingType(type, out CharacterEncodingType nativeType))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.StyleCharacterEncoding(nativeType);

            promise.Resolve();
        }
Exemple #23
0
        public void ActionOpen(string objectIdentifier, string channel, int onTime, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out DrawerBuilder nativeObject) ||
                !StarIO10ValueConverter.ToDrawerOpenParameter(channel, onTime, out OpenParameter parameter))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.ActionOpen(parameter);

            promise.Resolve();
        }
        public void AddMelodySpeaker(string objectIdentifier, string melodySpeakerBuilderIdentifier, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out DocumentBuilder nativeObject) ||
                !MelodySpeakerBuilderWrapper.GetObject(melodySpeakerBuilderIdentifier, out MelodySpeakerBuilder melodySpeakerBuilder))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.AddMelodySpeaker(melodySpeakerBuilder);

            promise.Resolve();
        }
 public static void StaticDividePromise(int x, int y, IReactPromise <int> promise)
 {
     if (y != 0)
     {
         promise.Resolve(x / y);
     }
     else
     {
         promise.Reject(new ReactError {
             Message = "Division by 0"
         });
     }
 }
        public void StyleMagnification(string objectIdentifier, int width, int height, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PrinterBuilder nativeObject) ||
                !StarIO10ValueConverter.ToMagnificationParameter(width, height, out MagnificationParameter parameter))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.StyleMagnification(parameter);

            promise.Resolve();
        }
Exemple #27
0
        public void ActionSetContrast(string objectIdentifier, string value, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out DisplayBuilder nativeObject) ||
                !StarIO10ValueConverter.ToDisplayContrast(value, out Contrast nativeValue))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.ActionSetContrast(nativeValue);

            promise.Resolve();
        }
        public void StyleAlignment(string objectIdentifier, string alignment, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PrinterBuilder nativeObject) ||
                !StarIO10ValueConverter.ToPrinterAlignment(alignment, out Alignment nativeAlignment))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.StyleAlignment(nativeAlignment);

            promise.Resolve();
        }
Exemple #29
0
        public void StyleCursorPositionTo(string objectIdentifier, int x, int y, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out DisplayBuilder nativeObject) ||
                !StarIO10ValueConverter.ToDisplayPositionParameter(x, y, out PositionParameter parameter))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.StyleCursorPositionTo(parameter);

            promise.Resolve();
        }
        public void ActionPrintLogo(string objectIdentifier, string keyCode, IReactPromise <JSValue.Void> promise)
        {
            if (!GetObject(objectIdentifier, out PrinterBuilder nativeObject) ||
                !StarIO10ValueConverter.ToPrinterLogoParameter(keyCode, out LogoParameter parameter))
            {
                promise.Reject(new ReactError());
                return;
            }

            nativeObject.ActionPrintLogo(parameter);

            promise.Resolve();
        }