alielie
2026-09-10 9ec80cafc23f5ee3278cacce3c9f86f4087b435a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using System.Windows;
using System.Windows.Controls;
 
namespace OpenTapEditor
{
    /// <summary>
    /// DebuggerBtn.xaml 的交互逻辑
    /// </summary>
    public partial class DebuggerBtn : UserControl
    {
 
        public static DependencyProperty IsCurrentProperty = DependencyProperty.Register("IsCurrent",
            typeof(bool),
            typeof(DebuggerBtn),
            new PropertyMetadata(false));
 
        public static DependencyProperty InDebugProperty = DependencyProperty.Register("InDebug",
            typeof(bool),
            typeof(DebuggerBtn),
            new PropertyMetadata(false));
 
        public static DependencyProperty RunningProperty = DependencyProperty.Register("Running",
            typeof(bool),
            typeof(DebuggerBtn),
            new PropertyMetadata(false));
 
        public static DependencyProperty StepIdProperty = DependencyProperty.Register("StepId",
            typeof(Guid),
            typeof(DebuggerBtn),
            new PropertyMetadata(default(Guid)));
 
        public event EventHandler HandleClick;
 
 
        public bool IsCurrent
        {
            get => (bool)GetValue(IsCurrentProperty);
            set
            {
                SetValue(IsCurrentProperty, value);
            }
        }
 
        public bool InDebug
        {
            get => (bool)GetValue(InDebugProperty);
            set
            {
                SetValue(InDebugProperty, value);
            }
        }
 
        public bool Running
        {
            get => (bool)GetValue(RunningProperty);
            set
            {
                SetValue(RunningProperty, value);
            }
        }
 
        public Guid StepId
        {
            get => (Guid)GetValue(StepIdProperty);
            set
            {
                SetValue(StepIdProperty, value);
            }
        }
 
        public DebuggerBtn()
        {
            InitializeComponent();
        }
 
        private void border_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            HandleClick?.Invoke(this, new EventArgs());
            e.Handled = true;
        }
    }
}