Пример #1
0
        internal override void ImportSettings(string settings)
        {
            if (string.IsNullOrEmpty(settings))
            {
                throw new ArgumentException("Import string empty. (KeyBinding)");
            }
            if (settings.StartsWith("MultiPanelKnob{"))
            {
                //MultiPanelKey{ALT}\o/{1KNOB_ENGINE_LEFT}\o/OSKeyPress{[FiftyMilliSec,RCONTROL + RSHIFT + VK_R][FiftyMilliSec,RCONTROL + RSHIFT + VK_W]}\o/\\?\hid#vid_06a3&pid_0d67#9&231fd360&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
                var parameters = settings.Split(new[] { SeparatorChars }, StringSplitOptions.RemoveEmptyEntries);

                //MultiPanelKey{ALT}
                var param0 = parameters[0].Replace("MultiPanelKnob{", "").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);

                //OSKeyPress{[FiftyMilliSec,RCONTROL + RSHIFT + VK_R][FiftyMilliSec,RCONTROL + RSHIFT + VK_W]}
                OSKeyPress = new OSKeyPress();
                OSKeyPress.ImportString(parameters[2]);
            }
        }
Пример #2
0
        internal override void ImportSettings(string settings)
        {
            if (string.IsNullOrEmpty(settings))
            {
                throw new ArgumentException("Import string empty. (KeyBinding)");
            }
            if (settings.StartsWith("RadioPanelKey{"))
            {
                //RadioPanelKey{1UpperCOM1}\o/OSKeyPress{[FiftyMilliSec,RCONTROL + RSHIFT + VK_R][FiftyMilliSec,RCONTROL + RSHIFT + VK_W]}\o/\\?\hid#vid_06a3&pid_0d67#9&231fd360&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
                var parameters = settings.Split(new[] { SeparatorChars }, StringSplitOptions.RemoveEmptyEntries);

                //RadioPanelKey{1UpperCOM1}
                var param0 = parameters[0].Trim().Substring(14);
                //1UpperCOM1}
                param0 = param0.Remove(param0.Length - 1, 1);
                //1UpperCOM1
                WhenTurnedOn   = (param0.Substring(0, 1) == "1");
                param0         = param0.Substring(1);
                _panelPZ69Knob = (RadioPanelPZ69KnobsEmulator)Enum.Parse(typeof(RadioPanelPZ69KnobsEmulator), param0);

                //OSKeyPress{[FiftyMilliSec,RCONTROL + RSHIFT + VK_R][FiftyMilliSec,RCONTROL + RSHIFT + VK_W]}
                OSKeyPress = new OSKeyPress();
                OSKeyPress.ImportString(parameters[1]);
            }
        }
Пример #3
0
        internal override void ImportSettings(string settings)
        {
            if (string.IsNullOrEmpty(settings))
            {
                throw new ArgumentException("Import string empty. (KeyBinding)");
            }
            if (settings.StartsWith("TPMPanelSwitch{"))
            {
                //TPMPanelSwitch{1KNOB_ENGINE_LEFT}\o/OSKeyPress{[FiftyMilliSec,RCONTROL + RSHIFT + VK_R][FiftyMilliSec,RCONTROL + RSHIFT + VK_W]}\o/\\?\hid#vid_06a3&pid_0d67#9&231fd360&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
                var parameters = settings.Split(new[] { SeparatorChars }, StringSplitOptions.RemoveEmptyEntries);

                //TPMPanelSwitch{1KNOB_ENGINE_LEFT}
                var param0 = parameters[0].Trim().Substring(15);
                //1KNOB_ENGINE_LEFT}
                param0 = param0.Remove(param0.Length - 1, 1);
                //1KNOB_ENGINE_LEFT
                WhenTurnedOn    = (param0.Substring(0, 1) == "1");
                param0          = param0.Substring(1);
                _tpmPanelSwitch = (TPMPanelSwitches)Enum.Parse(typeof(TPMPanelSwitches), param0);

                //OSKeyPress{[FiftyMilliSec,RCONTROL + RSHIFT + VK_R][FiftyMilliSec,RCONTROL + RSHIFT + VK_W]}
                OSKeyPress = new OSKeyPress();
                OSKeyPress.ImportString(parameters[1]);
            }
        }
Пример #4
0
 internal void ImportSettings(string settings)
 {
     if (string.IsNullOrEmpty(settings))
     {
         throw new ArgumentException("Import string empty. (KeyBinding)");
     }
     if (settings.StartsWith("RadioPanelKeyDialPos{"))
     {
         var parameters = settings.Split(new[] { SeparatorChars }, StringSplitOptions.RemoveEmptyEntries);
         var param0     = parameters[0].Replace("RadioPanelKeyDialPos{", "").Replace("}", "");
         _pz69DialPosition = (PZ69DialPosition)Enum.Parse(typeof(PZ69DialPosition), param0);
         var param1 = parameters[1].Replace("{", "").Replace("}", "");
         _whenOnTurnedOn = param1.Substring(0, 1) == "1";
         param1          = param1.Substring(1);
         _panelPZ69Knob  = (RadioPanelPZ69KnobsEmulator)Enum.Parse(typeof(RadioPanelPZ69KnobsEmulator), param1);
         _osKeyPress     = new OSKeyPress();
         _osKeyPress.ImportString(parameters[2]);
     }
 }