Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of CodeDataMatrix.
 /// </summary>
 public CodeDataMatrix(string code, DataMatrixEncoding dmEncoding, int rows, int columns, XSize size)
     : this(code, CreateEncoding(dmEncoding, code.Length), rows, columns, 0, size)
 {}
Esempio n. 2
0
 static string CreateEncoding(DataMatrixEncoding dmEncoding, int length)
 {
     string tempencoding = "";
     switch (dmEncoding)
     {
         case DataMatrixEncoding.Ascii:
             tempencoding = new string('a', length);
             break;
         case DataMatrixEncoding.C40:
             tempencoding = new string('c', length);
             break;
         case DataMatrixEncoding.Text:
             tempencoding = new string('t', length);
             break;
         case DataMatrixEncoding.X12:
             tempencoding = new string('x', length);
             break;
         case DataMatrixEncoding.EDIFACT:
             tempencoding = new string('e', length);
             break;
         case DataMatrixEncoding.Base256:
             tempencoding = new string('b', length);
             break;
     }
     return tempencoding;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of CodeDataMatrix.
 /// </summary>
 public CodeDataMatrix(string code, DataMatrixEncoding dmEncoding, int length, XSize size)
     : this(code, CreateEncoding(dmEncoding, code.Length), length, length, 0, size)
 {}
Esempio n. 4
0
 /// <summary>
 /// Sets the encoding of the DataMatrix.
 /// </summary>
 public void SetEncoding(DataMatrixEncoding dmEncoding)
 {
     Encoding = CreateEncoding(dmEncoding, Text.Length);
 }