internal override void ImportSettings(string settings) { if (string.IsNullOrEmpty(settings)) { throw new ArgumentException("Import string empty. (WindowsBinding)"); } if (settings.StartsWith("MultiPanelOSPZ70{")) { //MultiPanelOSPZ70{ALT}\o/{1KNOB_ENGINE_LEFT}\o/OSCommand{FILE\o/ARGUMENTS\o/NAME}\o/\\?\hid#vid_06a3&pid_0d67#9&231fd360&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} var parameters = settings.Split(new[] { SeparatorChars }, StringSplitOptions.RemoveEmptyEntries); //MultiPanelOSPZ70{ALT} var param0 = parameters[0].Replace("MultiPanelOSPZ70{", "").Replace("}", ""); _pz70DialPosition = (PZ70DialPosition)Enum.Parse(typeof(PZ70DialPosition), param0); //{1KNOB_ENGINE_LEFT} var param1 = parameters[1].Replace("{", "").Replace("}", ""); //1KNOB_ENGINE_LEFT WhenTurnedOn = param1.Substring(0, 1) == "1"; param1 = param1.Substring(1); _multiPanelPZ70Knob = (MultiPanelPZ70Knobs)Enum.Parse(typeof(MultiPanelPZ70Knobs), param1); //OSCommand{FILE\o/ARGUMENTS\o/NAME} OSCommandObject = new OSCommand(); OSCommandObject.ImportString(parameters[2]); } }
internal override void ImportSettings(string settings) { if (string.IsNullOrEmpty(settings)) { throw new ArgumentException("Import string empty. (KeyBinding)"); } if (settings.StartsWith("RadioPanelOSPZ69Full{")) { var parameters = settings.Split(new[] { SeparatorChars }, StringSplitOptions.RemoveEmptyEntries); var param0 = parameters[0].Replace("RadioPanelOSPZ69Full{", "").Replace("}", ""); _pz69DialPosition = (PZ69DialPosition)Enum.Parse(typeof(PZ69DialPosition), param0); var param1 = parameters[1].Replace("{", "").Replace("}", ""); WhenTurnedOn = param1.Substring(0, 1) == "1"; param1 = param1.Substring(1); _panelPZ69Knob = (RadioPanelPZ69KnobsEmulator)Enum.Parse(typeof(RadioPanelPZ69KnobsEmulator), param1); //OSCommand{FILE\o/ARGUMENTS\o/NAME} OSCommandObject = new OSCommand(); OSCommandObject.ImportString(parameters[2]); } }
internal override void ImportSettings(string settings) { if (string.IsNullOrEmpty(settings)) { throw new ArgumentException("Import string empty. (KeyBinding)"); } if (settings.StartsWith("TPMPanelOSCommand{")) { //TPMPanelOSCommand{1KNOB_ENGINE_LEFT}\o/OSCommand{FILE\o/ARGUMENTS\o/NAME}\o/\\?\hid#vid_06a3&pid_0d67#9&231fd360&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} var parameters = settings.Split(new[] { SeparatorChars }, StringSplitOptions.RemoveEmptyEntries); //TPMPanelOSCommand{1KNOB_ENGINE_LEFT} var param0 = parameters[0].Replace("TPMPanelOSCommand{", "").Replace("}", ""); //1KNOB_ENGINE_LEFT WhenTurnedOn = (param0.Substring(0, 1) == "1"); param0 = param0.Substring(1); _tpmPanelSwitch = (TPMPanelSwitches)Enum.Parse(typeof(TPMPanelSwitches), param0); //OSCommand{FILE\o/ARGUMENTS\o/NAME} OSCommandObject = new OSCommand(); OSCommandObject.ImportString(parameters[1]); } }