/// <summary> /// Checks if a specific LCD_TYPE is connected to the system. /// </summary> /// <param name="lcdType">The LCD_TYPE for which we want to check the connection.</param> /// <returns>true if the LCD_TYPE is connected to the system</returns> public bool IsConnected( LCD_TYPE lcdType ) { if ( isDisposed ) { throw new ObjectDisposedException( "LogiLcd" ); } if ( !isInitialized ) { throw new InvalidOperationException( "You have to call LogiLcd.Initialize() first." ); } int type = ( int )lcdType; return NativeMethods.LogiLcdIsConnected( type ); }
/// <summary> /// Initializes the LogiLcd system. You must call this function prior to any other function. /// </summary> /// <param name="friendlyName">the name of your applet, you can’t change it after initialization.</param> /// <param name="lcdType">defines the type of your applet lcd target. Is has to e of type LCD_TYPE.</param> /// <returns>true if the initialization was successful</returns> public bool Initialize( string friendlyName, LCD_TYPE lcdType ) { if ( isDisposed ) { throw new ObjectDisposedException( "LogiLcd" ); } if ( isInitialized ) { Shutdown(); } name = friendlyName; int type = ( int )lcdType; bool result = NativeMethods.LogiLcdInit( name, type ); isInitialized = result; return result; }