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/SequnceList.xaml.cs | 194 ++++++++++++++++++++++++------------------------
1 files changed, 97 insertions(+), 97 deletions(-)
diff --git a/UI/Test/SequnceList.xaml.cs b/WPFProject/UI/Test/SequnceList.xaml.cs
similarity index 99%
rename from UI/Test/SequnceList.xaml.cs
rename to WPFProject/UI/Test/SequnceList.xaml.cs
index 7baf5b2..19c8bb9 100644
--- a/UI/Test/SequnceList.xaml.cs
+++ b/WPFProject/UI/Test/SequnceList.xaml.cs
@@ -1,97 +1,97 @@
-锘縰sing AIStudio.Wpf.Controls;
-using GongSolutions.Wpf.DragDrop;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Windows.Controls;
-using WPFProject.Models;
-using WPFProject.Utils;
-
-namespace WPFProject.UI.Test
-{
-
-
- /// <summary>
- /// SequnceList.xaml 鐨勪氦浜掗�昏緫
- /// </summary>
- public partial class SequnceList : 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 SequnceList()
- {
- DataContext = this;
-
- Sequences = new ObservableCollection<Sequence>
- {
- new Sequence{ Name="SSSSS"},
- new Sequence{ Name="SSSSS2"},
- };
-
- Steps = Sequences[0].Steps;
-
- InitializeComponent();
- }
- private ObservableCollection<Program> _ps = new ObservableCollection<Program>();
- public ObservableCollection<Program> Ps
- {
- get => _ps;
- set => RaiseAndSetIfChanged(ref _ps, value);
- }
-
-
- private ObservableCollection<Sequence> _Sequences;
- public ObservableCollection<Sequence> Sequences
- {
- get => _Sequences;
- set
- {
- if (value != null && value.Count > 0)
- {
- Steps = value[0].Steps;
- }
- else {
- Steps = null;
- }
- RaiseAndSetIfChanged(ref _Sequences, value);
- }
- }
-
- private ObservableCollection<Step> _Steps;
- public ObservableCollection<Step> Steps
- {
- get => _Steps;
- set => RaiseAndSetIfChanged(ref _Steps, value);
- }
-
-
- public void Selected_Program_Changed(object sender, Program program)
- {
- this.Sequences = program.Sequences;
- }
-
- private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- if (e.AddedItems.Count > 0)
- {
- Steps = (e.AddedItems[0] as Sequence).Steps;
- }
- }
-
- public IDropTarget dropHandler { get; set; } = new DdDropHandler();
-
- }
-}
+锘縰sing AIStudio.Wpf.Controls;
+using GongSolutions.Wpf.DragDrop;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Windows.Controls;
+using WPFProject.Models;
+using WPFProject.Utils;
+
+namespace WPFProject.UI.Test
+{
+
+
+ /// <summary>
+ /// SequnceList.xaml 鐨勪氦浜掗�昏緫
+ /// </summary>
+ public partial class SequnceList : 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 SequnceList()
+ {
+ DataContext = this;
+
+ Sequences = new ObservableCollection<Sequence>
+ {
+ new Sequence{ Name="SSSSS"},
+ new Sequence{ Name="SSSSS2"},
+ };
+
+ Steps = Sequences[0].Steps;
+
+ InitializeComponent();
+ }
+ private ObservableCollection<Program> _ps = new ObservableCollection<Program>();
+ public ObservableCollection<Program> Ps
+ {
+ get => _ps;
+ set => RaiseAndSetIfChanged(ref _ps, value);
+ }
+
+
+ private ObservableCollection<Sequence> _Sequences;
+ public ObservableCollection<Sequence> Sequences
+ {
+ get => _Sequences;
+ set
+ {
+ if (value != null && value.Count > 0)
+ {
+ Steps = value[0].Steps;
+ }
+ else {
+ Steps = null;
+ }
+ RaiseAndSetIfChanged(ref _Sequences, value);
+ }
+ }
+
+ private ObservableCollection<Step> _Steps;
+ public ObservableCollection<Step> Steps
+ {
+ get => _Steps;
+ set => RaiseAndSetIfChanged(ref _Steps, value);
+ }
+
+
+ public void Selected_Program_Changed(object sender, Program program)
+ {
+ this.Sequences = program.Sequences;
+ }
+
+ private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ if (e.AddedItems.Count > 0)
+ {
+ Steps = (e.AddedItems[0] as Sequence).Steps;
+ }
+ }
+
+ public IDropTarget dropHandler { get; set; } = new DdDropHandler();
+
+ }
+}
--
Gitblit v1.9.1