Exemple #1
0
 public static DeviceSettings ToDeviceSettings(this SettingsViewModel model)
 {
     DeviceSettings settings = DeviceSettings.Default();
     settings.sleepAfterSeconds = (byte)(model.SleepWhenInactive ? model.SleepAfterSeconds : 0);
     settings.accelerationPercentage = (byte)model.AccelerationPercentage;
     settings.continuousScroll = model.LoopAroundItems;
     //_settingsViewModel.DoubleTapTime
     settings.volumeMinColor.SetBytes(BitConverter.GetBytes(model.VolumeMinColor));
     settings.volumeMaxColor.SetBytes(BitConverter.GetBytes(model.VolumeMaxColor));
     settings.mixChannelAColor.SetBytes(BitConverter.GetBytes(model.MixChannelAColor));
     settings.mixChannelBColor.SetBytes(BitConverter.GetBytes(model.MixChannelBColor));
     return settings;
 }