本文介绍了为开/关抽屉,并在同一时间打印收据的C#代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

是否有任何身体知道如何创建一个C#应用程序,可以打开在同一时间连接到计算机并打印回执抽屉



抽屉名称:PCD-354电子钱箱



现金收据打印机:爱普生TM-T88V


解决方案

 使用系统; 
使用System.Collections.Generic;
使用System.Text;
使用Microsoft.PointOfService;

命名空间POS
{
公共类CashDrawerClass
{
CashDrawer myCashDrawer;
PosExplorer探险;

公共CashDrawerClass()
{
=探险家新PosExplorer(本);
DeviceInfo ObjDevicesInfo = explorer.GetDevice(CashDrawer);
myCashDrawer = explorer.CreateInstance(ObjDevicesInfo);
}

公共无效OpenCashDrawer()
{
myCashDrawer.Open();
myCashDrawer.Claim(1000);
myCashDrawer.DeviceEnabled = TRUE;
myCashDrawer.OpenDrawer();
myCashDrawer.DeviceEnabled = FALSE;
myCashDrawer.Release();
myCashDrawer.Close();
}
}
}



尝试。也许它会帮助你对事情的概况。


Does any body know how to create a C# application that can open a drawer connected to the computer and print receipt at same time?

Drawer Name: PCD-354 Electronic Cash Drawer

Cash receipt printer: 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();
  }
}
}

try that. maybe it will help you have an overview on things

这篇关于为开/关抽屉,并在同一时间打印收据的C#代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 19:46