private void OneBarProps(char code, out float width, out BarLineType lt) { switch (code) { case '0': width = modules[0]; lt = BarLineType.White; break; case '1': width = modules[1]; lt = BarLineType.White; break; case '2': width = modules[2]; lt = BarLineType.White; break; case '3': width = modules[3]; lt = BarLineType.White; break; case '5': width = modules[0]; lt = BarLineType.Black; break; case '6': width = modules[1]; lt = BarLineType.Black; break; case '7': width = modules[2]; lt = BarLineType.Black; break; case '8': width = modules[3]; lt = BarLineType.Black; break; case '9': width = modules[0]; lt = BarLineType.BlackHalf; break; case 'A': width = modules[0]; lt = BarLineType.BlackLong; break; case 'B': width = modules[1]; lt = BarLineType.BlackLong; break; case 'C': width = modules[2]; lt = BarLineType.BlackLong; break; case 'D': width = modules[3]; lt = BarLineType.BlackLong; break; // E,F,G for Intelligent Mail Barcode case 'E': width = modules[1]; lt = BarLineType.BlackTracker; break; case 'F': width = modules[1]; lt = BarLineType.BlackAscender; break; case 'G': width = modules[1]; lt = BarLineType.BlackDescender; break; default: // something went wrong :-( // mistyped pattern table throw new Exception("Incorrect barcode pattern code: " + code); } }
private void OneBarProps(char code, out float width, out BarLineType lt) { switch (code) { case '0': width = FModules[0]; lt = BarLineType.White; break; case '1': width = FModules[1]; lt = BarLineType.White; break; case '2': width = FModules[2]; lt = BarLineType.White; break; case '3': width = FModules[3]; lt = BarLineType.White; break; case '5': width = FModules[0]; lt = BarLineType.Black; break; case '6': width = FModules[1]; lt = BarLineType.Black; break; case '7': width = FModules[2]; lt = BarLineType.Black; break; case '8': width = FModules[3]; lt = BarLineType.Black; break; case '9': width = FModules[0]; lt = BarLineType.BlackHalf; break; case 'A': width = FModules[0]; lt = BarLineType.BlackLong; break; case 'B': width = FModules[1]; lt = BarLineType.BlackLong; break; case 'C': width = FModules[2]; lt = BarLineType.BlackLong; break; case 'D': width = FModules[3]; lt = BarLineType.BlackLong; break; default: // something went wrong :-( // mistyped pattern table throw new Exception("internal Error"); } }