All*_*hua -3 c# list thermal-printer crystal-reports slidingdrawer
有没有人知道如何创建一个C#应用程序,可以打开连接到计算机的抽屉并同时打印收据?
抽屉名称:PCD-354电子现金抽屉
现金收据打印机:Epson TM-T88v
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.PointOfService;
namespace POS
{
public class CashDrawerClass
{
CashDrawer myCashDrawer;
PosExplorer explorer;
public CashDrawerClass()
{
explorer = new PosExplorer(this);
DeviceInfo ObjDevicesInfo = explorer.GetDevice("CashDrawer");
myCashDrawer = explorer.CreateInstance(ObjDevicesInfo);
}
public void OpenCashDrawer()
{
myCashDrawer.Open();
myCashDrawer.Claim(1000);
myCashDrawer.DeviceEnabled = true;
myCashDrawer.OpenDrawer();
myCashDrawer.DeviceEnabled = false;
myCashDrawer.Release();
myCashDrawer.Close();
}
}
}
Run Code Online (Sandbox Code Playgroud)
试试看.也许它会帮助你对事情有所了解
归档时间: |
|
查看次数: |
11416 次 |
最近记录: |