Ejemplo n.º 1
0
        private void KnobRotated(FlexControl.RotateDirection direction, int num_steps)
        {
            if (!this.Visible)
            {
                return;                // form is still initializing
            }
            switch (current_knob_mode)
            {
            case FlexControlInterface1.KnobMode.A1: hlKnobA1.NewEvent(); break;

            case FlexControlInterface1.KnobMode.A2: hlKnobA2.NewEvent(); break;

            case FlexControlInterface1.KnobMode.B1: hlKnobB1.NewEvent(); break;

            case FlexControlInterface1.KnobMode.B2: hlKnobB2.NewEvent(); break;
            }
        }
Ejemplo n.º 2
0
        private void ButtonClicked(FlexControl.Button button, FlexControl.ClickType type)
        {
            if (!this.Visible)
            {
                return;                // form is still initializing
            }
            switch (button)
            {
            case FlexControl.Button.Left:
                switch (type)
                {
                case FlexControl.ClickType.Single: hlLeftSingle.NewEvent(); break;

                case FlexControl.ClickType.Double: hlLeftDouble.NewEvent(); break;

                case FlexControl.ClickType.Long: hlLeftLong.NewEvent(); break;
                }
                break;

            case FlexControl.Button.Middle:
                switch (type)
                {
                case FlexControl.ClickType.Single: hlMidSingle.NewEvent(); break;

                case FlexControl.ClickType.Double: hlMidDouble.NewEvent(); break;

                case FlexControl.ClickType.Long: hlMidLong.NewEvent(); break;
                }
                break;

            case FlexControl.Button.Right:
                switch (type)
                {
                case FlexControl.ClickType.Single: hlRightSingle.NewEvent(); break;

                case FlexControl.ClickType.Double: hlRightDouble.NewEvent(); break;

                case FlexControl.ClickType.Long: hlRightLong.NewEvent(); break;
                }
                break;

            case FlexControl.Button.Knob:
                switch (type)
                {
                case FlexControl.ClickType.Double:
                    switch (current_knob_mode)
                    {
                    case FlexControlInterface1.KnobMode.A1:
                    case FlexControlInterface1.KnobMode.A2:
                        hlKnobADouble.NewEvent();
                        break;

                    case FlexControlInterface1.KnobMode.B1:
                    case FlexControlInterface1.KnobMode.B2:
                        hlKnobBDouble.NewEvent();
                        break;
                    }
                    break;
                }
                break;
            }
        }