public ConfigureActionBasePage(Profile profile, VehicleActionType actionType, VehicleAction action, IProfileService profileService) { Profile = profile; ActionType = actionType; Action = action; ProfileService = profileService; Content = SetupView(); }
public static string GetDescription(this VehicleActionType action) { switch (action) { case VehicleActionType.WakeUp: return("Wake Up"); case VehicleActionType.ClimateACStart: return("Climate - Start AC"); case VehicleActionType.ClimateACStop: return("Climate - Stop AC"); case VehicleActionType.ClimateSetTemps: return("Climate - Set Temps"); case VehicleActionType.ClimateHeatedSeat: return("Climate - Heated Sets"); case VehicleActionType.ClimateHeatedSteeringWheel: return("Climate - Heated Steering Wheel"); case VehicleActionType.ChargingStart: return("Charging - Start"); case VehicleActionType.ChargingStop: return("Charging - Stop"); case VehicleActionType.ChargingSetLimit: return("Charging - Set Limit"); case VehicleActionType.ChargingOpenPort: return("Charging - Open Port"); case VehicleActionType.ChargingClosePort: return("Charging - Close Port"); case VehicleActionType.ControlsDoorsLock: return("Controls - Lock Doors"); case VehicleActionType.ControlsDoorsUnlock: return("Controls - Unlock Doors"); case VehicleActionType.ControlsFlashLights: return("Controls - Flash Lights"); case VehicleActionType.ControlsHonkHorn: return("Controls - Honk Horn"); case VehicleActionType.ControlsFrontTrunk: return("Controls - Open Front Trunk"); case VehicleActionType.ControlsRearTrunk: return("Controls - Toggle Rear Trunk"); case VehicleActionType.ControlsSunRoof: return("Controls - Sun Roof"); case VehicleActionType.RemoteStartDrive: return("Controls - Remote Start Drive"); case VehicleActionType.SpeedLimitActivate: return("Speed Limit - Activate"); case VehicleActionType.SpeedLimitClearPin: return("Speed Limit - Clear PIN"); case VehicleActionType.SpeedLimitDeactivate: return("Speed Limit - Deactivate"); case VehicleActionType.SpeedLimitSet: return("Speed Limit - Set Limit"); case VehicleActionType.ValetModeResetPin: return("Valet Mode - Reset PIN"); case VehicleActionType.ValetModeSet: return("Valet Mode - Set"); } return("Unknown"); }
public static bool IsCustomizable(this VehicleActionType action) { switch (action) { case VehicleActionType.ClimateSetTemps: case VehicleActionType.ClimateHeatedSeat: case VehicleActionType.ClimateHeatedSteeringWheel: case VehicleActionType.ChargingSetLimit: case VehicleActionType.ControlsRearTrunk: case VehicleActionType.ControlsSunRoof: case VehicleActionType.SpeedLimitSet: return(true); default: return(false); } }
public static async Task CustomizeOrReturn(this VehicleActionType actionType, Profile profile, VehicleAction action, INavigation navigation, IProfileService profileService) { switch (actionType) { case VehicleActionType.ClimateACStart: case VehicleActionType.ClimateACStop: case VehicleActionType.ChargingStart: case VehicleActionType.ChargingStop: case VehicleActionType.ChargingOpenPort: case VehicleActionType.ChargingClosePort: case VehicleActionType.ControlsDoorsLock: case VehicleActionType.ControlsDoorsUnlock: case VehicleActionType.ControlsFlashLights: case VehicleActionType.ControlsHonkHorn: case VehicleActionType.ControlsFrontTrunk: case VehicleActionType.RemoteStartDrive: case VehicleActionType.SpeedLimitActivate: case VehicleActionType.SpeedLimitClearPin: case VehicleActionType.SpeedLimitDeactivate: case VehicleActionType.ValetModeResetPin: case VehicleActionType.ValetModeSet: profile.Actions.Add(new VehicleAction { Type = actionType, }); await profileService.UpsertProfileAsync(profile); await navigation.PopAsync(); break; case VehicleActionType.ClimateSetTemps: await navigation.PushAsync(new ConfigureClimateSetTemps(profile, actionType, action, profileService)); break; case VehicleActionType.ClimateHeatedSeat: case VehicleActionType.ClimateHeatedSteeringWheel: case VehicleActionType.ChargingSetLimit: case VehicleActionType.ControlsRearTrunk: case VehicleActionType.ControlsSunRoof: case VehicleActionType.SpeedLimitSet: //await navigation.PushAsync(new ConfigureActionBasePage(profile, actionType, action)); break; } }
public static bool IsRequired(this VehicleActionType action) { return(action == VehicleActionType.WakeUp); }
public VehicleActionBinder(VehicleActionType action) { Action = action; }
public ConfigureClimateSetTemps(Profile profile, VehicleActionType actionType, VehicleAction action, IProfileService profileService) : base(profile, actionType, action, profileService) { }