Пример #1
0
 private void EtiquetaAviso_MouseClick(object sender, MouseEventArgs e)
 {
     if (e.X < tamaño)
     {
         ClickEnMarca?.Invoke(this, e);
     }
 }
Пример #2
0
 protected override void OnMouseClick(MouseEventArgs e)
 {
     base.OnMouseClick(e);
     if (e.X >= this.x && e.X <= this.x + width && e.Y >= this.y && e.Y <= height)
     {
         ClickEnMarca?.Invoke(this, EventArgs.Empty);
     }
 }
Пример #3
0
        protected override void OnMouseClick(MouseEventArgs e)
        {
            base.OnMouseClick(e);

            if (e.X < offsetX)
            {
                ClickEnMarca?.Invoke(this, EventArgs.Empty);
            }
        }
Пример #4
0
 protected override void OnClick(EventArgs e)
 {
     base.OnClick(e);
     if (((MouseEventArgs)e).X >= posXimg && ((MouseEventArgs)e).X <= posXimg + imagenMarca.Width &&
         ((MouseEventArgs)e).Y >= posYimg && ((MouseEventArgs)e).Y < posYimg + imagenMarca.Height &&
         Marca != eMarca.Nada)
     {
         ClickEnMarca?.Invoke(this, EventArgs.Empty);
     }
 }
Пример #5
0
 private void EtiquetaAviso_MouseClick(object sender, MouseEventArgs e)
 {
     if (Marca != eMarca.Nada)
     {
         if (e.X < medida)
         {
             ClickEnMarca?.Invoke(this, new EventArgs());
         }
     }
 }
Пример #6
0
 private void CustomControl1_ClickEnMarca(object sender, MouseEventArgs e)
 {
     if (Marca != eMarca.Nada)
     {
         if (e.X < medida)
         {
             ClickEnMarca?.Invoke(this, new EventArgs());
         }
     }
 }
Пример #7
0
 /// <summary>
 /// Gestiona los eventos cuando se realiza un click de ratón
 /// </summary>
 /// <param name="e">Los argumentos del evento</param>
 protected override void OnMouseClick(MouseEventArgs e)
 {
     base.OnMouseClick(e);
     if (marcaRect.Contains(e.Location) && marca != eMarca.Nada)
     {
         /*if (ClickEnMarca != null)
          * {
          *  ClickEnMarca(this, e);
          * }*/
         ClickEnMarca?.Invoke(this, e);
     }
 }
Пример #8
0
        protected override void OnClick(EventArgs e)            //MouseClick xa nos da as coordenadas
        {
            base.OnClick(e);
            Point p = new Point(this.PointToClient(Cursor.Position).X, this.PointToClient(Cursor.Position).Y);

            if (/*Marca != eMarca.Nada && */ rect.Contains(p))
            {
                //MessageBox.Show("aqui "+this.PointToClient(Cursor.Position).X+", "+ this.PointToClient(Cursor.Position).Y);
                //MessageBox.Show("click rect");
                ClickEnMarca?.Invoke(this, EventArgs.Empty);
            }
        }