public Form1() { InitializeComponent(); myExplorer = new PosExplorer(this); device1 = myExplorer.GetDevice("LineDisplay", "POSIFLEX_LINEDISPLAY"); try { myDisplay = (LineDisplay)myExplorer.CreateInstance(device1); myDisplay.Open(); myDisplay.Claim(1000); myDisplay.DeviceEnabled = true; myDisplay.DisplayText("Welcome to the Restaurant"); myDisplay.MarqueeType = DisplayMarqueeType.Left; myDisplay.MarqueeFormat = DisplayMarqueeFormat.Walk; ////myDisplay.MarqueeType = DisplayMarqueeType.Left; ////myDisplay.MarqueeFormat = DisplayMarqueeFormat.Walk; statusLabel.Text = "Line Display Ready"; myDisplay.Close(); } catch { statusLabel.Text = "Line Display Not Found!"; } }
private static string GetDisplayStringSplitByIndex(string displayString, int index) { return Form1.GetPaddedStringForDisplay(displayString.Substring(index) + displayString.Substring(0, index)); } private static string GetPaddedStringForDisplay(string displayString) { if (displayString.Length > Form1.displayLineWidth) { return displayString.Substring(0, Form1.displayLineWidth); } else { return displayString.PadRight(Form1.displayLineWidth); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
Randor