public Code93Ext() { this.InitializeComponent(); barCodeTip.Text = "All 128 ASCII characters"; Code93ExtendedSetting code93Ex = new Code93ExtendedSetting(); code93Ex.BarHeight = 120; barcode.SymbologySettings = code93Ex; barcodeTxt.Text = "SYNCFUSION"; }
private void barcodeTypeList_SelectedIndexChanged(object sender, EventArgs e) { barCodeTip.Text = allowedTexts[barcodeTypeList.SelectedIndex]; barcodeControl.Symbology = (BarcodeSymbolType)Enum.Parse(typeof(BarcodeSymbolType), barcodeTypeList.SelectedItem.ToString(), true); switch (barcodeControl.Symbology) { case BarcodeSymbolType.Codabar: CodabarSetting codabar = new CodabarSetting(); codabar.BarHeight = 130; barcodeControl.SymbologySettings = codabar; textToEncode.Text = "01234567"; barcodeControl.DisplayText = true; break; case BarcodeSymbolType.Code11: Code11Setting code11 = new Code11Setting(); code11.BarHeight = 130; barcodeControl.SymbologySettings = code11; textToEncode.Text = "01234567"; barcodeControl.DisplayText = true; break; case BarcodeSymbolType.Code32: Code32Setting code32 = new Code32Setting(); code32.BarHeight = 130; barcodeControl.SymbologySettings = code32; textToEncode.Text = "01234567"; barcodeControl.DisplayText = true; break; case BarcodeSymbolType.Code128C: Code128CSetting code128C = new Code128CSetting(); code128C.BarHeight = 130; barcodeControl.SymbologySettings = code128C; textToEncode.Text = "01234567"; barcodeControl.DisplayText = true; break; case BarcodeSymbolType.QRBarcode: { QRBarcodeSetting setting = new QRBarcodeSetting(); setting.XDimension = 1; barcodeControl.SymbologySettings = setting; textToEncode.Text = @"HTTP://WWW.SYNCFUSION.COM"; barcodeControl.DisplayText = false; } break; case BarcodeSymbolType.DataMatrix: { DataMatrixSetting setting = new DataMatrixSetting(); setting.XDimension = 7; barcodeControl.SymbologySettings = setting; textToEncode.Text = "SYNCFUSION"; barcodeControl.DisplayText = false; } break; case BarcodeSymbolType.Code128B: Code128BSetting code128B = new Code128BSetting(); code128B.BarHeight = 130; barcodeControl.SymbologySettings = code128B; textToEncode.Text = "SYNCFUSION"; barcodeControl.DisplayText = true; break; case BarcodeSymbolType.Code128A: Code128ASetting code128A = new Code128ASetting(); code128A.BarHeight = 130; barcodeControl.SymbologySettings = code128A; textToEncode.Text = "SYNCFUSION"; barcodeControl.DisplayText = true; break; case BarcodeSymbolType.Code39: Code39Setting code39 = new Code39Setting(); code39.BarHeight = 130; barcodeControl.SymbologySettings = code39; textToEncode.Text = "SYNCFUSION"; barcodeControl.DisplayText = true; break; case BarcodeSymbolType.Code39Extended: Code39ExtendedSetting code39Ex = new Code39ExtendedSetting(); code39Ex.BarHeight = 130; barcodeControl.SymbologySettings = code39Ex; textToEncode.Text = "SYNCFUSION"; barcodeControl.DisplayText = true; break; case BarcodeSymbolType.Code93: Code93Setting code93 = new Code93Setting(); code93.BarHeight = 130; barcodeControl.SymbologySettings = code93; textToEncode.Text = "SYNCFUSION"; barcodeControl.DisplayText = true; break; case BarcodeSymbolType.Code93Extended: Code93ExtendedSetting code93Ex = new Code93ExtendedSetting(); code93Ex.BarHeight = 130; barcodeControl.SymbologySettings = code93Ex; textToEncode.Text = "SYNCFUSION"; barcodeControl.DisplayText = true; break; case BarcodeSymbolType.UpcBarcode: UpcBarcodeSetting codeUpc = new UpcBarcodeSetting(); codeUpc.BarHeight = 130; textToEncode.Text = "01234567890"; barcodeControl.DisplayText = true; break; default: textToEncode.Text = "SYNCFUSION"; break; } ValidateText(); barcodeControl.Text = textToEncode.Text; }