chroma-sdk/Colore

Colore and Visual Studio code don't match up

iprisj opened this issue · 1 comments

I've wanted to make a program in Visual Studios to customize the color of my mouse through coding, but the example givin and the code in studio seem to have different ways to close the function and gives an error when I insert it.
The givin code from https://github.com/chroma-sdk/Colore/wiki/Getting-started
Uses

 {
}

To close off the function while the original code in VS usues

End Sub
&
End Class

Givin Code

Private Async void button1_Click(Object sender, RoutedEventArgs e)
{
    // Sets all Chroma devices to red, the 'chroma' variable should be saved
    // somewhere that Is globally accessible to the application.
    var chroma = await ColoreProvider.CreateNativeAsync();
    await chroma.SetAllAsync(ColoreColor.Red);
    
    // Without the usings it will look Like this
    // var chroma = await Colore.ColoreProvider.CreateNativeAsync();
    // await chroma.SetAllAsync(Colore.Data.Color.Red);
}

Code already in Visual Studio

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

    End Sub
End Class

The example code is in C# while you seem to have a Visual Basic project. You'll need to translate the example code into VB.NET syntax to use it in your project.

This tool might be of help but you might still have to translate some things by hand.