PowerTools PlusPak for Windows Forms 8.0J
MicroPDF417 クラス
メンバ  使用例 

MicroPDF417固有の値の設定を行うためのクラスです。
構文
Public Class MicroPDF417 
   Inherits GrapeCity.Win.BarCode.ValueType.ValueBase
   Implements GrapeCity.Win.BarCode.IBarCodeOptions 
public class MicroPDF417 : GrapeCity.Win.BarCode.ValueType.ValueBase, GrapeCity.Win.BarCode.IBarCodeOptions  
使用例

次のサンプルコードは、GrapeCity.Win.BarCode.GcBarCodeMicroPDF417 コーデックを使用する方法と、MicroPDF417 のプロパティの設定例を示します。

private void CreateMicroPDF417BarCode()
{
    // Create 6 GcBarCode controls, the first to fourth GcBarcodes show every kind of CompactionMode,
    // the fifth GcBarCode shows version property,
    // the sixth GcBarCode shows Structured Append information.

    //gcBarCode1: CompactionMode is Auto.
    //The first three byte data "67,68,69", could be compacted by Text and Byte Compaction mode,
    //but TextCompactionMode is more effective, so TextCompactionMode have been selected.
    //Then, the follow three byte data, only ByteCompactionMode is valid for "byte(255)".
    //So ByteCompactionMode will be selected to compact the followed three user data.
    //After "255", all is digits, numeric compaction is more effective,
    //so NumericCompactionMode will be selected to compact left user data.
    GcBarCode gcBarCode1 = new GcBarCode();
    gcBarCode1.Type = BarCode.ValueType.BarType.MicroPDF417;
    gcBarCode1.MicroPDF417.CompactionMode = BarCode.Options.MicroPDF417.SymbolCompactionMode.Auto;
    gcBarCode1.ValueBinary = new Byte[]
    {67,68,69,255,255,255,55,56,57,55,56,57,55,56,57,55,56,57,55,56,57,55,56,57,55,56,57,55,56,57,
        55,56,57,55,56,57,55,56,57,55,56,57,55,56,57,55,56,57,55,56,57};
    gcBarCode1.Location = new Point(0, 150);

    //gcBarCode2: CompactionMode is TextCompactionMode.
    //TextCompactionMode and ByteCompactionMode are both valid for compact the user data.
    //But TextCompactionMode uses less codewords.
    GcBarCode gcBarCode2 = new GcBarCode();
    gcBarCode2.Type = BarCode.ValueType.BarType.MicroPDF417;
    gcBarCode2.MicroPDF417.CompactionMode = BarCode.Options.MicroPDF417.SymbolCompactionMode.TextCompactionMode;
    gcBarCode2.Value = "Grape of Xi'an China";
    gcBarCode2.Location = new Point(150, 150);
    
    //gcBarCode3: CompactionMode is ByteCompactionMode.
    GcBarCode gcBarCode3 = new GcBarCode();
    gcBarCode3.Type = BarCode.ValueType.BarType.MicroPDF417;
    gcBarCode3.MicroPDF417.CompactionMode = BarCode.Options.MicroPDF417.SymbolCompactionMode.ByteCompactionMode;
    gcBarCode3.ValueBinary = new Byte[] { 67, 35, 220, 255, 46, 78, 101, 116 };
    gcBarCode3.Location = new Point(300, 150);

    //gcBarCode4: CompactionMode is NumericCompactionMode.
    GcBarCode gcBarCode4 = new GcBarCode();
    gcBarCode4.Type = BarCode.ValueType.BarType.MicroPDF417;
    gcBarCode4.MicroPDF417.CompactionMode = BarCode.Options.MicroPDF417.SymbolCompactionMode.NumericCompactionMode;
    gcBarCode4.Value = "198508310123456789";
    gcBarCode4.Location = new Point(450, 150);

    //gcBarCode5: Version is Version1X11.
    GcBarCode gcBarCode5 = new GcBarCode();
    gcBarCode5.Type = BarCode.ValueType.BarType.MicroPDF417;
    gcBarCode5.MicroPDF417.Version = BarCode.Options.MicroPDF417.SymbolVersion.Version1X11;
    gcBarCode5.Value = "Grape";
    gcBarCode5.Location = new Point(0, 300);

    //gcBarCode6: Show Structured Append, including SegmentCount, SegmentIndex and FiledID.
    GcBarCode gcBarCode6 = new GcBarCode();
    gcBarCode6.Type = BarCode.ValueType.BarType.MicroPDF417;
    gcBarCode6.MicroPDF417.SegmentCount = 4;
    gcBarCode6.MicroPDF417.SegmentIndex = 1;
    gcBarCode6.MicroPDF417.FileID = 273;
    gcBarCode6.Value = "Xi'an GrapceCity.inc Power Tools GcBarCode.";
    gcBarCode6.Location = new Point(150, 300);

    // Add the GcBarCode controls to the form
    this.Controls.Add(gcBarCode1);
    this.Controls.Add(gcBarCode2);
    this.Controls.Add(gcBarCode3);
    this.Controls.Add(gcBarCode4);
    this.Controls.Add(gcBarCode5);
    this.Controls.Add(gcBarCode6);
}
Private Sub CreateMicroPDF417BarCode()
    ' Create 6 GcBarCode controls, the first to fourth GcBarcodes show every kind of CompactionMode,
    ' the fifth GcBarCode shows version property,
    ' the sixth GcBarCode shows Structured Append information.

    'gcBarCode1: CompactionMode is Auto.
    'The first three byte data "67,68,69", could be compacted by Text and Byte Compaction mode,
    'but TextCompactionMode is more effective, so TextCompactionMode have been selected.
    'Then, the follow three byte data, only ByteCompactionMode is valid for "byte(255)".
    'So ByteCompactionMode will be selected to compact the followed three user data.
    'After "255", all is digits, numeric compaction is more effective,
    'so NumericCompactionMode will be selected to compact left user data.
    Dim gcBarCode1 As New GcBarCode()
    gcBarCode1.Type = BarCode.ValueType.BarType.MicroPDF417
    gcBarCode1.MicroPDF417.CompactionMode = BarCode.Options.MicroPDF417.SymbolCompactionMode.Auto
    gcBarCode1.ValueBinary = New [Byte]() {67, 68, 69, 255, 255, 255, _
        55, 56, 57, 55, 56, 57, _
        55, 56, 57, 55, 56, 57, _
        55, 56, 57, 55, 56, 57, _
        55, 56, 57, 55, 56, 57, _
        55, 56, 57, 55, 56, 57, _
        55, 56, 57, 55, 56, 57, _
        55, 56, 57, 55, 56, 57, _
        55, 56, 57}
    gcBarCode1.Location = New Point(0, 150)

    'gcBarCode2: CompactionMode is TextCompactionMode.
    'TextCompactionMode and ByteCompactionMode are both valid for compact the user data.
    'But TextCompactionMode uses less codewords.
    Dim gcBarCode2 As New GcBarCode()
    gcBarCode2.Type = BarCode.ValueType.BarType.MicroPDF417
    gcBarCode2.MicroPDF417.CompactionMode = BarCode.Options.MicroPDF417.SymbolCompactionMode.TextCompactionMode
    gcBarCode2.Value = "Grape of Xi'an China"
    gcBarCode2.Location = New Point(150, 150)

    'gcBarCode3: CompactionMode is ByteCompactionMode.
    Dim gcBarCode3 As New GcBarCode()
    gcBarCode3.Type = BarCode.ValueType.BarType.MicroPDF417
    gcBarCode3.MicroPDF417.CompactionMode = BarCode.Options.MicroPDF417.SymbolCompactionMode.ByteCompactionMode
    gcBarCode3.ValueBinary = New [Byte]() {67, 35, 220, 255, 46, 78, _
        101, 116}
    gcBarCode3.Location = New Point(300, 150)

    'gcBarCode4: CompactionMode is NumericCompactionMode.
    Dim gcBarCode4 As New GcBarCode()
    gcBarCode4.Type = BarCode.ValueType.BarType.MicroPDF417
    gcBarCode4.MicroPDF417.CompactionMode = BarCode.Options.MicroPDF417.SymbolCompactionMode.NumericCompactionMode
    gcBarCode4.Value = "198508310123456789"
    gcBarCode4.Location = New Point(450, 150)

    'gcBarCode5: Version is Version1X11.
    Dim gcBarCode5 As New GcBarCode()
    gcBarCode5.Type = BarCode.ValueType.BarType.MicroPDF417
    gcBarCode5.MicroPDF417.Version = BarCode.Options.MicroPDF417.SymbolVersion.Version1X11
    gcBarCode5.Value = "Grape"
    gcBarCode5.Location = New Point(0, 300)

    'gcBarCode6: Show Structured Append, including SegmentCount, SegmentIndex and FiledID.
    Dim gcBarCode6 As New GcBarCode()
    gcBarCode6.Type = BarCode.ValueType.BarType.MicroPDF417
    gcBarCode6.MicroPDF417.SegmentCount = 4
    gcBarCode6.MicroPDF417.SegmentIndex = 1
    gcBarCode6.MicroPDF417.FileID = 273
    gcBarCode6.Value = "Xi'an GrapceCity.inc Power Tools GcBarCode."
    gcBarCode6.Location = New Point(150, 300)

    ' Add the GcBarCode controls to the form
    Me.Controls.Add(gcBarCode1)
    Me.Controls.Add(gcBarCode2)
    Me.Controls.Add(gcBarCode3)
    Me.Controls.Add(gcBarCode4)
    Me.Controls.Add(gcBarCode5)
    Me.Controls.Add(gcBarCode6)
End Sub
継承階層

System.Object
      GrapeCity.Win.BarCode.Options.MicroPDF417

プラットフォーム

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

参照

MicroPDF417 メンバ
GrapeCity.Win.BarCode.Options 名前空間

Send Feedback