public string BarCode(BCType type, string data) { throw new NotImplementedException(); }
public BooleanContext(BCType ctype) { this.ContextType = ctype; }
/// <summary> /// The constructor is called when the attribute is set. /// </summary> /// <param name="bcTypes"></param> public BCTypeAttribute(BCType[] bcTypes) { m_bCTypes = bcTypes; }
/// <summary>GS k: returns printercommand for printing barcode</summary> public string BarCode(BCType type, string data) { // ESC 'k' m n d1..dn char[] esc_code = { _GS_Sign, (char)'k', (char)0, (char)0 }; int bcType = 0; //65..73 = m int n = data.Length; // code length = n //char[] bcData; string bcData = data; switch (type) { case BCType.UPCA: //legth: 11..12; Characters: '0'..'9' if (n < 11 || n > 12) { return(null); } bcType = 65; // bcData = new char[n]; // bcData = data; break; case BCType.UPCE: if (n < 11 || n > 12) { return(null); } bcType = 66; break; case BCType.EAN13: if (n < 12 || n > 13) { return(null); } bcType = 67; break; case BCType.EAN8: if (n < 7 || n > 8) { return(null); } bcType = 68; break; case BCType.CODE39: //legth: 1..255; Characters: '0'..'9', 'A".."Z", " $%+-./", "*"=start/stop char, if (n < 1 || n > 255) { return(null); } bcType = 69; break; case BCType.ITF: if (n < 1 || n > 255 || n % 2 != 0) //even, "0".."9" { return(null); } bcType = 70; break; case BCType.CODABAR: //"0".."9", "A".."Z", "$+-./:" if (n < 1 || n > 255) { return(null); } bcType = 71; break; case BCType.CODE93: //0x0h..0x7Fh if (n < 1 || n > 255) { return(null); } bcType = 72; break; case BCType.CODE128: //0x0h..0x7Fh if (n < 2 || n > 255) { return(null); } bcType = 73; break; } if (bcType == 0) { return(null); } esc_code[2] = (char)bcType; esc_code[3] = (char)n; return(new String(esc_code) + bcData); }
public int[,] updateBC(int[,] cells, int TFSize, BCType thisBCType) { switch (thisBCType) { case BCType.BCZero: break; case BCType.BCOne: cells = upDateBCOnes(cells, TFSize); break; case BCType.BCFree: break; case BCType.BCWrapTop: break; case BCType.BCWrapRight: cells = updateBCWrapRight(cells, TFSize); break; case BCType.BCWrapBoth: break; default: break; } return cells; }