我想使用Corsairs SDK对键盘照明进行编程。我正在使用名为CUE.NET的c#库。
我使用这种方法:
using System;
// some more references to c# libraries.
using CUE.NET;
using CUE.NET.Devices.Keyboard;
using CUE.NET.Exceptions;
using CUE.NET.Devices.Generic.Enums;
void TryToInitializeCUE()
{
try
{
CueSDK.Initialize();
Debug.WriteLine("Initialized with " + CueSDK.LoadedArchitecture + "-SDK");
CorsairKeyboard keyboard = CueSDK.KeyboardSDK;
if (keyboard == null)
throw new WrapperException("No keyboard found");
}
catch (CUEException ex)
{
Debug.WriteLine("CUE Exception! ErrorCode: " + Enum.GetName(typeof(CorsairError), ex.Error));
}
catch (WrapperException ex)
{
Debug.WriteLine("Wrapper Exception! Message:" + ex.Message);
}
}
除非我包含所有这些特定的引用,否则会出现一堆错误。有没有办法对整个库进行一次引用?例如" using.CUE.NET。*"