/// <summary>
 ///     Initializes the connection to the Logitech G-Series device. Must be called before any other function in this library
 /// </summary>
 /// <param name="friendlyName">The human-readable name of the LCD applet. Cannot be changed after initialization</param>
 /// <param name="lcdType">
 ///     The type of LCD to initialize to. Can be one of the following:
 ///     <list type="bullet">
 ///         <item>
 ///             <term>
 ///                 <see cref="LcdType.Monochrome" />
 ///             </term>
 ///             <description>Only Logitech Monochrome LCD devices (G510, G13, G15 v1 and v2)</description>
 ///         </item>
 ///         <item>
 ///             <term>
 ///                 <see cref="LcdType.Color" />
 ///             </term>
 ///             <description>Only Logitech Color LCD devices (G19)</description>
 ///         </item>
 ///         <item>
 ///             <term>
 ///                 <see cref="LcdType.Both" />
 ///             </term>
 ///             <description>Both color and monochrome LCD devices</description>
 ///         </item>
 ///     </list>
 /// </param>
 /// <seealso cref="LcdType" />
 /// <returns>True if successful, false if not</returns>
 public LogitechLcd(string friendlyName, LcdType lcdType)
 {
     if (!NativeMethods.LogiLcdInit(friendlyName, (int)lcdType))
     {
         throw new ExternalException("Error initializing LCD");
     }
 }
Example #2
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;
        }
Example #3
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;
        }
 /// <summary>
 ///     Checks if a Logitech G-Series device is connected
 /// </summary>
 /// <param name="lcdType">
 ///     The type of LCD to check the connection to. Can be one of the following:
 ///     <list type="bullet">
 ///         <item>
 ///             <term>
 ///                 <see cref="LcdType.Monochrome" />
 ///             </term>
 ///             <description>Only Logitech Monochrome LCD devices (G510, G13, G15 v1 and v2)</description>
 ///         </item>
 ///         <item>
 ///             <term>
 ///                 <see cref="LcdType.Color" />
 ///             </term>
 ///             <description>Only Logitech Color LCD devices (G19)</description>
 ///         </item>
 ///         <item>
 ///             <term>
 ///                 <see cref="LcdType.Both" />
 ///             </term>
 ///             <description>Both color and monochrome LCD devices</description>
 ///         </item>
 ///     </list>
 /// </param>
 /// <seealso cref="LcdType" />
 /// <returns>True if a specified device is connected, false if not</returns>
 public bool LcdIsConnected(LcdType lcdType)
 {
     return(NativeMethods.LogiLcdIsConnected((int)lcdType));
 }
Example #5
0
 public bool IsConnected(LcdType lcdtype)
 {
     return(LcdPinvoke.LogiLcdIsConnected((int)lcdtype));
 }
Example #6
0
 public bool IsConnected(LcdType lcdtype)
 {
     return LcdPinvoke.LogiLcdIsConnected((int)lcdtype);
 }