12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Bowin.Common.BarCode
- {
- /// <summary>
- /// 条码类型基类
- /// </summary>
- public abstract class BarCodeBase
- {
- protected string rawData; //原始数据
- /// <summary>
- /// 获取编码原始数据
- /// </summary>
- public string RawData
- {
- get
- {
- return rawData;
- }
- }
- /// <summary>
- /// 获取条码值
- /// </summary>
- public string EncodeValue
- {
- get
- {
- try
- {
- return EncodeCode();
- }
- catch (Exception)
- {
- throw;
- }
- }
- }
- /// <summary>
- /// 进行条码编码
- /// </summary>
- /// <returns>返回条码值</returns>
- public abstract string EncodeCode();
- /// <summary>
- /// 初始化条码对照字典
- /// </summary>
- protected virtual void InitCode()
- {
- }
- }
- }
|