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.
63 lines
2.0 KiB
C#
63 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
|
|
namespace POSV
|
|
{
|
|
/// <summary>
|
|
/// 顶尖ps1x动态库
|
|
/// </summary>
|
|
public class PS1Dll
|
|
{
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static void CreateComm(); //create object
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static void destoryComm(); //destory object
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static void closeport(); //close port
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static Boolean openport(string iCom, int iBaud); //open port
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static string GetWeight(); //get weight
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static string GetAllValue(); //get all value
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static Boolean Peelskin(); //Peel Skin
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static Boolean ClearZero(); //clear zero
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static Boolean SendPrice(double price); //set price
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static string GetKeyAndWeight(); //get weight
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static string GetTotalValue(); //get weight
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static void log(Tlog value); //log
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static Boolean DownLoadPlu(string fileName); //DownLoad Plu
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static Boolean UpLoadPlu(string fileName); //Upload Plu
|
|
|
|
[DllImport("PS1DLL.dll")]
|
|
public extern static void IniOnShowWeight(TOnShowWeight value);
|
|
}
|
|
|
|
public delegate void Tlog(string value);
|
|
public delegate void TOnShowWeight(int stable, int keyvalue, double weight, string sunit, string sflag);
|
|
}
|