Пример #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));
        }
Пример #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));
        }
Пример #3
0
        public void Dispose()
        {
            if (disposed)
            {
                return;
            }

            LcdPinvoke.LogiLcdShutdown();
            hasInstance = false;

            disposed = true;
        }
Пример #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;
        }
Пример #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));
 }
Пример #6
0
 public bool ColorSetTitle(string text, byte red = 255, byte green = 255, byte blue = 255)
 {
     return(LcdPinvoke.LogiLcdColorSetTitle(text, red, green, blue));
 }
Пример #7
0
 public bool MonoSetText(int lineNumber, string text)
 {
     return(LcdPinvoke.LogiLcdMonoSetText(lineNumber, text));
 }
Пример #8
0
 public void Update()
 {
     LcdPinvoke.LogiLcdUpdate();
 }
Пример #9
0
 public bool IsButtonPressed(LcdButton button)
 {
     return(LcdPinvoke.LogiLcdIsButtonPressed((int)button));
 }
Пример #10
0
 public bool IsConnected(LcdType lcdtype)
 {
     return(LcdPinvoke.LogiLcdIsConnected((int)lcdtype));
 }