private Constants.TouchOption StringToOption(String s, Constants.Devices d) { if (s == "Voice Assistant (Android only)") { return(Constants.TouchOption.VoiceAssistant); } else if (s == "Quick Ambient Sound") { return(Constants.TouchOption.QuickAmbientSound); } else if (s.StartsWith("Volume")) { return(Constants.TouchOption.Volume); } else if (s == "Ambient Sound") { return(Constants.TouchOption.AmbientSound); } else if (s == "Spotify SpotOn (Android only)") { return(Constants.TouchOption.SpotifySpotOn); } /*else if (s == "Custom Action") * { * return d == ExtendedStatusUpdateParser.Device.L ? * ExtendedStatusUpdateParser.TouchOption.OtherL : ExtendedStatusUpdateParser.TouchOption.OtherR; * }*/ Console.WriteLine("Touchpad: Unknown Touch Option"); return(Constants.TouchOption.Volume); }
private String OptionToString(Constants.TouchOption b, Constants.Devices d) { switch (b) { case Constants.TouchOption.VoiceAssistant: return("Voice Assistant (Android only)"); case Constants.TouchOption.QuickAmbientSound: return("Quick Ambient Sound"); case Constants.TouchOption.Volume: return(d == Constants.Devices.L ? "Volume Down" : "Volume Up"); case Constants.TouchOption.AmbientSound: return("Ambient Sound"); case Constants.TouchOption.SpotifySpotOn: return("Spotify SpotOn (Android only)"); /*case ExtendedStatusUpdateParser.TouchOption.OtherL: * return "Custom Action"; * case ExtendedStatusUpdateParser.TouchOption.OtherR: * return "Custom Action";*/ } return("Unknown"); }