POS显示文本滚动 [英] POS Display Text Scrolling

查看:74
本文介绍了POS显示文本滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码是为POS人机显示的。我想滚动显示中的文本。我尝试过Marquee和Scroll属性。但它不起作用。我发现Marquee不支持该设备。但我必须这样做。我听说使用定时器甚至可以使用不支持Marquee的设备。谁可以帮我这个事?



提前致谢。



使用Microsoft.PointOfService;

< br $>
private const string WelcomeMessage =Welcome to Restaurant\\ n;

private PosExplorer posExplorer;

private LineDisplay posLineDisplay;

私有DeviceInfo posLineDisplaydevice;



public void LineDisplayUnit()

{

这个。 posExplorer = new PosExplorer(this);

this.posLineDisplaydevice = this.posExplorer.GetDevice(LineDisplay,POSIFLEX_LINEDISPLAY);



尝试

{

this.posLineDisplay =(LineDisplay)this.posExplorer.CreateInstance(this.posLineDisplaydevice);

this.posLineDisplay.Open ();

this.posLineDisplay.Claim(1000);

this.posLineDisplay.DeviceEnabled = true;

this.posLineDisplay.DisplayText( WelcomeMessage);

this.posLineDisplay.DisplayTextAt(2,1,this.LeftAlign(Amount,7)+ this.Rig htAlign(this.GrandTotalAmount.ToString(0.00),12));

this.posLineDisplay.Close();



}

catch(例外)

{



}

}

The below code is written for the POS Display Unit. I want to scroll the text in the display. I have tried the Marquee and Scroll properties. But It's not working. I've found that device not supported for Marquee. But I must do it. I heard that using timers it can be possible even the device not supporting Marquee. Can anyone help me on this?

Thanks in advance.

using Microsoft.PointOfService;

private const string WelcomeMessage = "Welcome to Restaurant\r\n";
private PosExplorer posExplorer;
private LineDisplay posLineDisplay;
private DeviceInfo posLineDisplaydevice;

public void LineDisplayUnit()
{
this.posExplorer = new PosExplorer(this);
this.posLineDisplaydevice = this.posExplorer.GetDevice("LineDisplay", "POSIFLEX_LINEDISPLAY");

try
{
this.posLineDisplay = (LineDisplay)this.posExplorer.CreateInstance(this.posLineDisplaydevice);
this.posLineDisplay.Open();
this.posLineDisplay.Claim(1000);
this.posLineDisplay.DeviceEnabled = true;
this.posLineDisplay.DisplayText(WelcomeMessage);
this.posLineDisplay.DisplayTextAt(2, 1, this.LeftAlign("Amount", 7) + this.RightAlign(this.GrandTotalAmount.ToString("0.00"), 12));
this.posLineDisplay.Close();

}
catch (Exception)
{

}
}

推荐答案

如果你想使用计时器

将一个计时器控件放在

格式中然后

每当你想移动文本时。

你可以启用计时器(timer1.Enabled = true;)

根据你的用途设置时间间隔属性更好地保持它1000

然后使用计时器的tick事件来改变显示文本的位置/坐标/位置,

如果你不想移动文本你可以禁用计时器这样tick事件不会被解雇
If you want to use timer
put one timer control in the form
then
whenever you want to move the text.
you can enable timer (timer1.Enabled=true;)
set time interval property according to your use better keep it as 1000
then use timer's tick event to change display text's position/coordinates/Location,
if you dont want to move the text you can disable the timer so tick event will not be fired


这篇关于POS显示文本滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆