Beispiel #1
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);
                }
            }
        }
Beispiel #2
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);
                }
            }
        }