public void OnMouseClickHandler( object sender, MouseEventArgs args )
        {
            var control = sender as FrameworkElement;
            if (control == null)
            {
                return;
            }

            var clickEvent = args as MouseButtonEventArgs;
            if( clickEvent == null)
            {
                return;
            }

            Math.Point point = new Math.Point(args.GetPosition(control));

            if (!EnableDoubleClick && clickEvent.ClickCount > 0)
            {
                if (Command != null && Command.CanExecute(sender))
                {
                    Command.Execute(point);
                }
            }

            //!< Double Click
            if (EnableDoubleClick && clickEvent.ClickCount > 1)
            {
                if (Command != null && Command.CanExecute(sender))
                {
                    Command.Execute(point);
                }
            }
        }
Esempio n. 2
0
        //Les méthodes

        /// <summary>
        /// Ajoute une source de lumière globale à la scène
        /// </summary>
        /// <param name="L">Source de lumière</param>


        /// <summary>
        /// Ajoute un point à la scène
        /// </summary>
        /// <param name="P">Point</param>

        public void add_Point(Math.Point pt)
        {
            LesPoints.Add(pt);
        }