11using CommunityToolkit . Mvvm . ComponentModel ;
22using CommunityToolkit . Mvvm . Input ;
33using NeeView . Properties ;
4+ using NeeView . Windows . Property ;
45using System ;
56using System . ComponentModel ;
67using System . Diagnostics . CodeAnalysis ;
@@ -26,6 +27,7 @@ public enum EditCommandWindowTab
2627 [ INotifyPropertyChanged ]
2728 public partial class EditCommandWindow : Window
2829 {
30+ private readonly PropertyDocument _generalDocument ;
2931 private CommandCollection _memento ;
3032 private string _key ;
3133 private bool _isShowMessage ;
@@ -36,6 +38,10 @@ public EditCommandWindow(string key, EditCommandWindowTab start)
3638 InitializeComponent ( ) ;
3739 this . DataContext = this ;
3840
41+ _generalDocument = new PropertyDocument ( ) ;
42+ _generalDocument . AddProperty ( PropertyMemberElement . Create ( this , nameof ( IsShowMessage ) ) ) ;
43+ _generalDocument . SetVisualType < PropertyValue_Boolean > ( PropertyVisualType . ToggleSwitch ) ;
44+
3945 MouseHorizontalWheelService . SubscribeHorizontalWheelEvent ( this ) ;
4046
4147 this . Loaded += EditCommandWindow_Loaded ;
@@ -45,6 +51,7 @@ public EditCommandWindow(string key, EditCommandWindowTab start)
4551 }
4652
4753
54+ [ PropertyMember ( Name = "EditCommandWindow.Visible" ) ]
4855 public bool IsShowMessage
4956 {
5057 get => _isShowMessage ;
@@ -55,6 +62,8 @@ public bool IsShowMessage
5562
5663 public string Note { get ; private set ; }
5764
65+ public PropertyDocument GeneralDocument => _generalDocument ;
66+
5867
5968 private void EditCommandWindow_Loaded ( object ? sender , RoutedEventArgs e )
6069 {
0 commit comments