using CommunityToolkit.Mvvm.ComponentModel; using NationalInstruments.TestStand.Interop.API; using System.ComponentModel; using System.Windows.Controls; using Plugin.SeqEditor.Constant; using Plugin.SeqEditor.Entity; using Plugin.SeqEditor.Util; namespace Plugin.SeqEditor.SettingPanel { /// /// CommonProperty.xaml 的交互逻辑 /// [INotifyPropertyChanged] public partial class CommonProperty : UserControl { public event EventHandler SettingChanged; public StepUI stepUI; public Step step; public PropertyObject propertyObject; protected void CustomPropertyChanged(string name) { OnPropertyChanged(name); SettingChanged?.Invoke(this, EventArgs.Empty); } public CommonProperty() { DataContext = this; InitializeComponent(); CbAdapter.ItemsSource = StepAdapterData.ItemSource; } public void RefreshStep(StepUI stepUI) { this.stepUI = stepUI; this.step = stepUI.step; propertyObject = this.step?.AsPropertyObject(); this.DataContext = stepUI; } } }