|
|
10 mēneši atpakaļ | |
|---|---|---|
| .. | ||
| .nuget | 10 mēneši atpakaļ | |
| .vs | 10 mēneši atpakaļ | |
| DreamCheeky.BigRedButton | 10 mēneši atpakaļ | |
| Test.Application | 10 mēneši atpakaļ | |
| .gitignore | 10 mēneši atpakaļ | |
| DreamCheeky.BigRedButton.sln | 10 mēneši atpakaļ | |
| LICENSE | 10 mēneši atpakaļ | |
| README.md | 10 mēneši atpakaļ | |
To install DreamCheeky.BigRedButton package, run the following command in the Package Manager Console inside Visual Studio:
Install-Package DreamCheeky.BigRedButton
The package currently depends on hidlibrary (≥ 3.2.28).
using DreamCheeky;
class Program
{
static void Main()
{
using (var bigRedButton = new BigRedButton())
{
bigRedButton.LidClosed += (sender, args) => Console.WriteLine("Lid closed");
bigRedButton.LidOpen += (sender, args) => Console.WriteLine("Lid open");
bigRedButton.ButtonPressed += (sender, args) => Console.WriteLine("Button pressed");
bigRedButton.Start();
Console.WriteLine("Press ENTER to exit");
Console.ReadLine();
}
}
}