Exemple #1
0
        private void OnWheelPositionEvent(TouchC8 sender, double position, Direction direction)
        {
            if (this.OnWheelPosition == null)
            {
                this.OnWheelPosition = new WheelPositionChangedHandler(this.OnWheelPositionEvent);
            }

            if (Program.CheckAndInvoke(this.OnWheelPositionChanged, this.OnWheelPosition, sender, position, direction))
            {
                this.OnWheelPositionChanged(sender, position, direction);
            }
        }
Exemple #2
0
        private void OnWheelPositionChanged(TouchC8 sender, WheelPositionChangedEventArgs e)
        {
            if (this.onWheelPositionChanged == null)
            {
                this.onWheelPositionChanged = this.OnWheelPositionChanged;
            }

            if (Program.CheckAndInvoke(this.WheelPositionChanged, this.onWheelPositionChanged, sender, e))
            {
                this.WheelPositionChanged(sender, e);
            }
        }
Exemple #3
0
        private void OnWheelEvent(TouchC8 sender, bool state)
        {
            if (this.OnWheel == null)
            {
                this.OnWheel = new WheelTouchHandler(this.OnWheelEvent);
            }

            if (Program.CheckAndInvoke(state ? this.OnWheelPressed : this.OnWheelReleased, this.OnWheel, sender, state))
            {
                if (state)
                {
                    this.OnWheelPressed(sender, state);
                }
                else
                {
                    this.OnWheelReleased(sender, state);
                }
            }
        }
Exemple #4
0
        private void OnButtonEvent(TouchC8 sender, Buttons button, bool state)
        {
            if (this.OnButton == null)
            {
                this.OnButton = new ButtonTouchHandler(this.OnButtonEvent);
            }

            if (Program.CheckAndInvoke(state ? this.OnButtonPressed : this.OnButtonReleased, this.OnButton, sender, button, state))
            {
                if (state)
                {
                    this.OnButtonPressed(sender, button, state);
                }
                else
                {
                    this.OnButtonReleased(sender, button, state);
                }
            }
        }
Exemple #5
0
        private void OnProximityEvent(TouchC8 sender, bool state)
        {
            if (this.OnProximity == null)
            {
                this.OnProximity = new PromixityDetectedHandler(this.OnProximityEvent);
            }

            if (Program.CheckAndInvoke(state ? this.OnProximityEnter : this.OnProximityExit, this.OnProximity, sender, state))
            {
                if (state)
                {
                    this.OnProximityEnter(sender, state);
                }
                else
                {
                    this.OnProximityExit(sender, state);
                }
            }
        }
Exemple #6
0
        private void OnWheelTouched(TouchC8 sender, WheelTouchedEventArgs e)
        {
            if (this.onWheelTouched == null)
            {
                this.onWheelTouched = this.OnWheelTouched;
            }

            if (Program.CheckAndInvoke(e.State ? this.WheelPressed : this.WheelReleased, this.onWheelTouched, sender, e))
            {
                if (e.State)
                {
                    this.WheelPressed(sender, e);
                }
                else
                {
                    this.WheelReleased(sender, e);
                }
            }
        }
Exemple #7
0
        private void OnProximityDetected(TouchC8 sender, PromixityDetectedEventArgs e)
        {
            if (this.onProximityDetected == null)
            {
                this.onProximityDetected = this.OnProximityDetected;
            }

            if (Program.CheckAndInvoke(e.State ? this.ProximityEnter : this.ProximityExit, this.onProximityDetected, sender, e))
            {
                if (e.State)
                {
                    this.ProximityEnter(sender, e);
                }
                else
                {
                    this.ProximityExit(sender, e);
                }
            }
        }
Exemple #8
0
        private void OnButtonTouched(TouchC8 sender, ButtonTouchedEventArgs e)
        {
            if (this.onButtonTouched == null)
            {
                this.onButtonTouched = this.OnButtonTouched;
            }

            //if (Program.CheckAndInvoke(e.State ? this.ButtonPressed : this.ButtonReleased, this.onButtonTouched, sender, e)) {
            if (e.State)
            {
                if (this.ButtonPressed != null)
                {
                    this.ButtonPressed(sender, e);
                }
            }
            else
            {
                if (this.ButtonReleased != null)
                {
                    this.ButtonReleased(sender, e);
                }
            }
        }