public int Dim(int deviceId, int percent) { byte level = Convert.ToByte(255m * (Convert.ToDecimal(percent) / 100m)); return((!_isWin) ? LinuxInterop.tdDim(deviceId, level) : WinInterop.tdDim(deviceId, level)); }