UpDownView.xaml.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace AIPractice.LabelEditor
  16. {
  17. public enum UpDown
  18. {
  19. Up,
  20. Down
  21. }
  22. /// <summary>
  23. /// Interaction logic for UpDownView.xaml
  24. /// </summary>
  25. public partial class UpDownView : UserControl
  26. {
  27. public event EventHandler<UpDown> UpDownClick;
  28. public UpDownView()
  29. {
  30. InitializeComponent();
  31. }
  32. protected virtual void OnUpClick(object sender, RoutedEventArgs e)
  33. {
  34. UpDownClick?.Invoke(this, UpDown.Up);
  35. }
  36. protected virtual void OnDownClick(object sender, RoutedEventArgs e)
  37. {
  38. UpDownClick?.Invoke(this, UpDown.Down);
  39. }
  40. }
  41. }