private void OnClicked() { if (Click != null) { Click.Invoke(this); } }
/// <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); } }
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); } }
internal static void HandleMouseEvent(Point point, ActionType screenActionType) { MouseEvent me = actionMap[screenActionType]; Click clicker = me.clicker; clicker.Invoke(me.device, point); }
private void btnSifaris_Click(object sender, EventArgs e) { if (Click != null) { Click.Invoke(this, e); } }
public void OnClick() { if (Click != null) { Click.Invoke(this, EventArgs.Empty); } }
private void UserControl_MouseUp(object sender, MouseButtonEventArgs e) { if (Clicked && Click != null) { Click.Invoke(sender, (RoutedEventArgs)(e)); } }
private void Hotspot_Click(object sender, EventArgs e) { if (Click != null) { Click.Invoke(sender, e); } }
/// <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); } }
private void DoClick() { if (Click != null) { Click.Invoke(this, EventArgs.Empty); } }
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)); } }
//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// internal void ClickInvoke(EventArgs e) { if (Click != null) { Click.Invoke(this, e); } }
public void InvokeMouseClick(EventArgs e) { if (Click != null) { Click.Invoke(this, e); } }
public void OnPointerClick(PointerEventData eventData) { Debug.Log("Click intercepted! " + eventData.pointerPress.name); if (Click != null) { Click.Invoke(this); } }
void ObjetoItem_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (clicando) { Click.Invoke(sender, new EventArgs()); } clicando = false; }
protected override void OnPointerReleased(PointerRoutedEventArgs e) { VisualStateManager.GoToState(this, "PointerUp", true); this.ReleasePointerCapture(e.Pointer); if (Click != null) { Click.Invoke(this, new EventArgs()); } }
protected void OnClick(object sender, EventArgs e) { CardEventArgs ea = new CardEventArgs(); ea.card = card; if (Click != null) { Click.Invoke(this, ea); } }
private void UserControl1_MouseUp(object sender, MouseEventArgs e) { mouseDown = false; this.Invalidate(); if (mouseHover && Click != null) { Click.Invoke(this, new EventArgs()); } }
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); } }
protected override void OnMouseDown(MouseButtonEventArgs e) { base.OnMouseDown(e); ParentTaskbarIcon.CloseBalloon(); if (Click != null && e.LeftButton == MouseButtonState.Pressed) { Click.Invoke(this, EventArgs.Empty); } }
public void OnClick(int a) { if (Click != null) { Click.Invoke(a); } //Click(a);//这种方式也是可以的 MessageBox.Show("Click();"); }
/// <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(); } }
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()); } }
public override void OnTouchUp() { base.OnTouchUp(); if (!Enabled) { return; } if (!Toggleable) { IsPressed = false; } Click.Invoke(this); }
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; }
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); } }