Esempio n. 1
0
        public int DisplayLcd(string displayStr)
        {
            E7Lib.fw_lcd_dispclear(iDevice);
            int result = E7Lib.fw_lcd_dispstr(iDevice, displayStr);

            return(result);
        }
Esempio n. 2
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);
        }
Esempio n. 3
0
        public string closeDevice()
        {
            if (iDevice <= 0)
            {
                return("无当前设备");
            }
            try
            {
                //关闭LCD
                setLCDBright(false);
                //清空显示文本
                E7Lib.fw_lcd_dispclear(iDevice);
                //关闭设备
                E7Lib.fw_exit(iDevice);

                return("OK");
            } catch (Exception ex)
            {
                return(ex.Message);
            }
        }
Esempio n. 4
0
 public void showString2LCD(string strLCD)
 {
     strLCD.PadLeft(36, ' ');//空格补齐,不然会有乱码
     E7Lib.fw_lcd_dispclear(iDevice);
     E7Lib.fw_lcd_dispstr(iDevice, strLCD);
 }
Esempio n. 5
0
 public void clearLCDShow()
 {
     E7Lib.fw_lcd_dispclear(iDevice);
 }
Esempio n. 6
0
 public void initLCDShow()
 {
     E7Lib.fw_lcd_dispclear(iDevice);
     showString2LCD("天天100");
 }