Exemplo n.º 1
0
        public void showStringLCD2Lines(string strLCDLine1, string strLCDLine2)
        {
            E7Lib.fw_lcd_dispclear(iDevice);

            if (iDevice <= 0)
            {
                return;
            }
            StringBuilder sb = new StringBuilder(strLCDLine1);

            while (sb.Length < 18)
            {
                sb.Append(" ");
            }
            sb.Append(strLCDLine2);
            while (sb.Length < 36)
            {
                sb.Append(" ");
            }

            E7Lib.fw_lcd_dispstr(iDevice, sb.ToString());

            //E7Lib.fw_lcd_dispstr_ex(iDevice, strLCDLine1.PadRight(36,' '), 1, 0, strLCDLine1.Length, 1);
            //E7Lib.fw_lcd_dispstr_ex(iDevice, strLCDLine2.PadRight(36,' '), 2, 0, strLCDLine2.Length, 1);
        }
Exemplo n.º 2
0
        public int DisplayLcd(string displayStr)
        {
            E7Lib.fw_lcd_dispclear(iDevice);
            int result = E7Lib.fw_lcd_dispstr(iDevice, displayStr);

            return(result);
        }
Exemplo n.º 3
0
 public void showString2LCD(string strLCD)
 {
     strLCD.PadLeft(36, ' ');//空格补齐,不然会有乱码
     E7Lib.fw_lcd_dispclear(iDevice);
     E7Lib.fw_lcd_dispstr(iDevice, strLCD);
 }