Exemplo n.º 1
0
 private void OnClicked()
 {
     if (Click != null)
     {
         Click.Invoke(this);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Provoca el evento Click si algún oyente se adjunta.
 /// </summary>
 /// <param name="e"></param>
 protected virtual void PulsarClick(EventArgs e)
 {
     if (Click != null)
     {
         Click.Invoke(this, e);
     }
 }
Exemplo n.º 3
0
 public virtual void OnPointerClick(PointerEventData eventData)
 {
     if (onClickEvent != null)
     {
         onClickEvent.Invoke();
     }
 }
 private void PrimaryButton_Click(object sender, RoutedEventArgs e)
 {
     if (Click != null)
     {
         Click.Invoke(sender, e);
     }
 }
Exemplo n.º 5
0
        internal static void HandleMouseEvent(Point point, ActionType screenActionType)
        {
            MouseEvent me      = actionMap[screenActionType];
            Click      clicker = me.clicker;

            clicker.Invoke(me.device, point);
        }
Exemplo n.º 6
0
 private void btnSifaris_Click(object sender, EventArgs e)
 {
     if (Click != null)
     {
         Click.Invoke(this, e);
     }
 }
Exemplo n.º 7
0
 public void OnClick()
 {
     if (Click != null)
     {
         Click.Invoke(this, EventArgs.Empty);
     }
 }
Exemplo n.º 8
0
 private void UserControl_MouseUp(object sender, MouseButtonEventArgs e)
 {
     if (Clicked && Click != null)
     {
         Click.Invoke(sender, (RoutedEventArgs)(e));
     }
 }
Exemplo n.º 9
0
 private void Hotspot_Click(object sender, EventArgs e)
 {
     if (Click != null)
     {
         Click.Invoke(sender, e);
     }
 }
Exemplo n.º 10
0
 /// <summary>
 /// This event handler is called when the button is clicked. It simply
 /// relays the event to the event handler of this control.
 /// </summary>
 /// <param name="sender">Clicked control.</param>
 public void OnClick(UIComponent sender)
 {
     if (Click != null)
     {
         Click.Invoke(this);
     }
 }
Exemplo n.º 11
0
 private void DoClick()
 {
     if (Click != null)
     {
         Click.Invoke(this, EventArgs.Empty);
     }
 }
Exemplo n.º 12
0
 private void iconButton_MouseUp(object sender, MouseButtonEventArgs e)
 {
     if (Click != null)
     {
         Click.Invoke(this, e);
     }
 }
 private void OnButtonClicked(object sender, RoutedEventArgs e)
 {
     if (Click != null)
     {
         Click.Invoke(this, e);
     }
 }
 private void DoClick(TextBlockButton button, int index)
 {
     if (Click != null)
     {
         Click.Invoke(this, new ButtonTouchInputClickArgs(index));
     }
 }
Exemplo n.º 15
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        internal void ClickInvoke(EventArgs e)
        {
            if (Click != null)
            {
                Click.Invoke(this, e);
            }
        }
Exemplo n.º 16
0
 public void InvokeMouseClick(EventArgs e)
 {
     if (Click != null)
     {
         Click.Invoke(this, e);
     }
 }
Exemplo n.º 17
0
 public void OnPointerClick(PointerEventData eventData)
 {
     Debug.Log("Click intercepted! " + eventData.pointerPress.name);
     if (Click != null)
     {
         Click.Invoke(this);
     }
 }
Exemplo n.º 18
0
 void ObjetoItem_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     if (clicando)
     {
         Click.Invoke(sender, new EventArgs());
     }
     clicando = false;
 }
Exemplo n.º 19
0
        protected override void OnPointerReleased(PointerRoutedEventArgs e)
        {
            VisualStateManager.GoToState(this, "PointerUp", true);
            this.ReleasePointerCapture(e.Pointer);

            if (Click != null)
            {
                Click.Invoke(this, new EventArgs());
            }
        }
Exemplo n.º 20
0
        protected void OnClick(object sender, EventArgs e)
        {
            CardEventArgs ea = new CardEventArgs();

            ea.card = card;
            if (Click != null)
            {
                Click.Invoke(this, ea);
            }
        }
Exemplo n.º 21
0
        private void UserControl1_MouseUp(object sender, MouseEventArgs e)
        {
            mouseDown = false;
            this.Invalidate();

            if (mouseHover && Click != null)
            {
                Click.Invoke(this, new EventArgs());
            }
        }
Exemplo n.º 22
0
 public override void OnClick(int x, int y, Mouse.Button button)
 {
     if (Available)
     {
         MouseButtonEventArgs args = new MouseButtonEventArgs(new MouseButtonEvent()
         {
             X = x, Y = y, Button = button
         });
         Click.Invoke(this, args);
     }
 }
Exemplo n.º 23
0
        protected override void OnMouseDown(MouseButtonEventArgs e)
        {
            base.OnMouseDown(e);

            ParentTaskbarIcon.CloseBalloon();

            if (Click != null && e.LeftButton == MouseButtonState.Pressed)
            {
                Click.Invoke(this, EventArgs.Empty);
            }
        }
Exemplo n.º 24
0
            public void OnClick(int a)

            {
                if (Click != null)
                {
                    Click.Invoke(a);
                }

                //Click(a);//这种方式也是可以的

                MessageBox.Show("Click();");
            }
Exemplo n.º 25
0
 /// <summary>
 /// Invokes the Click and CloseAll events, if menu item doesn't have a
 /// popup menu.
 /// </summary>
 internal void InvokeClick()
 {
     // Check that there are no children
     if (this.numMenuItems == 0 && this.isEnabled)
     {
         if (Click != null)
         {
             Click.Invoke(this);
         }
         OnCloseAll();
     }
 }
Exemplo n.º 26
0
        private bool HandleMouseUp(MouseEventArgs e)
        {
            isLeftClicked = false;
            isPanning     = false;
            if ((!isSelecting || !selectingStarted))
            {
                DateTime d = DateTime.Now;
                if ((d - lastClick).TotalMilliseconds < 300)
                {
                    isSelecting = false;
                    if (Keyboard.Modifiers == ModifierKeys.Control &&
                        ZoomByShiftAndCtrl)
                    {
                        DoZoom(1 / 1.2);
                    }
                    else if (Click != null)
                    {
                        Click.Invoke(this, e);
                    }
                }
            }
            if (isSelecting)
            {
                if (selectingStarted)
                {
                    if (!transformChangeRequested)
                    {
                        transformChangeRequested = true;
                        isSelecting      = false;
                        selectingStarted = false;
                        navigationCanvas.Children.Remove(selectArea);

                        if (masterPlot != null)
                        {
                            masterPlot.Children.Remove(plot);

                            double width  = Math.Abs(masterPlot.XFromLeft(selectStart.X) - masterPlot.XFromLeft(selectEnd.X));
                            double height = Math.Abs(masterPlot.YFromTop(selectStart.Y) - masterPlot.YFromTop(selectEnd.Y));
                            double xmin   = masterPlot.XFromLeft(Math.Min(selectStart.X, selectEnd.X));
                            double ymin   = masterPlot.YFromTop(Math.Max(selectStart.Y, selectEnd.Y));

                            masterPlot.SetPlotRect(new DataRect(xmin, ymin, xmin + width, ymin + height));
                            masterPlot.IsAutoFitEnabled = false;
                        }
                    }
                }
            }
            this.ReleaseMouseCapture();

            return(true);
        }
        private void ButtonPlay_Click(object sender, RoutedEventArgs e)
        {
            if (Group != null)
            {
                State = SoundPlayState.Playing;
            }

            RaisePlayStateChanged();

            if (Click != null)
            {
                Click.Invoke(this, new RoutedEventArgs());
            }
        }
Exemplo n.º 28
0
        public override void OnTouchUp()
        {
            base.OnTouchUp();

            if (!Enabled)
            {
                return;
            }

            if (!Toggleable)
            {
                IsPressed = false;
            }

            Click.Invoke(this);
        }
Exemplo n.º 29
0
 void Start()
 {
     Cost   = new ReactiveProperty <float>(Info.Cost);
     Amount = new ReactiveProperty <int>(0);
     GetComponent <Button>().onClick.AsObservable().Subscribe(_ =>
     {
         if (Click != null)
         {
             Click.Invoke(this, null);
         }
         Amount.Value += 1;
     });
     Amount.Subscribe(i => transform.Find("Owned number text").GetComponent <TextMeshProUGUI>().text = i.ToString());
     Cost.Subscribe(i => transform.Find("Price text").GetComponent <TextMeshProUGUI>().text          = i.ToString(CultureInfo.CurrentCulture));
     transform.Find("Name text").GetComponent <TextMeshProUGUI>().text = Info.Name;
 }
Exemplo n.º 30
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);

            if (!(e is MouseEventArgs))
            {
                return;
            }

            // case to MouseEventArgs so position and mousebutton clicked can be used
            var mea = (MouseEventArgs)e;

            // only continue if left mouse button was clicked
            if (mea.Button != MouseButtons.Left)
            {
                return;
            }

            int index = (mea.Y - 1) / (buttonHeight + 1);

            if (index < 0 || index >= buttons.Count)
            {
                return;
            }

            OutlookBarButton button = buttons[index];

            if (button == null)
            {
                return;
            }
            if (!button.Enabled)
            {
                return;
            }

            // ok, all checks passed so assign the new selected button
            // and raise the event
            SelectedButton = button;

            var bce = new ButtonClickEventArgs(selectedButton, mea);

            if (Click != null) // only invoke on left mouse click
            {
                Click.Invoke(this, bce);
            }
        }