From 375b488be2666cd56e70728624f4eadaefee0440 Mon Sep 17 00:00:00 2001
From: chenghaoran <chenghaoran@ipilotwhale.com>
Date: 星期二, 12 三月 2024 17:36:49 +0800
Subject: [PATCH] 优化项目结构;
---
WPFProject/UI/Test/FunctionSetting.xaml.cs | 80 ++++++++++++++++++++--------------------
1 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/UI/Test/FunctionSetting.xaml.cs b/WPFProject/UI/Test/FunctionSetting.xaml.cs
similarity index 99%
rename from UI/Test/FunctionSetting.xaml.cs
rename to WPFProject/UI/Test/FunctionSetting.xaml.cs
index eada342..45dd614 100644
--- a/UI/Test/FunctionSetting.xaml.cs
+++ b/WPFProject/UI/Test/FunctionSetting.xaml.cs
@@ -24,22 +24,22 @@
/// <summary>
/// FunctionSetting.xaml 鐨勪氦浜掗�昏緫
/// </summary>
- public partial class FunctionSetting : UserControl, INotifyPropertyChanged
- {
- public virtual event PropertyChangedEventHandler PropertyChanged;
-
- protected virtual void RaisePropertyChanged(string name)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
- }
-
- protected void RaiseAndSetIfChanged<T>(ref T old, T @new, [CallerMemberName] string propertyName = null)
- {
- old = @new;
- if (propertyName != null)
- {
- RaisePropertyChanged(propertyName);
- }
+ public partial class FunctionSetting : UserControl, INotifyPropertyChanged
+ {
+ public virtual event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void RaisePropertyChanged(string name)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
+ }
+
+ protected void RaiseAndSetIfChanged<T>(ref T old, T @new, [CallerMemberName] string propertyName = null)
+ {
+ old = @new;
+ if (propertyName != null)
+ {
+ RaisePropertyChanged(propertyName);
+ }
}
public FunctionSetting()
@@ -50,29 +50,29 @@
public DdDragHandler dragHandler { get; set; } = new DdDragHandler();
- private ObservableCollection<FuncModel> _FuncModels = new ObservableCollection<FuncModel>() {
-
- new FuncModel(){
- Name = "111",
- Children = new ObservableCollection<FuncModel>(){
- new FuncModel(){ Name = "1123"},
- new FuncModel(){ Name = "1223"},
- }
- },
- new FuncModel()
- {
- Name = "222",
- Children = new ObservableCollection<FuncModel>(){
- new FuncModel(){ Name = "2123"},
- new FuncModel(){ Name = "2223"},
- }
- }
- };
-
- public ObservableCollection<FuncModel> FuncModels
- {
- get { return _FuncModels; }
- set => RaiseAndSetIfChanged(ref _FuncModels, value);
- }
+ private ObservableCollection<FuncModel> _FuncModels = new ObservableCollection<FuncModel>() {
+
+ new FuncModel(){
+ Name = "111",
+ Children = new ObservableCollection<FuncModel>(){
+ new FuncModel(){ Name = "1123"},
+ new FuncModel(){ Name = "1223"},
+ }
+ },
+ new FuncModel()
+ {
+ Name = "222",
+ Children = new ObservableCollection<FuncModel>(){
+ new FuncModel(){ Name = "2123"},
+ new FuncModel(){ Name = "2223"},
+ }
+ }
+ };
+
+ public ObservableCollection<FuncModel> FuncModels
+ {
+ get { return _FuncModels; }
+ set => RaiseAndSetIfChanged(ref _FuncModels, value);
+ }
}
}
--
Gitblit v1.9.1