Ejemplo n.º 1
0
 /// <summary>Graph has been clicked.</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnClick(object sender, EventArgs e)
 {
     if (SingleClick != null)
     {
         SingleClick.Invoke(this, e);
     }
 }
Ejemplo n.º 2
0
 void InvokeSingleClick(MouseButtonUpEventArgs args)
 {
     try
     {
         SingleClick?.Invoke(args);
     }
     catch (Exception e)
     {
         Urho.IO.Log.Write(LogLevel.Warning,
                           $"There was an unexpected exception during the invocation of {nameof(SingleClick)}: {e.Message}");
     }
 }
Ejemplo n.º 3
0
        private IEnumerator WaitAndInvoke(int clickCount)
        {
            yield return(new WaitForSeconds(0.2f));

            if (clickCount == 1)
            {
                SingleClick?.Invoke();
            }
            else if (clickCount == 2)
            {
                DoubleClick?.Invoke();
            }
            LastClick?.Invoke(clickCount);
        }
Ejemplo n.º 4
0
 /// <summary>Graph has been clicked.</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnChartClick(object sender, OxyMouseDownEventArgs e)
 {
     e.Handled    = false;
     inRightClick = e.ChangedButton == OxyMouseButton.Right;
     if (e.ChangedButton == OxyMouseButton.Left) /// Left clicks only
     {
         if (e.ClickCount == 1 && SingleClick != null)
         {
             SingleClick.Invoke(this, e);
         }
         else if (e.ClickCount == 2)
         {
             OnMouseDoubleClick(sender, e);
         }
     }
 }
Ejemplo n.º 5
0
 /// <summary>Graph has been clicked.</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnChartClick(object sender, OxyMouseDownEventArgs e)
 {
     Gdk.EventButton button;
     e.Handled = false;
     if (e.ChangedButton == OxyMouseButton.Left) /// Left clicks only
     {
         if (e.ClickCount == 1 && SingleClick != null)
         {
             SingleClick.Invoke(this, e);
         }
         else /// Enable this when OxyPlot is fixed if (e.ClickCount == 2)
         {
             OnMouseDoubleClick(sender, e);
         }
     }
 }