我正在尝试在极点显示中滚动文字。我的杆显示模型是 CD7220 但我收到一条PosControlException消息"无法设置属性MarqueeType。"
这是我使用的代码
LineDisplay lineDisplay;
PosExplorer explorer;
try
{
explorer = new PosExplorer();
DeviceCollection devColl = explorer.GetDevices(DeviceType.LineDisplay);
if (devColl == null || devColl.Count <= 0)
{
Console.WriteLine("Device not found");
return;
}
DeviceInfo device = explorer.GetDevice("LineDisplay", "CD7220");
lineDisplay = (LineDisplay)explorer.CreateInstance(device);
lineDisplay.Open();
lineDisplay.Claim(1000);
lineDisplay.DeviceEnabled = true;
string s = "Welcome to ovelco food city!";
int wWindth = s.Length + 20;
lineDisplay.CreateWindow(0, 0, 1, 20, 1, wWindth);
lineDisplay.DisplayText(s);
lineDisplay.MarqueeType = DisplayMarqueeType.Left;
lineDisplay.MarqueeUnitWait = 200;
lineDisplay.MarqueeFormat = DisplayMarqueeFormat.Walk;
Console.ReadKey();
lineDisplay.ClearText();
lineDisplay.Release();
lineDisplay.Close();
}
catch (Exception e)
{
// MessageBox.Show(e.Message);
Console.WriteLine(e.Message);
}
如何解决此问题并在极点显示中滚动文本完美?
提前致谢。
答案 0 :(得分:0)
根据Unified POS文档,您将收到错误,将MarqueeType属性设置为&#34; left&#34;除非CapHMarquee属性为true,(并且您的窗口宽度大于您的列,它是)。写一个测试来显示CapHMarquee的值;也许你的特定设备不支持它?