public static INRelativeSettingResolutionResult GetConfirmationRequired(INRelativeSetting valueToConfirm)
        {
#if IOS
            if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
#elif WATCH
            if (WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion(4, 0))
#endif
            { return(ConfirmationRequiredWithRelativeSettingToConfirm(valueToConfirm)); }
            else
            {
                return(ConfirmationRequiredWithValueToConfirm(valueToConfirm));
            }
        }
        public static INRelativeSettingResolutionResult GetSuccess(INRelativeSetting resolvedValue)
        {
#if IOS
            if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
#elif WATCH
            if (WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion(4, 0))
#endif
            { return(SuccessWithResolvedRelativeSetting(resolvedValue)); }
            else
            {
                return(SuccessWithResolvedValue(resolvedValue));
            }
        }
示例#3
0
        public static INRelativeSettingResolutionResult GetConfirmationRequired(INRelativeSetting valueToConfirm)
        {
#if __WATCHOS__
            throw new PlatformNotSupportedException("This class is not supported on watchOS");
#elif __IOS__
            if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
            {
                return(ConfirmationRequiredWithRelativeSettingToConfirm(valueToConfirm));
            }
            else
            {
                return(ConfirmationRequiredWithValueToConfirm(valueToConfirm));
            }
#endif
        }
示例#4
0
        public static INRelativeSettingResolutionResult GetSuccess(INRelativeSetting resolvedValue)
        {
#if __WATCHOS__
            throw new PlatformNotSupportedException("This class is not supported on watchOS");
#elif __IOS__
            if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
            {
                return(SuccessWithResolvedRelativeSetting(resolvedValue));
            }
            else
            {
                return(SuccessWithResolvedValue(resolvedValue));
            }
#endif
        }
示例#5
0
 public INSetSeatSettingsInCarIntent(bool?enableHeating, bool?enableCooling, bool?enableMassage, INCarSeat seat, NSNumber level, INRelativeSetting relativeLevelSetting) :
     this(enableHeating.HasValue ? new NSNumber(enableHeating.Value) : null, enableCooling.HasValue ? new NSNumber(enableCooling.Value) : null, enableMassage.HasValue ? new NSNumber(enableMassage.Value) : null, seat, level, relativeLevelSetting)
 {
 }
示例#6
0
 public INSetClimateSettingsInCarIntent(bool?enableFan, bool?enableAirConditioner, bool?enableClimateControl, bool?enableAutoMode, INCarAirCirculationMode airCirculationMode, NSNumber fanSpeedIndex, NSNumber fanSpeedPercentage, INRelativeSetting relativeFanSpeedSetting, NSMeasurement <NSUnitTemperature> temperature, INRelativeSetting relativeTemperatureSetting, INCarSeat climateZone) :
     this(enableFan.HasValue ? new NSNumber(enableFan.Value) : null, enableAirConditioner.HasValue ? new NSNumber(enableAirConditioner.Value) : null,
          enableClimateControl.HasValue ? new NSNumber(enableClimateControl.Value) : null, enableAutoMode.HasValue ? new NSNumber(enableAutoMode.Value) : null,
          airCirculationMode, fanSpeedIndex, fanSpeedPercentage, relativeFanSpeedSetting, temperature, relativeTemperatureSetting, climateZone)
 {
 }