sidewinder94 / logitech-lcd Goto Github PK
View Code? Open in Web Editor NEWA C# Wrapper allowing to use the functions of the logitech LCD SDK in .NET
License: GNU General Public License v3.0
A C# Wrapper allowing to use the functions of the logitech LCD SDK in .NET
License: GNU General Public License v3.0
Every button on my g19s is triggering the LcdColorLeftButtonPressed event, including the back and menu buttons which I have not bound.
Bindings:
<applets:BaseWPFApplet x:Name="lcdScreen"
LcdColorUpButtonPressed="lcdScreen_LcdColorUpButtonPressed"
LcdColorDownButtonPressed="lcdScreen_LcdColorDownButtonPressed"
LcdColorLeftButtonPressed="lcdScreen_LcdColorLeftButtonPressed"
LcdColorRightButtonPressed="lcdScreen_LcdColorRightButtonPressed"
LcdColorOkButtonPressed="lcdScreen_LcdColorOkButtonPressed">
Code:
private void lcdScreen_LcdColorUpButtonPressed( object sender, EventArgs e ) {
++Number.Y;
}
private void lcdScreen_LcdColorDownButtonPressed( object sender, EventArgs e ) {
--Number.Y;
}
private void lcdScreen_LcdColorLeftButtonPressed( object sender, EventArgs e ) {
--Number.X;
}
private void lcdScreen_LcdColorRightButtonPressed( object sender, EventArgs e ) {
++Number.X;
}
private void lcdScreen_LcdColorOkButtonPressed( object sender, EventArgs e ) {
Number.X = 0;
Number.Y = 0;
}
Removing the binding for the left button stops all buttons from triggering any events.
My g19s is working correctly as I can press the App selection key to switch away form my App to others that work fine.
As a possibly related note:
I initially had some trouble getting the DLL included. Init was complaining it couldn't find LogitechLCD.dll. I couldn't tell if it wanted the Logitech-LCD.dll file built in your project, the LogitechLcdEnginesWrapper.dll (the only DLL in my download of the Gamepanel SDK) or some DLL I had to build myself from the SDK's header and lib files.
Through trial and error I found it to be the EnginesWrapper and applied a band-aid to the problem by editing NativeMethods.cs (DllName86/DllName64) to reflect this and using a post build event to copy the entire Lib folder to the directory of the built exe. Not sure if that's necessary the best fix but it can Init and is rendering properly now.
Add WPF support for applets
WPF is really more flexible when it comes to build interfaces.
I will try to switch from WinForms Technology to WPF
Hi, I just tried a simple console application to show text on the G19 LCD but the following code seems not work. No error, using the most up 2 date DLL files. Am I doing something wrong?
using System;
using Logitech_LCD;
namespace G19_Test
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Logitech_LCD.LogitechLcd.Instance.Init("Test Title", LcdType.Color);
Logitech_LCD.LogitechLcd.Instance.ColorSetTitle("Test-LCD", 255, 255, 255);
Logitech_LCD.LogitechLcd.Instance.ColorSetText(0, "Test Text", 255, 255, 255);
Console.Read();
}
}
}
Hi there,
Awesome work on this wrapper library, it's proven very useful.
I was wondering if you might be able to point me in the right direction for using WinForm UserControls with your library? I followed you instructions to create a new control which inherits off the Logitech_LCD.Applets.BaseApplet class and then implemented an override to the OnDataUpdate() event, however I'm not actually sure what to do next.
I basically want to achieve having multiple user controls or "pages" to send to the LCD, I can create a new instance of the user control using standard syntax such as:
var page = new MyUserControl();
but then how do i send that to update on the LCD, or more accurately - set that UserControl active to the screen?
Any help would be much appreciated.
My mouse is G302 ,I set a mouse button when it press down mouse macro implement OutPutLCDMessage() ๏ผ and I create a Winform Control then override the OnDataUpdate method .But run the Winform was ineffective ,how do I do next
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.