Пример #1
0
 protected NzxtDevice(NzxtDeviceConfig config)
 {
     if (config == null)
     {
         this.config = new NzxtDeviceConfig();
     }
     else
     {
         this.config = config;
     }
 }
Пример #2
0
        /// <summary>
        /// Opens the device asynchronously. If there's a problem opening the device, this returns null
        /// </summary>
        public static async Task <SmartDeviceV2> OpenDeviceAsync(NzxtDeviceConfig openConfig = null)
        {
            SmartDeviceV2 device  = new SmartDeviceV2(openConfig);
            bool          success = await device.OpenHidDevice().ConfigureAwait(false);

            await device.QueryDevices().ConfigureAwait(false);

            if (success)
            {
                return(device);
            }
            else
            {
                return(null);
            }
        }
Пример #3
0
 protected NzxtDevice()
 {
     config = new NzxtDeviceConfig();
 }
Пример #4
0
 private SmartDeviceV2(NzxtDeviceConfig config) : base(config)
 {
 }