Esempio n. 1
0
        public bool ColorSetBackground(Byte[] colorBitmap)
        {
            if (colorBitmap.Length != ColorWidth * ColorHeight)
            {
                throw new LogiLcdException("Bitmap size does not match expected size");
            }

            return(LcdPinvoke.LogiLcdColorSetBackground(colorBitmap));
        }
Esempio n. 2
0
        public bool MonoSetBackground(Byte[] monoBitmap)
        {
            if (monoBitmap.Length != MonoWidth * MonoHeight)
            {
                throw new LogiLcdException("Bitmap size does not match expected size");
            }

            return(LcdPinvoke.LogiLcdMonoSetBackground(monoBitmap));
        }
Esempio n. 3
0
        public void Dispose()
        {
            if (disposed)
            {
                return;
            }

            LcdPinvoke.LogiLcdShutdown();
            hasInstance = false;

            disposed = true;
        }
Esempio n. 4
0
        public LogiLcd(string friendlyName, LcdType lcdtype)
        {
            if (hasInstance)
            {
                throw new LogiLcdException("There can only be one instance of this class at a time!");
            }

            if (!LcdPinvoke.LogiLcdInit(friendlyName, (int)lcdtype))
            {
                throw new LogiLcdException("LogiLcdInit failed");
            }

            hasInstance = true;
        }
Esempio n. 5
0
 public bool ColorSetText(int lineNumber, string text, byte red = 255, byte green = 255, byte blue = 255)
 {
     return(LcdPinvoke.LogiLcdColorSetText(lineNumber, text, red, green, blue));
 }
Esempio n. 6
0
 public bool ColorSetTitle(string text, byte red = 255, byte green = 255, byte blue = 255)
 {
     return(LcdPinvoke.LogiLcdColorSetTitle(text, red, green, blue));
 }
Esempio n. 7
0
 public bool MonoSetText(int lineNumber, string text)
 {
     return(LcdPinvoke.LogiLcdMonoSetText(lineNumber, text));
 }
Esempio n. 8
0
 public void Update()
 {
     LcdPinvoke.LogiLcdUpdate();
 }
Esempio n. 9
0
 public bool IsButtonPressed(LcdButton button)
 {
     return(LcdPinvoke.LogiLcdIsButtonPressed((int)button));
 }
Esempio n. 10
0
 public bool IsConnected(LcdType lcdtype)
 {
     return(LcdPinvoke.LogiLcdIsConnected((int)lcdtype));
 }