//EVENT clicked private void ButtonClicked(object sender, ClockButtonEventArgs e) { double x = e.getX - circChoosen.Width / 2; double y = e.getY - circChoosen.Height / 2; double w = circChoosen.Width; double h = circChoosen.Height; double xc = x + w / 2; double yc = y + h / 2; circChoosen.Visibility = Visibility.Visible; Canvas.SetLeft(circChoosen, x); Canvas.SetTop(circChoosen, y); lineChoosen.Visibility = Visibility.Visible; lineChoosen.X2 = xc; lineChoosen.Y2 = yc; if (drawH == true) { hour = e.getContent; } else { min = e.getContent; } OnTimeChanged(new TimeEventArgs(hour, min)); }
protected virtual void OnButtonClick(ClockButtonEventArgs e) { EventHandler <ClockButtonEventArgs> handler = Click; if (handler != null) { handler(this, e); } }