Пример #1
0
        public NzxtGridGroup(ISettings settings, ILog log)
        {
            var devices = NzxtGridDevice.EnumerateDevices();

            foreach (var device in devices)
            {
                _devices.Add(new NzxtGridDevice(device.DeviceID, settings, log));
            }
        }
Пример #2
0
        public NzxtGridChannel(NzxtGridDevice device, int channelId, ISettings settings)
        {
            _device    = device;
            _channelId = channelId;

            _voltage      = new Sensor("Fan " + GetId(), channelId, SensorType.Voltage, device, settings);
            _rpm          = new Sensor("Fan " + GetId(), channelId, SensorType.Fan, device, settings);
            _speed        = new Sensor("Control " + GetId(), channelId, SensorType.Control, device, settings);
            _speedControl = new Control(_speed, settings, NzxtGridDevice.MinSpeed, NzxtGridDevice.MaxSpeed);

            _speedControl.ControlModeChanged          += ControlModeChanged;
            _speedControl.SoftwareControlValueChanged += SoftwareControlValueChanged;
            _speed.Control = _speedControl;
            ControlModeChanged(_speedControl);

            device.EnableSensor(_voltage);
            device.EnableSensor(_rpm);
            device.EnableSensor(_speed);
        }