using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; namespace POSV { /// /// 龙飞C2、C3 PC秤动态库 /// public class LF_ACS_C3 { #region 称重相关 /// /// 清零 /// [DllImport("LF_ACS_C2.dll")] public extern static int send_zero(); /// /// 清皮 /// [DllImport("LF_ACS_C2.dll")] public extern static int clear_tare(StringBuilder buf); /// /// 设置皮重 /// [DllImport("LF_ACS_C2.dll")] public extern static int send_tare(StringBuilder buf); /// /// 读取重量 /// [DllImport("LF_ACS_C2.dll",CharSet = CharSet.Ansi)] public extern static int read_standard(StringBuilder buf); #endregion #region 打印相关 /// /// 初始化打印机 /// [DllImport("LF_ACS_C2.dll")] public extern static int OpenPrinter(); /// /// 格式化待打印字符串 /// [DllImport("LF_ACS_C2.dll")] public extern static int PrintText(StringBuilder str, int fontSize); /// /// 开始打印 /// [DllImport("LF_ACS_C2.dll")] public extern static int BeginPrint(); /// /// 关闭打印机 /// [DllImport("LF_ACS_C2.dll")] public extern static int ClosePrinterEx(); #endregion /// /// 开钱箱 /// [DllImport("LF_ACS_C2.dll")] public extern static int OpenCashDrawerEx(); } }