You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace POSV
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 龙飞C2、C3 PC秤动态库
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class LF_ACS_C3
|
|
|
|
|
{
|
|
|
|
|
#region 称重相关
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 清零
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DllImport("LF_ACS_C2.dll")]
|
|
|
|
|
public extern static int send_zero();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 清皮
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DllImport("LF_ACS_C2.dll")]
|
|
|
|
|
public extern static int clear_tare(StringBuilder buf);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设置皮重
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DllImport("LF_ACS_C2.dll")]
|
|
|
|
|
public extern static int send_tare(StringBuilder buf);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 读取重量
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DllImport("LF_ACS_C2.dll",CharSet = CharSet.Ansi)]
|
|
|
|
|
public extern static int read_standard(StringBuilder buf);
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 打印相关
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 初始化打印机
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DllImport("LF_ACS_C2.dll")]
|
|
|
|
|
public extern static int OpenPrinter();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 格式化待打印字符串
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DllImport("LF_ACS_C2.dll")]
|
|
|
|
|
public extern static int PrintText(StringBuilder str, int fontSize);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 开始打印
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DllImport("LF_ACS_C2.dll")]
|
|
|
|
|
public extern static int BeginPrint();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 关闭打印机
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DllImport("LF_ACS_C2.dll")]
|
|
|
|
|
public extern static int ClosePrinterEx();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 开钱箱
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DllImport("LF_ACS_C2.dll")]
|
|
|
|
|
public extern static int OpenCashDrawerEx();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|