BarcodeLib/Symbologies/Code128.cs
(开头部分) 23KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace BarcodeLib
{
class Code128 : BarcodeCommon, IBarcode
{
public enum TYPES:int { DYNAMIC, A, B, C };
private DataTable C128_Code = new DataTable("C128");
private List<string> _FormattedData = new List<string>();
private List<string> _EncodedData = new List<string>();
private DataRow StartCharacter = null;
private TYPES type = TYPES.DYNAMIC;
/// <summary>
/// Encodes data in Code128 format.
/// </summary>
/// <param name="input">Data to encode.</param>
public Code128(string input)
{
Raw_Data = input;
}//Code128
/// <summary>
/// Encodes data in Code128 format.
/// </summary>
/// <param name="input">Data to encode.</param>
/// <param name="type">Type of encoding to lock to. (Code 128A, Code 128B, Code 128C)</param>
public Code128(string input, TYPES type)
{
this.type = type;
Raw_Data = input;
}//Code128
private string Encode_Code128()
{
//initialize datastructure to hold encoding information
this.init_Code128();
return GetEncoding();
}//Encode_Code128
private void init_Code128()
{
//set the table to case sensitive since there are upper and lower case values
this.C128_Code.CaseSensitive = true;
//set up columns
this.C128_Code.Columns.Add("Value", typeof(string));
this.C128_Code.Columns.Add("A", typeof(string));
this.C128_Code.Columns.Add("B", typeof(string));
this.C128_Code.Columns.Add("C", typeof(string));
this.C128_Code.Columns.Add("Encoding", typeof(string));
//populate data
this.C128_Code.Rows.Add(new object[] { "0", " ", " ", "00", "11011001100" });
this.C128_Code.Rows.Add(new object[] { "1", "!", "!", "01", "11001101100" });
this.C128_Code.Rows.Add(new object[] { "2", "\"", "\"", "02", "11001100110" });
this.C128_Code.Rows.Add(new object[] { "3", "#", "#", "03", "10010011000" });
后面还有 378 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。