Class HanXinExtCodetextBuilder

Class HanXinExtCodetextBuilder

Namespace: Aspose.BarCode.Generation
Assembly: Aspose.BarCode.dll (25.1.0)

Rozszerzony generator kodu tekstowego dla Han Xin Code w trybie rozszerzonym HanXinEncodeMode

public class HanXinExtCodetextBuilder

Dziedziczenie

objectHanXinExtCodetextBuilder

Członkowie dziedziczeni

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Przykłady

//Rozszerzony tryb kodu tekstowego
//tworzenie kodu tekstowego
var codeTextBuilder = new HanXinExtCodetextBuilder();
codeTextBuilder.AddGB18030TwoByte("漄");
codeTextBuilder.AddGB18030FourByte("㐁");
codeTextBuilder.AddCommonChineseRegionOne("全");
codeTextBuilder.AddCommonChineseRegionTwo("螅");
codeTextBuilder.AddNumeric("123");
codeTextBuilder.AddText("qwe");
codeTextBuilder.AddUnicode("ıntəˈnæʃənəl");
codeTextBuilder.AddECI("ΑΒΓΔΕ", 9);
codeTextBuilder.AddAuto("abc");
codeTextBuilder.AddBinary("abc");
codeTextBuilder.AddURI(@"backslashes_should_be_doubled\000555:test");
codeTextBuilder.AddGS1(@"(01)03453120000011(17)191125(10)ABCD1234(21)10");

var expectedStr = @"漄㐁全螅123qweıntəˈnæʃənəlΑΒΓΔΕabcabcbackslashes_should_be_doubled\000555:test(01)03453120000011(17)191125(10)ABCD1234(21)10";

//generowanie kodu tekstowego
var str = codeTextBuilder.GetExtendedCodetext();

//generowanie
using (var bg = new BarcodeGenerator(EncodeTypes.HanXin, str))
{
    bg.Parameters.Barcode.HanXin.HanXinEncodeMode = HanXinEncodeMode.Extended;
    var img = bg.GenerateBarCodeImage();
    using (var r = new BarCodeReader(img, DecodeType.HanXin))
     {
        var found = r.ReadBarCodes();
        Assert.AreEqual(1, found.Length);
        Assert.AreEqual(expectedStr, found[0].CodeText);
      }
}

Konstruktory

HanXinExtCodetextBuilder()

public HanXinExtCodetextBuilder()

Metody

AddAuto(string)

Dodaje fragment kodu tekstowego w trybie automatycznym

public void AddAuto(string text)

Parametry

text string

String kodu tekstowego

AddBinary(string)

Dodaje fragment kodu tekstowego w trybie binarnym

public void AddBinary(string text)

Parametry

text string

String kodu tekstowego

AddCommonChineseRegionOne(string)

Dodaje fragment kodu tekstowego w trybie Powszechnej Chińskiej Regionu Jeden

public void AddCommonChineseRegionOne(string text)

Parametry

text string

String kodu tekstowego

AddCommonChineseRegionTwo(string)

Dodaje fragment kodu tekstowego w trybie Powszechnej Chińskiej Regionu Dwa

public void AddCommonChineseRegionTwo(string text)

Parametry

text string

String kodu tekstowego

AddECI(string, int)

Dodaje fragment kodu tekstowego w trybie ECI

public void AddECI(string text, int encoding)

Parametry

text string

String kodu tekstowego

encoding int

Kodowanie ECI w formacie całkowitym

AddGB18030FourByte(string)

Dodaje fragment kodu tekstowego w trybie GB18030 Cztery Bajty

public void AddGB18030FourByte(string text)

Parametry

text string

String kodu tekstowego

AddGB18030TwoByte(string)

Dodaje fragment kodu tekstowego w trybie GB18030 Dwa Bajty

public void AddGB18030TwoByte(string text)

Parametry

text string

String kodu tekstowego

AddGS1(string)

Dodaje fragment kodu tekstowego w trybie GS1

public void AddGS1(string text)

Parametry

text string

String kodu tekstowego

AddNumeric(string)

Dodaje fragment kodu tekstowego w trybie numerycznym

public void AddNumeric(string text)

Parametry

text string

String kodu tekstowego

AddText(string)

Dodaje fragment kodu tekstowego w trybie tekstowym

public void AddText(string text)

Parametry

text string

String kodu tekstowego

AddURI(string)

Dodaje fragment kodu tekstowego w trybie URI

public void AddURI(string text)

Parametry

text string

String kodu tekstowego

AddUnicode(string)

Dodaje fragment kodu tekstowego w trybie Unicode

public void AddUnicode(string text)

Parametry

text string

String kodu tekstowego

GetExtendedCodetext()

Zwraca kod tekstowy z rozszerzonego budowniczego kodu tekstowego

public string GetExtendedCodetext()

Zwraca

string

Kod tekstowy w trybie rozszerzonym

 Polski