Beispiel #1
0
        private void PfspManager_ButtonUp(object sender, PFSwPanelSwitchEventArgs e)
        {
            m_worker.ReportProgress(50, $"SwitchPanelSupport - {e.Switch.ToString( )} Up");
            if (!VJoyHandler.Instance.Connected)
            {
                return;
            }

            string key = InputSwitch.Input_On(e.Switch.ToString( ));

            if (m_panelConfig.VJCommands.ContainsKey(key))
            {
                var cmd = m_panelConfig.VJCommands[key];
                if (cmd.IsValid)
                {
                    VJoyHandler.Instance.HandleMessage(cmd);
                    SwitchPanelLed.HandleLed(cmd.CtrlExt1, m_pfspManager);
                }
            }
        }
Beispiel #2
0
        private void PfspManager_RotaryChanged(object sender, PFSwPanelRotaryEventArgs e)
        {
            m_worker.ReportProgress(50, $"SwitchPanelSupport - Rotary changed to {e.State.RotaryState( ).ToString( )}");
            if (!VJoyHandler.Instance.Connected)
            {
                return;
            }

            string key = InputRotary.Rotary_Pos("ROTARY", (int)e.State.RotaryState( ));

            if (m_panelConfig.VJCommands.ContainsKey(key))
            {
                var cmd = m_panelConfig.VJCommands[key];
                if (cmd.IsValid)
                {
                    VJoyHandler.Instance.HandleMessage(cmd);
                    SwitchPanelLed.HandleLed(cmd.CtrlExt1, m_pfspManager);
                }
            }
        }