From 375b488be2666cd56e70728624f4eadaefee0440 Mon Sep 17 00:00:00 2001
From: chenghaoran <chenghaoran@ipilotwhale.com>
Date: 星期二, 12 三月 2024 17:36:49 +0800
Subject: [PATCH] 优化项目结构;
---
WPFProject/Style/MainTab.xaml | 18
VisionBuilder.Core/Entity/Param.cs | 22
WPFProject/MainWindow.xaml.cs | 0
WPFProject/test.xml | 128
WPFProject/UI/Test/ProgramList.xaml.cs | 158 +-
WPFProject/UI/Test/FunctionSetting.xaml | 108
WPFProject/ViewModels/ProgramListViewModel.cs | 0
WPFProject/UI/Test/SequnceList.xaml | 452 +++---
WPFProject/Controls/MenuTabControl.xaml | 0
WPFProject/Models/Step.cs | 75 +
WPFProject/Models/NotifyBase.cs | 62
WPFProject/UI/StepSetting.xaml | 2
WPFProject/UI/Test/FunctionSetting.xaml.cs | 80
VisionBuilder.Core/Api/ISequnce.cs | 19
WPFProject/Utils/DdDragHandler.cs | 40
WPFProject/Models/Program.cs | 168 +-
WPFProject/UI/WorkWindow.xaml | 0
WPFProject/Style/CommonTree.xaml | 100
WPFProject/Style/WindowResources.xaml | 0
WPFProject/Controls/DpPlugin.cs | 0
WPFProject/UI/WorkWindow.xaml.cs | 0
WPFProject/Utils/Resize.cs | 34
WPFProject/Properties/Settings.Designer.cs | 0
WPFProject/Resources/Font/Font.xaml | 0
WPFProject/Models/CanvasPosition.cs | 0
WPFProject/UI/WorkControl.xaml | 0
WPFProject/Utils/IPlugin.cs | 0
WPFProject/Properties/Resources.resx | 0
WPFProject/App.config | 0
WPFProject/Controls/MinInnerWindow.xaml.cs | 0
WPFProject/Controls/InnerWindow.xaml | 0
WPFProject/MainWindow.xaml | 0
WPFProject/App.xaml | 0
WPFProject/UI/BottomBar.xaml.cs | 0
WPFProject/packages.config | 30
VisionBuilder.Test/PluginOne.cs | 14
WPFProject/UI/Test/SequnceList.xaml.cs | 194 +-
WPFProject/UI/TestWindow.xaml | 0
WPFProject/UI/StepSetting.xaml.cs | 0
WPFProject/Style/ListViewStyle.xaml | 0
VisionBuilder.Core/VisionBuilder.Core.csproj | 52
WPFProject/Controls/IconTabItem.cs | 140 +-
WPFProject/Controls/MinInnerWindow.xaml | 0
WPFProject/Resources/Icon/xinzeng_1.png | 0
WPFProject/Style/Colors.xaml | 0
WPFProject/Utils/XmlUtil.cs | 82
WPFProject/Controls/InnerWindow.xaml.cs | 92
.gitignore | 1
VisionBuilder.Engine/Properties/AssemblyInfo.cs | 36
VisionBuilder.Core/Api/IProgram.cs | 7
VisionBuilder.Core/Properties/AssemblyInfo.cs | 36
WPFProject/Resources/Font/iconfont.ttf | 0
WPFProject/Events/TabChange.cs | 0
WPFProject/Utils/Win32Helper.cs | 0
WPFProject/WPFProject.csproj | 608 ++++----
VisionBuilder.Test/VisionBuilder.Test.csproj | 54
VisionBuilder.Core/Api/IStepRunner.cs | 10
WPFProject/Utils/DdDropHandler.cs | 188 +-
WPFProject/UI/BottomBar.xaml | 0
WPFProject/UI/TestWindow.xaml.cs | 0
WPFProject/Utils/CanvasHelper.cs | 0
VisionBuilder.Engine/VisionBuilder.Engine.csproj | 54
WPFProject/Properties/Settings.settings | 0
WPFProject/WPFProject.sln | 43
WPFProject/Forms/Form1.Designer.cs | 0
VisionBuilder.Engine/Runner.cs | 12
WPFProject/Properties/Resources.Designer.cs | 0
WPFProject/Models/Variable.cs | 122
WPFProject/Forms/Form1.resx | 0
WPFProject/Controls/MenuTabControl.xaml.cs | 0
WPFProject/Models/Sequence.cs | 35
WPFProject/Forms/Form1.cs | 0
/dev/null | 31
WPFProject/Models/FuncModel.cs | 48
WPFProject/Properties/AssemblyInfo.cs | 0
WPFProject/UI/WorkControl.xaml.cs | 572 ++++----
WPFProject/App.xaml.cs | 16
VisionBuilder.Core/Api/IStep.cs | 7
VisionBuilder.Test/Properties/AssemblyInfo.cs | 36
WPFProject/UI/Test/ProgramList.xaml | 72
80 files changed, 2,255 insertions(+), 1,803 deletions(-)
diff --git a/.gitignore b/.gitignore
index f4dd080..bd4ebf4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,6 +16,7 @@
bld/
[Bb]in/
[Oo]bj/
+**/packages/
# Roslyn cache directories
*.ide/
diff --git a/Models/Step.cs b/Models/Step.cs
deleted file mode 100644
index 32e7dbc..0000000
--- a/Models/Step.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-锘縰sing System.Xml.Serialization;
-
-namespace WPFProject.Models
-{
- public class Step : NotifyBase
- {
- #region 瀛楁
- [XmlIgnore]
- public Program Program { get; set; }
-
- private int _Index;
- public int Index
- {
- get { return _Index; }
- set => RaiseAndSetIfChanged(ref _Index, value);
- }
-
- private string _Name;
- public string Name
- {
- get { return _Name; }
- set => RaiseAndSetIfChanged(ref _Name, value);
- }
-
- private string _DllPath;
- public string DllPath
- {
- get { return _DllPath; }
- set => RaiseAndSetIfChanged(ref _DllPath, value);
- }
-
- private string _ClassName;
- public string ClassName
- {
- get { return _ClassName; }
- set => RaiseAndSetIfChanged(ref _ClassName, value);
- }
-
- private string _MethodName;
- public string MethodName
- {
- get { return _MethodName; }
- set => RaiseAndSetIfChanged(ref _MethodName, value);
- }
-
- private string _Description;
- public string Description
- {
- get { return _Description; }
- set => RaiseAndSetIfChanged(ref _Description, value);
- }
-
- #endregion
-
- public void Run()
- {
-
-
- }
-
-
- }
-}
diff --git a/VisionBuilder.Core/Api/IProgram.cs b/VisionBuilder.Core/Api/IProgram.cs
new file mode 100644
index 0000000..5d7a4e3
--- /dev/null
+++ b/VisionBuilder.Core/Api/IProgram.cs
@@ -0,0 +1,7 @@
+锘縩amespace VisionBuilder.Core.Api
+{
+ public interface IProgram
+ {
+ void RunProgram();
+ }
+}
diff --git a/VisionBuilder.Core/Api/ISequnce.cs b/VisionBuilder.Core/Api/ISequnce.cs
new file mode 100644
index 0000000..9cdf060
--- /dev/null
+++ b/VisionBuilder.Core/Api/ISequnce.cs
@@ -0,0 +1,19 @@
+锘縰sing System.Collections.Generic;
+
+namespace VisionBuilder.Core.Api
+{
+ public interface ISequence
+ {
+ void SetSteps(List<IStep> steps);
+
+ IList<IStep> GetSteps();
+
+ ISequence AddStep(params IStep[] steps);
+
+ void SetPrograme(IProgram program);
+
+ IProgram GetProgram();
+
+ void RunSequnce();
+ }
+}
diff --git a/VisionBuilder.Core/Api/IStep.cs b/VisionBuilder.Core/Api/IStep.cs
new file mode 100644
index 0000000..bc8385b
--- /dev/null
+++ b/VisionBuilder.Core/Api/IStep.cs
@@ -0,0 +1,7 @@
+锘縩amespace VisionBuilder.Core.Api
+{
+ public interface IStep
+ {
+ void RunStep();
+ }
+}
diff --git a/VisionBuilder.Core/Api/IStepRunner.cs b/VisionBuilder.Core/Api/IStepRunner.cs
new file mode 100644
index 0000000..22ceb11
--- /dev/null
+++ b/VisionBuilder.Core/Api/IStepRunner.cs
@@ -0,0 +1,10 @@
+锘縰sing System.Collections.Generic;
+using VisionBuilder.Core.Entity;
+
+namespace VisionBuilder.Core.Api
+{
+ public interface IStepRunner
+ {
+ void RunStep(Dictionary<string, Param> param);
+ }
+}
diff --git a/VisionBuilder.Core/Entity/Param.cs b/VisionBuilder.Core/Entity/Param.cs
new file mode 100644
index 0000000..58b60f8
--- /dev/null
+++ b/VisionBuilder.Core/Entity/Param.cs
@@ -0,0 +1,22 @@
+锘縩amespace VisionBuilder.Core.Entity
+{
+ public class Param
+ {
+ private string _Name;
+
+ public string Name
+ {
+ get { return _Name; }
+ set { _Name = value; }
+ }
+
+ private string _Value;
+
+ public string Value
+ {
+ get { return _Value; }
+ set { _Value = value; }
+ }
+
+ }
+}
diff --git a/VisionBuilder.Core/Properties/AssemblyInfo.cs b/VisionBuilder.Core/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..921acd0
--- /dev/null
+++ b/VisionBuilder.Core/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+锘縰sing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 鏈夊叧绋嬪簭闆嗙殑涓�鑸俊鎭敱浠ヤ笅
+// 鎺у埗銆傛洿鏀硅繖浜涚壒鎬у�煎彲淇敼
+// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭��
+[assembly: AssemblyTitle("VisionBuilder.Core")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HP Inc.")]
+[assembly: AssemblyProduct("VisionBuilder.Core")]
+[assembly: AssemblyCopyright("Copyright 漏 HP Inc. 2024")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 灏� ComVisible 璁剧疆涓� false 浼氫娇姝ょ▼搴忛泦涓殑绫诲瀷
+//瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷
+//璇峰皢姝ょ被鍨嬬殑 ComVisible 鐗规�ц缃负 true銆�
+[assembly: ComVisible(false)]
+
+// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID
+[assembly: Guid("3e3bf44a-0b69-45c5-9512-528cb48a7106")]
+
+// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅鍒楀洓涓�肩粍鎴�:
+//
+// 涓荤増鏈�
+// 娆$増鏈�
+// 鐢熸垚鍙�
+// 淇鍙�
+//
+//鍙互鎸囧畾鎵�鏈夎繖浜涘�硷紝涔熷彲浠ヤ娇鐢ㄢ�滅敓鎴愬彿鈥濆拰鈥滀慨璁㈠彿鈥濈殑榛樿鍊�
+//閫氳繃浣跨敤 "*"锛屽涓嬫墍绀�:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/VisionBuilder.Core/VisionBuilder.Core.csproj b/VisionBuilder.Core/VisionBuilder.Core.csproj
new file mode 100644
index 0000000..f8dbc78
--- /dev/null
+++ b/VisionBuilder.Core/VisionBuilder.Core.csproj
@@ -0,0 +1,52 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{3E3BF44A-0B69-45C5-9512-528CB48A7106}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>VisionBuilder.Core</RootNamespace>
+ <AssemblyName>VisionBuilder.Core</AssemblyName>
+ <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <Deterministic>true</Deterministic>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Api\IProgram.cs" />
+ <Compile Include="Api\ISequnce.cs" />
+ <Compile Include="Api\IStep.cs" />
+ <Compile Include="Api\IStepRunner.cs" />
+ <Compile Include="Entity\Param.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
diff --git a/VisionBuilder.Engine/Properties/AssemblyInfo.cs b/VisionBuilder.Engine/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..e98d254
--- /dev/null
+++ b/VisionBuilder.Engine/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+锘縰sing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 鏈夊叧绋嬪簭闆嗙殑涓�鑸俊鎭敱浠ヤ笅
+// 鎺у埗銆傛洿鏀硅繖浜涚壒鎬у�煎彲淇敼
+// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭��
+[assembly: AssemblyTitle("VisionBuilder.Engine")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HP Inc.")]
+[assembly: AssemblyProduct("VisionBuilder.Engine")]
+[assembly: AssemblyCopyright("Copyright 漏 HP Inc. 2024")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 灏� ComVisible 璁剧疆涓� false 浼氫娇姝ょ▼搴忛泦涓殑绫诲瀷
+//瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷
+//璇峰皢姝ょ被鍨嬬殑 ComVisible 鐗规�ц缃负 true銆�
+[assembly: ComVisible(false)]
+
+// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID
+[assembly: Guid("8e5e8a68-0b9d-4a6a-b325-730c64603fdf")]
+
+// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅鍒楀洓涓�肩粍鎴�:
+//
+// 涓荤増鏈�
+// 娆$増鏈�
+// 鐢熸垚鍙�
+// 淇鍙�
+//
+//鍙互鎸囧畾鎵�鏈夎繖浜涘�硷紝涔熷彲浠ヤ娇鐢ㄢ�滅敓鎴愬彿鈥濆拰鈥滀慨璁㈠彿鈥濈殑榛樿鍊�
+//閫氳繃浣跨敤 "*"锛屽涓嬫墍绀�:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/VisionBuilder.Engine/Runner.cs b/VisionBuilder.Engine/Runner.cs
new file mode 100644
index 0000000..83114c1
--- /dev/null
+++ b/VisionBuilder.Engine/Runner.cs
@@ -0,0 +1,12 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace VisionBuilder.Engine
+{
+ public class Runner
+ {
+ }
+}
diff --git a/VisionBuilder.Engine/VisionBuilder.Engine.csproj b/VisionBuilder.Engine/VisionBuilder.Engine.csproj
new file mode 100644
index 0000000..3100f32
--- /dev/null
+++ b/VisionBuilder.Engine/VisionBuilder.Engine.csproj
@@ -0,0 +1,54 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{8E5E8A68-0B9D-4A6A-B325-730C64603FDF}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>VisionBuilder.Engine</RootNamespace>
+ <AssemblyName>VisionBuilder.Engine</AssemblyName>
+ <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <Deterministic>true</Deterministic>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Runner.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\VisionBuilder.Core\VisionBuilder.Core.csproj">
+ <Project>{3e3bf44a-0b69-45c5-9512-528cb48a7106}</Project>
+ <Name>VisionBuilder.Core</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
diff --git a/VisionBuilder.Test/PluginOne.cs b/VisionBuilder.Test/PluginOne.cs
new file mode 100644
index 0000000..c11bb3b
--- /dev/null
+++ b/VisionBuilder.Test/PluginOne.cs
@@ -0,0 +1,14 @@
+锘縰sing System.Collections.Generic;
+using VisionBuilder.Core.Api;
+using VisionBuilder.Core.Entity;
+
+namespace VisionBuilder.Test
+{
+ public class PluginOne : IStepRunner
+ {
+ public void RunStep(Dictionary<string, Param> param)
+ {
+ param["yoho"] = new Param { Name = "1", Value = "2" };
+ }
+ }
+}
diff --git a/VisionBuilder.Test/Properties/AssemblyInfo.cs b/VisionBuilder.Test/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..3fc0b33
--- /dev/null
+++ b/VisionBuilder.Test/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+锘縰sing System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 鏈夊叧绋嬪簭闆嗙殑涓�鑸俊鎭敱浠ヤ笅
+// 鎺у埗銆傛洿鏀硅繖浜涚壒鎬у�煎彲淇敼
+// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭��
+[assembly: AssemblyTitle("VisionBuilder.Test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HP Inc.")]
+[assembly: AssemblyProduct("VisionBuilder.Test")]
+[assembly: AssemblyCopyright("Copyright 漏 HP Inc. 2024")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 灏� ComVisible 璁剧疆涓� false 浼氫娇姝ょ▼搴忛泦涓殑绫诲瀷
+//瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷
+//璇峰皢姝ょ被鍨嬬殑 ComVisible 鐗规�ц缃负 true銆�
+[assembly: ComVisible(false)]
+
+// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID
+[assembly: Guid("6e1cc97a-b3cb-4e9f-94e0-f264de0d8298")]
+
+// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅鍒楀洓涓�肩粍鎴�:
+//
+// 涓荤増鏈�
+// 娆$増鏈�
+// 鐢熸垚鍙�
+// 淇鍙�
+//
+//鍙互鎸囧畾鎵�鏈夎繖浜涘�硷紝涔熷彲浠ヤ娇鐢ㄢ�滅敓鎴愬彿鈥濆拰鈥滀慨璁㈠彿鈥濈殑榛樿鍊�
+//閫氳繃浣跨敤 "*"锛屽涓嬫墍绀�:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/VisionBuilder.Test/VisionBuilder.Test.csproj b/VisionBuilder.Test/VisionBuilder.Test.csproj
new file mode 100644
index 0000000..e0e52f2
--- /dev/null
+++ b/VisionBuilder.Test/VisionBuilder.Test.csproj
@@ -0,0 +1,54 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{6E1CC97A-B3CB-4E9F-94E0-F264DE0D8298}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>VisionBuilder.Test</RootNamespace>
+ <AssemblyName>VisionBuilder.Test</AssemblyName>
+ <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <Deterministic>true</Deterministic>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Net.Http" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="PluginOne.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\VisionBuilder.Core\VisionBuilder.Core.csproj">
+ <Project>{3e3bf44a-0b69-45c5-9512-528cb48a7106}</Project>
+ <Name>VisionBuilder.Core</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>
\ No newline at end of file
diff --git a/WPFProject.sln b/WPFProject.sln
deleted file mode 100644
index e3c645a..0000000
--- a/WPFProject.sln
+++ /dev/null
@@ -1,31 +0,0 @@
-锘�
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.8.34408.163
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFProject", "WPFProject.csproj", "{D47D2314-5DD5-4899-ADF9-15ED057289D3}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisionBuilder.Core", "..\VisionBuilder.Core\VisionBuilder.Core.csproj", "{65100B0E-1EBA-4534-AC73-61AD3AE6AB36}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D47D2314-5DD5-4899-ADF9-15ED057289D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D47D2314-5DD5-4899-ADF9-15ED057289D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D47D2314-5DD5-4899-ADF9-15ED057289D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D47D2314-5DD5-4899-ADF9-15ED057289D3}.Release|Any CPU.Build.0 = Release|Any CPU
- {65100B0E-1EBA-4534-AC73-61AD3AE6AB36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {65100B0E-1EBA-4534-AC73-61AD3AE6AB36}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {65100B0E-1EBA-4534-AC73-61AD3AE6AB36}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {65100B0E-1EBA-4534-AC73-61AD3AE6AB36}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {784CEA1D-A890-4625-B0C1-72294A6B4803}
- EndGlobalSection
-EndGlobal
diff --git a/App.config b/WPFProject/App.config
similarity index 100%
rename from App.config
rename to WPFProject/App.config
diff --git a/App.xaml b/WPFProject/App.xaml
similarity index 100%
rename from App.xaml
rename to WPFProject/App.xaml
diff --git a/App.xaml.cs b/WPFProject/App.xaml.cs
similarity index 99%
rename from App.xaml.cs
rename to WPFProject/App.xaml.cs
index 58430ef..437e4c9 100644
--- a/App.xaml.cs
+++ b/WPFProject/App.xaml.cs
@@ -13,15 +13,15 @@
/// </summary>
public partial class App : Application
{
- public void test()
+ public void test()
{
- }
-
- private void Application_Startup(object sender, StartupEventArgs e)
- {
- MainWindow window = new MainWindow();
- window.Show();
- }
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ MainWindow window = new MainWindow();
+ window.Show();
+ }
}
}
diff --git a/Controls/DpPlugin.cs b/WPFProject/Controls/DpPlugin.cs
similarity index 100%
rename from Controls/DpPlugin.cs
rename to WPFProject/Controls/DpPlugin.cs
diff --git a/Controls/IconTabItem.cs b/WPFProject/Controls/IconTabItem.cs
similarity index 99%
rename from Controls/IconTabItem.cs
rename to WPFProject/Controls/IconTabItem.cs
index 559eaa5..1c5faa3 100644
--- a/Controls/IconTabItem.cs
+++ b/WPFProject/Controls/IconTabItem.cs
@@ -1,70 +1,70 @@
-锘縰sing System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-
-namespace WPFProject.Controls
-{
- public class IconTabItem : TabItem, INotifyPropertyChanged
- {
- public 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 IconTabItem() : base()
- {
- Visibility = Visibility.Collapsed;
- }
-
- private bool _isFont;
- public bool IsFont
- {
- get => _isFont;
- set => _isFont = value;
- }
-
- private Window _Body;
- public Window Body
- {
- get => _Body;
- set => _Body = value;
- }
-
- public BitmapImage Icon
- {
- get { return (BitmapImage)GetValue(IconProperty); }
- set { SetValue(IconProperty, value); }
- }
-
- public static readonly DependencyProperty IconProperty =
- DependencyProperty.Register("Icon", typeof(BitmapImage), typeof(IconTabItem), new PropertyMetadata(
- new BitmapImage(new System.Uri("pack://application:,,,/Resources/Icon/xinzeng_1.png"))));
-
-
- // 鍗旽eader鐨勫瓧浣撳ぇ灏�
- public double HeaderFontSize
- {
- get { return (double)GetValue(HeaderFontSizeProperty); }
- set { SetValue(HeaderFontSizeProperty, value); }
- }
-
- // Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
- public static readonly DependencyProperty HeaderFontSizeProperty =
- DependencyProperty.Register("HeaderFontSize", typeof(double), typeof(IconTabItem), new PropertyMetadata(10.0));
-
- }
-}
+锘縰sing System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+
+namespace WPFProject.Controls
+{
+ public class IconTabItem : TabItem, INotifyPropertyChanged
+ {
+ public 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 IconTabItem() : base()
+ {
+ Visibility = Visibility.Collapsed;
+ }
+
+ private bool _isFont;
+ public bool IsFont
+ {
+ get => _isFont;
+ set => _isFont = value;
+ }
+
+ private Window _Body;
+ public Window Body
+ {
+ get => _Body;
+ set => _Body = value;
+ }
+
+ public BitmapImage Icon
+ {
+ get { return (BitmapImage)GetValue(IconProperty); }
+ set { SetValue(IconProperty, value); }
+ }
+
+ public static readonly DependencyProperty IconProperty =
+ DependencyProperty.Register("Icon", typeof(BitmapImage), typeof(IconTabItem), new PropertyMetadata(
+ new BitmapImage(new System.Uri("pack://application:,,,/Resources/Icon/xinzeng_1.png"))));
+
+
+ // 鍗旽eader鐨勫瓧浣撳ぇ灏�
+ public double HeaderFontSize
+ {
+ get { return (double)GetValue(HeaderFontSizeProperty); }
+ set { SetValue(HeaderFontSizeProperty, value); }
+ }
+
+ // Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
+ public static readonly DependencyProperty HeaderFontSizeProperty =
+ DependencyProperty.Register("HeaderFontSize", typeof(double), typeof(IconTabItem), new PropertyMetadata(10.0));
+
+ }
+}
diff --git a/Controls/InnerWindow.xaml b/WPFProject/Controls/InnerWindow.xaml
similarity index 100%
rename from Controls/InnerWindow.xaml
rename to WPFProject/Controls/InnerWindow.xaml
diff --git a/Controls/InnerWindow.xaml.cs b/WPFProject/Controls/InnerWindow.xaml.cs
similarity index 99%
rename from Controls/InnerWindow.xaml.cs
rename to WPFProject/Controls/InnerWindow.xaml.cs
index 6c89b76..b665787 100644
--- a/Controls/InnerWindow.xaml.cs
+++ b/WPFProject/Controls/InnerWindow.xaml.cs
@@ -20,7 +20,7 @@
/// InnerWindow.xaml 鐨勪氦浜掗�昏緫
/// </summary>
public partial class InnerWindow : UserControl, INotifyPropertyChanged
- {
+ {
#region INotifyPropertyChanged
public virtual event PropertyChangedEventHandler PropertyChanged;
@@ -36,45 +36,45 @@
{
RaisePropertyChanged(propertyName);
}
- }
+ }
#endregion
-
+
#region 灞炴��
-
+
#region Common
public DragType DragType { get; set; } = DragType.Canvas;
public CanvasPosition canvasPosition;
private Canvas canvas;
public WindowState WindowState { get; set; } = WindowState.Normal;
- public AdornerDecorator ResizeAdornerDecorator { get => VisualTreeHelper.GetChild(this, 0) as AdornerDecorator; }
-
+ public AdornerDecorator ResizeAdornerDecorator { get => VisualTreeHelper.GetChild(this, 0) as AdornerDecorator; }
+
private string _Title;
public string Title
{
get { return _Title; }
set => RaiseAndSetIfChanged(ref _Title, value);
- }
-
+ }
+
public int Zindex
{
- get
+ get
{
return Canvas.GetZIndex(this);
}
set
{
Canvas.SetZIndex(this, value);
- }
- }
- #endregion
-
+ }
+ }
+ #endregion
+
#region 浜嬩欢
public event EventHandler MinEvent;
public event EventHandler MaxEvent;
public event EventHandler CloseEvent;
- public event EventHandler ZIndexEvent;
- #endregion
-
+ public event EventHandler ZIndexEvent;
+ #endregion
+
#region DependencyProperty
public Brush HeaderBackground
{
@@ -94,11 +94,11 @@
public static readonly DependencyProperty HeaderFontColorProperty =
DependencyProperty.Register("HeaderFontColor", typeof(Brush), typeof(ProgramList),
- new PropertyMetadata(new SolidColorBrush(Color.FromRgb(255, 255, 225))));
- #endregion
-
- #endregion
-
+ new PropertyMetadata(new SolidColorBrush(Color.FromRgb(255, 255, 225))));
+ #endregion
+
+ #endregion
+
public InnerWindow() : this(null)
{
@@ -131,8 +131,8 @@
};
}
Loaded -= InnerWindow_Loaded;
- }
-
+ }
+
#region 鎷栨嫿绉诲姩鐩稿叧
private void DragDelta(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e)
{
@@ -179,7 +179,7 @@
{
canvasPosition.Top = Canvas.GetTop(this);
canvasPosition.Left = Canvas.GetLeft(this);
- }
+ }
#endregion
/// <summary>
@@ -205,22 +205,22 @@
Canvas.SetLeft(this, canvasPosition == null ? 0 : canvasPosition.Left);
Canvas.SetTop(this, canvasPosition == null ? 0 : canvasPosition.Top);
canvas.SizeChanged += Canvas_SizeChanged;
- }
-
- private void Canvas_SizeChanged(object sender, SizeChangedEventArgs e)
- {
- Size newSize = e.NewSize;
- Size previousSize = e.PreviousSize;
-
- double xRate = newSize.Width / previousSize.Width;
- double yRate = newSize.Height / previousSize.Height;
-
- Canvas.SetLeft(this, Canvas.GetLeft(this) * xRate);
- Canvas.SetTop(this, Canvas.GetTop(this) * yRate);
- this.Width = this.Width * xRate;
- this.Height = this.Height * yRate;
- }
-
+ }
+
+ private void Canvas_SizeChanged(object sender, SizeChangedEventArgs e)
+ {
+ Size newSize = e.NewSize;
+ Size previousSize = e.PreviousSize;
+
+ double xRate = newSize.Width / previousSize.Width;
+ double yRate = newSize.Height / previousSize.Height;
+
+ Canvas.SetLeft(this, Canvas.GetLeft(this) * xRate);
+ Canvas.SetTop(this, Canvas.GetTop(this) * yRate);
+ this.Width = this.Width * xRate;
+ this.Height = this.Height * yRate;
+ }
+
private void Min_Click(object sender, RoutedEventArgs e)
{
MinEvent?.Invoke(this, null);
@@ -244,12 +244,12 @@
private void Grid_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
this.Focus();
- }
-
- private void UserControl_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
-
- }
+ }
+
+ private void UserControl_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+ {
+
+ }
}
public enum DragType
diff --git a/Controls/MenuTabControl.xaml b/WPFProject/Controls/MenuTabControl.xaml
similarity index 100%
rename from Controls/MenuTabControl.xaml
rename to WPFProject/Controls/MenuTabControl.xaml
diff --git a/Controls/MenuTabControl.xaml.cs b/WPFProject/Controls/MenuTabControl.xaml.cs
similarity index 100%
rename from Controls/MenuTabControl.xaml.cs
rename to WPFProject/Controls/MenuTabControl.xaml.cs
diff --git a/Controls/MinInnerWindow.xaml b/WPFProject/Controls/MinInnerWindow.xaml
similarity index 100%
rename from Controls/MinInnerWindow.xaml
rename to WPFProject/Controls/MinInnerWindow.xaml
diff --git a/Controls/MinInnerWindow.xaml.cs b/WPFProject/Controls/MinInnerWindow.xaml.cs
similarity index 100%
rename from Controls/MinInnerWindow.xaml.cs
rename to WPFProject/Controls/MinInnerWindow.xaml.cs
diff --git a/Events/TabChange.cs b/WPFProject/Events/TabChange.cs
similarity index 100%
rename from Events/TabChange.cs
rename to WPFProject/Events/TabChange.cs
diff --git a/Forms/Form1.Designer.cs b/WPFProject/Forms/Form1.Designer.cs
similarity index 100%
rename from Forms/Form1.Designer.cs
rename to WPFProject/Forms/Form1.Designer.cs
diff --git a/Forms/Form1.cs b/WPFProject/Forms/Form1.cs
similarity index 100%
rename from Forms/Form1.cs
rename to WPFProject/Forms/Form1.cs
diff --git a/Forms/Form1.resx b/WPFProject/Forms/Form1.resx
similarity index 100%
rename from Forms/Form1.resx
rename to WPFProject/Forms/Form1.resx
diff --git a/MainWindow.xaml b/WPFProject/MainWindow.xaml
similarity index 100%
rename from MainWindow.xaml
rename to WPFProject/MainWindow.xaml
diff --git a/MainWindow.xaml.cs b/WPFProject/MainWindow.xaml.cs
similarity index 100%
rename from MainWindow.xaml.cs
rename to WPFProject/MainWindow.xaml.cs
diff --git a/Models/CanvasPosition.cs b/WPFProject/Models/CanvasPosition.cs
similarity index 100%
rename from Models/CanvasPosition.cs
rename to WPFProject/Models/CanvasPosition.cs
diff --git a/Models/FuncModel.cs b/WPFProject/Models/FuncModel.cs
similarity index 99%
rename from Models/FuncModel.cs
rename to WPFProject/Models/FuncModel.cs
index cec83ef..c247261 100644
--- a/Models/FuncModel.cs
+++ b/WPFProject/Models/FuncModel.cs
@@ -1,24 +1,24 @@
-锘縰sing System.Collections.ObjectModel;
-
-namespace WPFProject.Models
-{
- public class FuncModel : NotifyBase
- {
- private string _Name;
-
- public string Name
- {
- get { return _Name; }
- set => RaiseAndSetIfChanged(ref _Name, value);
- }
-
- private ObservableCollection<FuncModel> _Children;
-
- public ObservableCollection<FuncModel> Children
- {
- get { return _Children; }
- set => RaiseAndSetIfChanged(ref _Children, value);
- }
-
- }
-}
+锘縰sing System.Collections.ObjectModel;
+
+namespace WPFProject.Models
+{
+ public class FuncModel : NotifyBase
+ {
+ private string _Name;
+
+ public string Name
+ {
+ get { return _Name; }
+ set => RaiseAndSetIfChanged(ref _Name, value);
+ }
+
+ private ObservableCollection<FuncModel> _Children;
+
+ public ObservableCollection<FuncModel> Children
+ {
+ get { return _Children; }
+ set => RaiseAndSetIfChanged(ref _Children, value);
+ }
+
+ }
+}
diff --git a/Models/NotifyBase.cs b/WPFProject/Models/NotifyBase.cs
similarity index 99%
rename from Models/NotifyBase.cs
rename to WPFProject/Models/NotifyBase.cs
index ee510a3..4dd2709 100644
--- a/Models/NotifyBase.cs
+++ b/WPFProject/Models/NotifyBase.cs
@@ -1,31 +1,31 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Text;
-using System.Threading.Tasks;
-using System.Xml.Linq;
-
-namespace WPFProject.Models
-{
- public class NotifyBase : INotifyPropertyChanged
- {
- public 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);
- }
- }
- }
-
-}
+锘縰sing System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Linq;
+
+namespace WPFProject.Models
+{
+ public class NotifyBase : INotifyPropertyChanged
+ {
+ public 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);
+ }
+ }
+ }
+
+}
diff --git a/Models/Program.cs b/WPFProject/Models/Program.cs
similarity index 89%
rename from Models/Program.cs
rename to WPFProject/Models/Program.cs
index c292bad..2d42db7 100644
--- a/Models/Program.cs
+++ b/WPFProject/Models/Program.cs
@@ -1,85 +1,83 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Xml.Serialization;
-using VisionBuilder.Core.Entity;
-
-namespace WPFProject.Models
-{
- public class Program : NotifyBase
- {
- /// <summary>
- /// 绋嬪簭鍚�
- /// </summary>
- private string _Name;
- public string Name
- {
- get { return _Name; }
- set => RaiseAndSetIfChanged(ref _Name, value);
- }
-
- /// <summary>
- /// 搴忓垪闆嗗悎
- /// </summary>
- private ObservableCollection<Sequence> _Sequences = new ObservableCollection<Sequence>();
- public ObservableCollection<Sequence> Sequences
- {
- get { return _Sequences; }
- set => RaiseAndSetIfChanged(ref _Sequences, value);
- }
-
- /// <summary>
- /// 绋嬪簭鎵�闇�鍙傛暟
- /// </summary>
- private ObservableCollection<Variable> _Variables;
- public ObservableCollection<Variable> Variables
- {
- get { return _Variables; }
- set => RaiseAndSetIfChanged(ref _Variables, value);
- }
-
- /// <summary>
- /// 鍒濆鍙傛暟鍙傛暟
- /// </summary>
- private Dictionary<string, Variable> _InitVars;
- [XmlIgnore]
- public Dictionary<string, Variable> InitVars
- {
- get { return _InitVars; }
- set { _InitVars = value; }
- }
-
- /// <summary>
- /// 璁$畻涓存椂鍙傛暟
- /// </summary>
- private Dictionary<string, Param> _TempVars;
- [XmlIgnore]
- public Dictionary<string, Param> TempVars
- {
- get { return _TempVars; }
- set { _TempVars = value; }
- }
-
- public Program AddSequnce(params Sequence[] sequences)
- {
- foreach (Sequence sequence in sequences)
- {
- if (sequence == null) continue;
- sequence.Program = this;
- Sequences.Add(sequence);
- }
- return this;
- }
-
- public void Run()
- {
- foreach (Sequence sequence in Sequences)
- {
- sequence.Run();
- }
- }
- }
-}
+锘縰sing System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Xml.Serialization;
+using VisionBuilder.Core.Api;
+using VisionBuilder.Core.Entity;
+
+namespace WPFProject.Models
+{
+ public class Program : NotifyBase, IProgram
+ {
+ /// <summary>
+ /// 绋嬪簭鍚�
+ /// </summary>
+ private string _Name;
+ public string Name
+ {
+ get { return _Name; }
+ set => RaiseAndSetIfChanged(ref _Name, value);
+ }
+
+ /// <summary>
+ /// 搴忓垪闆嗗悎
+ /// </summary>
+ private ObservableCollection<Sequence> _Sequences = new ObservableCollection<Sequence>();
+ public ObservableCollection<Sequence> Sequences
+ {
+ get { return _Sequences; }
+ set => RaiseAndSetIfChanged(ref _Sequences, value);
+ }
+
+ /// <summary>
+ /// 绋嬪簭鎵�闇�鍙傛暟
+ /// </summary>
+ private ObservableCollection<Variable> _Variables;
+ public ObservableCollection<Variable> Variables
+ {
+ get { return _Variables; }
+ set => RaiseAndSetIfChanged(ref _Variables, value);
+ }
+
+ /// <summary>
+ /// 鍒濆鍙傛暟鍙傛暟
+ /// </summary>
+ private Dictionary<string, Variable> _InitVars;
+ [XmlIgnore]
+ public Dictionary<string, Variable> InitVars
+ {
+ get { return _InitVars; }
+ set { _InitVars = value; }
+ }
+
+ /// <summary>
+ /// 璁$畻涓存椂鍙傛暟
+ /// </summary>
+ private Dictionary<string, Param> _TempVars = new Dictionary<string, Param>();
+ [XmlIgnore]
+ public Dictionary<string, Param> TempVars
+ {
+ get { return _TempVars; }
+ set { _TempVars = value; }
+ }
+
+ public Program AddSequnce(params Sequence[] sequences)
+ {
+ foreach (Sequence sequence in sequences)
+ {
+ if (sequence == null) continue;
+ sequence.Program = this;
+ Sequences.Add(sequence);
+ }
+ return this;
+ }
+
+ public void RunProgram()
+ {
+ foreach (Sequence sequence in Sequences)
+ {
+ sequence.RunSequnce();
+ }
+ }
+ }
+}
diff --git a/Models/Sequence.cs b/WPFProject/Models/Sequence.cs
similarity index 67%
rename from Models/Sequence.cs
rename to WPFProject/Models/Sequence.cs
index ee95225..f563b94 100644
--- a/Models/Sequence.cs
+++ b/WPFProject/Models/Sequence.cs
@@ -1,5 +1,7 @@
-锘縰sing System.Collections.ObjectModel;
+锘縰sing System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.Xml.Serialization;
+using VisionBuilder.Core.Api;
namespace WPFProject.Models
{
@@ -11,38 +13,41 @@
{
get { return _Name; }
set => RaiseAndSetIfChanged(ref _Name, value);
- }
-
+ }
+
[XmlIgnore]
public Program Program { get; set; }
- private ObservableCollection<Step> _Steps = new ObservableCollection<Step>() {
-
- new Step{ Name = "000"},new Step{ Name="111"}
- };
+ private ObservableCollection<Step> _Steps = new ObservableCollection<Step>();
public ObservableCollection<Step> Steps
{
get { return _Steps; }
set => RaiseAndSetIfChanged(ref _Steps, value);
}
- public Sequence AddStep(params Step[] steps)
- {
- foreach (Step step in steps)
+ public Sequence AddStep(params Step[] steps)
+ {
+ foreach (Step step in steps)
{
if (step == null) continue;
- step.Program = Program;
+ step.Sequence = this;
Steps.Add(step);
}
return this;
}
- public void Run()
- {
- foreach (Step step in Steps) {
- step.Run();
+ public void RunSequnce()
+ {
+ foreach (Step step in Steps)
+ {
+ step.RunStep();
}
}
+ public Sequence()
+ {
+ AddStep(new Step { Name = "000" }, new Step { Name = "111" });
+ }
+
}
}
diff --git a/WPFProject/Models/Step.cs b/WPFProject/Models/Step.cs
new file mode 100644
index 0000000..2e4fbab
--- /dev/null
+++ b/WPFProject/Models/Step.cs
@@ -0,0 +1,75 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Xml.Serialization;
+using VisionBuilder.Core.Api;
+
+namespace WPFProject.Models
+{
+ public class Step : NotifyBase
+ {
+ private static readonly Type InterfaceType = typeof(IStepRunner);
+ private static readonly Dictionary<string, Assembly> Cache = new Dictionary<string, Assembly>();
+ #region 瀛楁
+ [XmlIgnore]
+ public Program Program { get; set; }
+
+ [XmlIgnore]
+ public Sequence Sequence { get; set; }
+
+ private int _Index;
+ public int Index
+ {
+ get { return _Index; }
+ set => RaiseAndSetIfChanged(ref _Index, value);
+ }
+
+ private string _Name;
+ public string Name
+ {
+ get { return _Name; }
+ set => RaiseAndSetIfChanged(ref _Name, value);
+ }
+
+ private string _DllPath = "C:/Users/cheng/source/repos/WPFProject/VisionBuilder.Test/bin/Debug/VisionBuilder.Test.dll";
+ public string DllPath
+ {
+ get { return _DllPath; }
+ set => RaiseAndSetIfChanged(ref _DllPath, value);
+ }
+
+ private string _ClassName = "VisionBuilder.Test.PluginOne";
+ public string ClassName
+ {
+ get { return _ClassName; }
+ set => RaiseAndSetIfChanged(ref _ClassName, value);
+ }
+
+ private string _MethodName;
+ public string MethodName
+ {
+ get { return _MethodName; }
+ set => RaiseAndSetIfChanged(ref _MethodName, value);
+ }
+
+ private string _Description;
+ public string Description
+ {
+ get { return _Description; }
+ set => RaiseAndSetIfChanged(ref _Description, value);
+ }
+
+ #endregion
+
+ public void RunStep()
+ {
+ Assembly assembly = Assembly.LoadFrom(DllPath);
+ Type type = assembly.GetType(ClassName);
+ if (type != null && InterfaceType.IsAssignableFrom(type))
+ {
+ IStepRunner stepRunner = (IStepRunner)assembly.CreateInstance(ClassName);
+ stepRunner.RunStep(Sequence.Program.TempVars);
+ }
+ }
+ }
+}
diff --git a/Models/Variable.cs b/WPFProject/Models/Variable.cs
similarity index 99%
rename from Models/Variable.cs
rename to WPFProject/Models/Variable.cs
index 40d05c1..ea05141 100644
--- a/Models/Variable.cs
+++ b/WPFProject/Models/Variable.cs
@@ -1,61 +1,61 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Policy;
-using System.Text;
-using System.Threading.Tasks;
-using System.Xml.Serialization;
-
-namespace WPFProject.Models
-{
- public class Variable : NotifyBase
- {
- /// <summary>
- /// 鍙傛暟鍚�
- /// </summary>
- private string _Name;
- public string Name
- {
- get { return _Name; }
- set => RaiseAndSetIfChanged(ref _Name, value);
- }
-
- /// <summary>
- /// 鍙傛暟绫诲瀷
- /// </summary>
- private string _TypeName;
- public string TypeName
- {
- get { return _TypeName; }
- set
- {
- RaiseAndSetIfChanged(ref _TypeName, value);
- Type = value == null ? null : Type.GetType(value);
- }
- }
-
- [XmlIgnore]
- public Type Type { get; private set; }
-
- /// <summary>
- /// 鍊煎瓧绗�
- /// </summary>
- private string _ValueStr;
- public string ValueStr
- {
- get { return _ValueStr; }
- set => RaiseAndSetIfChanged(ref _ValueStr, value);
- }
-
- /// <summary>
- /// 鍙傛暟鍊�
- /// </summary>
- private object _Value;
- public object Value
- {
- get { return _Value; }
- set { _Value = value; }
- }
-
- }
-}
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Policy;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Serialization;
+
+namespace WPFProject.Models
+{
+ public class Variable : NotifyBase
+ {
+ /// <summary>
+ /// 鍙傛暟鍚�
+ /// </summary>
+ private string _Name;
+ public string Name
+ {
+ get { return _Name; }
+ set => RaiseAndSetIfChanged(ref _Name, value);
+ }
+
+ /// <summary>
+ /// 鍙傛暟绫诲瀷
+ /// </summary>
+ private string _TypeName;
+ public string TypeName
+ {
+ get { return _TypeName; }
+ set
+ {
+ RaiseAndSetIfChanged(ref _TypeName, value);
+ Type = value == null ? null : Type.GetType(value);
+ }
+ }
+
+ [XmlIgnore]
+ public Type Type { get; private set; }
+
+ /// <summary>
+ /// 鍊煎瓧绗�
+ /// </summary>
+ private string _ValueStr;
+ public string ValueStr
+ {
+ get { return _ValueStr; }
+ set => RaiseAndSetIfChanged(ref _ValueStr, value);
+ }
+
+ /// <summary>
+ /// 鍙傛暟鍊�
+ /// </summary>
+ private object _Value;
+ public object Value
+ {
+ get { return _Value; }
+ set { _Value = value; }
+ }
+
+ }
+}
diff --git a/Properties/AssemblyInfo.cs b/WPFProject/Properties/AssemblyInfo.cs
similarity index 100%
rename from Properties/AssemblyInfo.cs
rename to WPFProject/Properties/AssemblyInfo.cs
diff --git a/Properties/Resources.Designer.cs b/WPFProject/Properties/Resources.Designer.cs
similarity index 100%
rename from Properties/Resources.Designer.cs
rename to WPFProject/Properties/Resources.Designer.cs
diff --git a/Properties/Resources.resx b/WPFProject/Properties/Resources.resx
similarity index 100%
rename from Properties/Resources.resx
rename to WPFProject/Properties/Resources.resx
diff --git a/Properties/Settings.Designer.cs b/WPFProject/Properties/Settings.Designer.cs
similarity index 100%
rename from Properties/Settings.Designer.cs
rename to WPFProject/Properties/Settings.Designer.cs
diff --git a/Properties/Settings.settings b/WPFProject/Properties/Settings.settings
similarity index 100%
rename from Properties/Settings.settings
rename to WPFProject/Properties/Settings.settings
diff --git a/Resources/Font/Font.xaml b/WPFProject/Resources/Font/Font.xaml
similarity index 100%
rename from Resources/Font/Font.xaml
rename to WPFProject/Resources/Font/Font.xaml
diff --git a/Resources/Font/iconfont.ttf b/WPFProject/Resources/Font/iconfont.ttf
similarity index 100%
rename from Resources/Font/iconfont.ttf
rename to WPFProject/Resources/Font/iconfont.ttf
Binary files differ
diff --git a/Resources/Icon/xinzeng_1.png b/WPFProject/Resources/Icon/xinzeng_1.png
similarity index 100%
rename from Resources/Icon/xinzeng_1.png
rename to WPFProject/Resources/Icon/xinzeng_1.png
Binary files differ
diff --git a/Style/Colors.xaml b/WPFProject/Style/Colors.xaml
similarity index 100%
rename from Style/Colors.xaml
rename to WPFProject/Style/Colors.xaml
diff --git a/Style/CommonTree.xaml b/WPFProject/Style/CommonTree.xaml
similarity index 99%
rename from Style/CommonTree.xaml
rename to WPFProject/Style/CommonTree.xaml
index b85aa19..7055e27 100644
--- a/Style/CommonTree.xaml
+++ b/WPFProject/Style/CommonTree.xaml
@@ -1,51 +1,51 @@
-锘�<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-
- xmlns:hc="https://handyorg.github.io/handycontrol"
- >
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
- <ResourceDictionary Source="/WPFProject;component/Style/colors.xaml"/>
- </ResourceDictionary.MergedDictionaries>
-
- <Style TargetType="TreeViewItem" BasedOn="{StaticResource TreeViewItemBaseStyle}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="TreeViewItem">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition MinHeight="{TemplateBinding MinHeight}"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Border x:Name="Bd" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
- <DockPanel LastChildFill="True" Margin="{Binding Converter={StaticResource TreeViewItemMarginConverter}, RelativeSource={RelativeSource TemplatedParent}}">
- <ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
- <ContentPresenter VerticalAlignment="Center" x:Name="PART_Header" ContentSource="Header" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- </DockPanel>
- </Border>
- <ItemsPresenter Grid.Row="1" x:Name="ItemsHost" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true" SourceName="Bd">
- <Setter Property="Background" TargetName="Bd" Value="{StaticResource SecondaryImportant}"/>
- </Trigger>
- <Trigger Property="IsExpanded" Value="false">
- <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
- </Trigger>
- <Trigger Property="HasItems" Value="false">
- <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
- </Trigger>
- <Trigger Property="IsSelected" Value="true">
- <Setter Property="Background" TargetName="Bd" Value="{StaticResource Important}"/>
- <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
- </Trigger>
-
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Opacity" Value=".4" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
+锘�<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+
+ xmlns:hc="https://handyorg.github.io/handycontrol"
+ >
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
+ <ResourceDictionary Source="/WPFProject;component/Style/colors.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+
+ <Style TargetType="TreeViewItem" BasedOn="{StaticResource TreeViewItemBaseStyle}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="TreeViewItem">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition MinHeight="{TemplateBinding MinHeight}"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Border x:Name="Bd" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
+ <DockPanel LastChildFill="True" Margin="{Binding Converter={StaticResource TreeViewItemMarginConverter}, RelativeSource={RelativeSource TemplatedParent}}">
+ <ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
+ <ContentPresenter VerticalAlignment="Center" x:Name="PART_Header" ContentSource="Header" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
+ </DockPanel>
+ </Border>
+ <ItemsPresenter Grid.Row="1" x:Name="ItemsHost" />
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsMouseOver" Value="true" SourceName="Bd">
+ <Setter Property="Background" TargetName="Bd" Value="{StaticResource SecondaryImportant}"/>
+ </Trigger>
+ <Trigger Property="IsExpanded" Value="false">
+ <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
+ </Trigger>
+ <Trigger Property="HasItems" Value="false">
+ <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
+ </Trigger>
+ <Trigger Property="IsSelected" Value="true">
+ <Setter Property="Background" TargetName="Bd" Value="{StaticResource Important}"/>
+ <Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
+ </Trigger>
+
+ <Trigger Property="IsEnabled" Value="false">
+ <Setter Property="Opacity" Value=".4" />
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
</ResourceDictionary>
\ No newline at end of file
diff --git a/Style/ListViewStyle.xaml b/WPFProject/Style/ListViewStyle.xaml
similarity index 100%
rename from Style/ListViewStyle.xaml
rename to WPFProject/Style/ListViewStyle.xaml
diff --git a/Style/MainTab.xaml b/WPFProject/Style/MainTab.xaml
similarity index 99%
rename from Style/MainTab.xaml
rename to WPFProject/Style/MainTab.xaml
index 37f8ad6..129964b 100644
--- a/Style/MainTab.xaml
+++ b/WPFProject/Style/MainTab.xaml
@@ -19,19 +19,19 @@
Foreground="{TemplateBinding Foreground}" />
</Border>
<ControlTemplate.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabControl}}, Path=TabStripPlacement}" Value="Left">
- <Setter Property="BorderThickness" TargetName="templateRoot" Value="0,0,3,0"/>
- <Setter Property="Padding" TargetName="templateRoot" Value="3,3,0,3"/>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabControl}}, Path=TabStripPlacement}" Value="Left">
+ <Setter Property="BorderThickness" TargetName="templateRoot" Value="0,0,3,0"/>
+ <Setter Property="Padding" TargetName="templateRoot" Value="3,3,0,3"/>
</DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabControl}}, Path=TabStripPlacement}" Value="Right">
- <Setter Property="BorderThickness" TargetName="templateRoot" Value="3,0,0,0"/>
- <Setter Property="Padding" TargetName="templateRoot" Value="0,3,3,3"/>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabControl}}, Path=TabStripPlacement}" Value="Right">
+ <Setter Property="BorderThickness" TargetName="templateRoot" Value="3,0,0,0"/>
+ <Setter Property="Padding" TargetName="templateRoot" Value="0,3,3,3"/>
</DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabControl}}, Path=TabStripPlacement}" Value="Right">
- <Setter Property="BorderThickness" TargetName="templateRoot" Value="0,3,0,0"/>
- <Setter Property="Padding" TargetName="templateRoot" Value="3,0,3,3"/>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabControl}}, Path=TabStripPlacement}" Value="Right">
+ <Setter Property="BorderThickness" TargetName="templateRoot" Value="0,3,0,0"/>
+ <Setter Property="Padding" TargetName="templateRoot" Value="3,0,3,3"/>
</DataTrigger>
<MultiDataTrigger>
diff --git a/Style/WindowResources.xaml b/WPFProject/Style/WindowResources.xaml
similarity index 100%
rename from Style/WindowResources.xaml
rename to WPFProject/Style/WindowResources.xaml
diff --git a/UI/BottomBar.xaml b/WPFProject/UI/BottomBar.xaml
similarity index 100%
rename from UI/BottomBar.xaml
rename to WPFProject/UI/BottomBar.xaml
diff --git a/UI/BottomBar.xaml.cs b/WPFProject/UI/BottomBar.xaml.cs
similarity index 100%
rename from UI/BottomBar.xaml.cs
rename to WPFProject/UI/BottomBar.xaml.cs
diff --git a/UI/StepSetting.xaml b/WPFProject/UI/StepSetting.xaml
similarity index 99%
rename from UI/StepSetting.xaml
rename to WPFProject/UI/StepSetting.xaml
index 0157b96..5650b51 100644
--- a/UI/StepSetting.xaml
+++ b/WPFProject/UI/StepSetting.xaml
@@ -12,7 +12,7 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
- <ResourceDictionary Source="/WPFProject;component/Style/colors.xaml"/>
+ <ResourceDictionary Source="/WPFProject;component/Style/colors.xaml"/>
<ResourceDictionary Source="/WPFProject;component/Style/MainTab.xaml"/>
</ResourceDictionary.MergedDictionaries>
diff --git a/UI/StepSetting.xaml.cs b/WPFProject/UI/StepSetting.xaml.cs
similarity index 100%
rename from UI/StepSetting.xaml.cs
rename to WPFProject/UI/StepSetting.xaml.cs
diff --git a/UI/Test/FunctionSetting.xaml b/WPFProject/UI/Test/FunctionSetting.xaml
similarity index 99%
rename from UI/Test/FunctionSetting.xaml
rename to WPFProject/UI/Test/FunctionSetting.xaml
index 6347066..a54d9e2 100644
--- a/UI/Test/FunctionSetting.xaml
+++ b/WPFProject/UI/Test/FunctionSetting.xaml
@@ -1,54 +1,54 @@
-锘�<UserControl x:Class="WPFProject.UI.Test.FunctionSetting"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:WPFProject.UI.Test"
- xmlns:dd="urn:gong-wpf-dragdrop"
-
- xmlns:m="clr-namespace:WPFProject.Models"
- xmlns:util="clr-namespace:WPFProject.Utils"
- xmlns:hc="https://handyorg.github.io/handycontrol"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
- <ResourceDictionary Source="/WPFProject;component/Style/colors.xaml"/>
- <ResourceDictionary Source="/WPFProject;component/Style/CommonTree.xaml"/>
- <ResourceDictionary Source="/WPFProject;component/Style/MainTab.xaml"/>
- </ResourceDictionary.MergedDictionaries>
- <Style TargetType="Label"/>
-
- <Style TargetType="TabControl"/>
- <Style TargetType="TreeView">
- </Style>
- </ResourceDictionary>
- </UserControl.Resources>
-
- <Grid>
- <TabControl Style="{StaticResource ControlStyle}">
- <TabItem Header="鍑芥暟鍒楄〃">
- <StackPanel>
- <hc:SearchBar hc:InfoElement.Placeholder="杈撳叆鏂囨湰鏌ヨ" Style="{StaticResource SearchBarPlus}" Margin="10,5,10,5"/>
- <TreeView BorderThickness="0" ItemsSource="{Binding FuncModels}"
- dd:DragDrop.IsDragSource="True"
- dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
- dd:DragDrop.UseDefaultDragAdorner="True"
- dd:DragDrop.DragHandler="{Binding dragHandler}"
- >
- <TreeView.ItemTemplate>
- <HierarchicalDataTemplate DataType="{x:Type m:FuncModel}" ItemsSource="{Binding Path=Children}">
- <ContentControl Content="{Binding Name}"/>
- </HierarchicalDataTemplate>
- </TreeView.ItemTemplate>
- </TreeView>
- </StackPanel>
- </TabItem>
- <TabItem Header="鍙橀噺鍒楄〃">
- </TabItem>
- </TabControl>
- </Grid>
-</UserControl>
+锘�<UserControl x:Class="WPFProject.UI.Test.FunctionSetting"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:WPFProject.UI.Test"
+ xmlns:dd="urn:gong-wpf-dragdrop"
+
+ xmlns:m="clr-namespace:WPFProject.Models"
+ xmlns:util="clr-namespace:WPFProject.Utils"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
+ mc:Ignorable="d"
+ d:DesignHeight="450" d:DesignWidth="800">
+ <UserControl.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
+ <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
+ <ResourceDictionary Source="/WPFProject;component/Style/colors.xaml"/>
+ <ResourceDictionary Source="/WPFProject;component/Style/CommonTree.xaml"/>
+ <ResourceDictionary Source="/WPFProject;component/Style/MainTab.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+ <Style TargetType="Label"/>
+
+ <Style TargetType="TabControl"/>
+ <Style TargetType="TreeView">
+ </Style>
+ </ResourceDictionary>
+ </UserControl.Resources>
+
+ <Grid>
+ <TabControl Style="{StaticResource ControlStyle}">
+ <TabItem Header="鍑芥暟鍒楄〃">
+ <StackPanel>
+ <hc:SearchBar hc:InfoElement.Placeholder="杈撳叆鏂囨湰鏌ヨ" Style="{StaticResource SearchBarPlus}" Margin="10,5,10,5"/>
+ <TreeView BorderThickness="0" ItemsSource="{Binding FuncModels}"
+ dd:DragDrop.IsDragSource="True"
+ dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
+ dd:DragDrop.UseDefaultDragAdorner="True"
+ dd:DragDrop.DragHandler="{Binding dragHandler}"
+ >
+ <TreeView.ItemTemplate>
+ <HierarchicalDataTemplate DataType="{x:Type m:FuncModel}" ItemsSource="{Binding Path=Children}">
+ <ContentControl Content="{Binding Name}"/>
+ </HierarchicalDataTemplate>
+ </TreeView.ItemTemplate>
+ </TreeView>
+ </StackPanel>
+ </TabItem>
+ <TabItem Header="鍙橀噺鍒楄〃">
+ </TabItem>
+ </TabControl>
+ </Grid>
+</UserControl>
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);
+ }
}
}
diff --git a/UI/Test/ProgramList.xaml b/WPFProject/UI/Test/ProgramList.xaml
similarity index 99%
rename from UI/Test/ProgramList.xaml
rename to WPFProject/UI/Test/ProgramList.xaml
index 8acb0ab..8601d25 100644
--- a/UI/Test/ProgramList.xaml
+++ b/WPFProject/UI/Test/ProgramList.xaml
@@ -1,36 +1,36 @@
-锘�<UserControl x:Class="WPFProject.UI.Test.ProgramList"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:WPFProject.UI.Test"
- xmlns:vm="clr-namespace:WPFProject.ViewModels"
- xmlns:dd="urn:gong-wpf-dragdrop"
-
- mc:Ignorable="d"
- HorizontalAlignment="Stretch"
- HorizontalContentAlignment="Stretch"
- Background="#FFF" >
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/WPFProject;component/Style/ListViewStyle.xaml"/>
- </ResourceDictionary.MergedDictionaries>
-
- <Style TargetType="Label"></Style>
- </ResourceDictionary>
- </UserControl.Resources>
-
- <Grid>
- <ListView ItemsSource="{Binding Programs}" ItemContainerStyle="{StaticResource a}"
- VerticalContentAlignment="Center"
-
- SelectionChanged="ListView_SelectionChanged">
- <ListView.ItemTemplate>
- <DataTemplate>
- <ContentControl Content="{Binding Name}"/>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Grid>
-</UserControl>
+锘�<UserControl x:Class="WPFProject.UI.Test.ProgramList"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:WPFProject.UI.Test"
+ xmlns:vm="clr-namespace:WPFProject.ViewModels"
+ xmlns:dd="urn:gong-wpf-dragdrop"
+
+ mc:Ignorable="d"
+ HorizontalAlignment="Stretch"
+ HorizontalContentAlignment="Stretch"
+ Background="#FFF" >
+ <UserControl.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="/WPFProject;component/Style/ListViewStyle.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+
+ <Style TargetType="Label"></Style>
+ </ResourceDictionary>
+ </UserControl.Resources>
+
+ <Grid>
+ <ListView ItemsSource="{Binding Programs}" ItemContainerStyle="{StaticResource a}"
+ VerticalContentAlignment="Center"
+
+ SelectionChanged="ListView_SelectionChanged">
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <ContentControl Content="{Binding Name}"/>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+ </Grid>
+</UserControl>
diff --git a/UI/Test/ProgramList.xaml.cs b/WPFProject/UI/Test/ProgramList.xaml.cs
similarity index 83%
rename from UI/Test/ProgramList.xaml.cs
rename to WPFProject/UI/Test/ProgramList.xaml.cs
index 8fb78a2..e8366aa 100644
--- a/UI/Test/ProgramList.xaml.cs
+++ b/WPFProject/UI/Test/ProgramList.xaml.cs
@@ -1,78 +1,80 @@
-锘縰sing System;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.IO;
-using System.Runtime.CompilerServices;
-using System.Windows.Controls;
-using System.Xml.Serialization;
-using WPFProject.Models;
-using WPFProject.Utils;
-
-namespace WPFProject.UI.Test
-{
- /// <summary>
- /// ProgramList.xaml 鐨勪氦浜掗�昏緫
- /// </summary>
- public partial class ProgramList : 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);
- }
- }
-
- private ObservableCollection<Program> _Programs = new ObservableCollection<Program> {
- new Program{ Name="123"}.AddSequnce(new Sequence{
- Name="S123"
- },new Sequence
- {
- Name="S223"
- }),
- new Program{ Name="223"}.AddSequnce(new Sequence{
- Name="D123"
- },new Sequence
- {
- Name="D223"
- })
- };
-
- public ObservableCollection<Program> Programs
- {
- get { return _Programs; }
- set => RaiseAndSetIfChanged(ref _Programs, value);
- }
-
- public ProgramList()
- {
- DataContext = this;
- InitializeComponent();
- }
-
- public event EventHandler<Program> ProgramChanged;
-
- private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- ttt();
- if (e.AddedItems.Count > 0)
- {
- ProgramChanged?.Invoke(this, e.AddedItems[0] as Program);
- }
- }
-
- public void ttt()
- {
- string path = "X:\\vs\\WPFProject\\test.xml";
- XmlUtil.SerialToFile(Programs, path);
- }
- }
-}
+锘縰sing System;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.IO;
+using System.Runtime.CompilerServices;
+using System.Windows.Controls;
+using System.Xml.Serialization;
+using WPFProject.Models;
+using WPFProject.Utils;
+
+namespace WPFProject.UI.Test
+{
+ /// <summary>
+ /// ProgramList.xaml 鐨勪氦浜掗�昏緫
+ /// </summary>
+ public partial class ProgramList : 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);
+ }
+ }
+
+ private ObservableCollection<Program> _Programs = new ObservableCollection<Program> {
+ new Program{ Name="123"}.AddSequnce(new Sequence{
+ Name="S123"
+ },new Sequence
+ {
+ Name="S223"
+ }),
+ new Program{ Name="223"}.AddSequnce(new Sequence{
+ Name="D123"
+ },new Sequence
+ {
+ Name="D223"
+ })
+ };
+
+ public ObservableCollection<Program> Programs
+ {
+ get { return _Programs; }
+ set => RaiseAndSetIfChanged(ref _Programs, value);
+ }
+
+ public ProgramList()
+ {
+ DataContext = this;
+ InitializeComponent();
+ }
+
+ public event EventHandler<Program> ProgramChanged;
+
+ private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ ttt();
+ if (e.AddedItems.Count > 0)
+ {
+ Program program = e.AddedItems[0] as Program;
+ ProgramChanged?.Invoke(this, program);
+ program.RunProgram();
+ }
+ }
+
+ public void ttt()
+ {
+ //string path = "X:\\vs\\WPFProject\\test.xml";
+ //XmlUtil.SerialToFile(Programs, path);
+ }
+ }
+}
diff --git a/UI/Test/SequnceList.xaml b/WPFProject/UI/Test/SequnceList.xaml
similarity index 99%
rename from UI/Test/SequnceList.xaml
rename to WPFProject/UI/Test/SequnceList.xaml
index 4c24513..dc3d834 100644
--- a/UI/Test/SequnceList.xaml
+++ b/WPFProject/UI/Test/SequnceList.xaml
@@ -1,226 +1,226 @@
-锘�<UserControl x:Class="WPFProject.UI.Test.SequnceList"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:WPFProject.UI.Test"
- xmlns:hc="https://handyorg.github.io/handycontrol"
- xmlns:dd="urn:gong-wpf-dragdrop"
-
- mc:Ignorable="d"
- Background="#FFF"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
- <ResourceDictionary Source="/WPFProject;component/Style/colors.xaml"/>
- <ResourceDictionary Source="/WPFProject;component/Style/WindowResources.xaml"/>
- <ResourceDictionary Source="/WPFProject;component/Style/ListViewStyle.xaml"/>
- </ResourceDictionary.MergedDictionaries>
-
- <Style TargetType="Label"></Style>
- <Style TargetType="ListView"></Style>
-
- <Style TargetType="DataGridRow" x:Key="CommonRow" BasedOn="{StaticResource DataGridRowStyle}">
- <Setter Property="Margin" Value="0"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="DataGridRow">
- <SelectiveScrollingGrid>
- <SelectiveScrollingGrid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- </SelectiveScrollingGrid.ColumnDefinitions>
- <SelectiveScrollingGrid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- </SelectiveScrollingGrid.RowDefinitions>
- <Border Grid.ColumnSpan="2" x:Name="DGR_Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
- <DataGridCellsPresenter MinHeight="{TemplateBinding MinHeight}" VerticalContentAlignment="Center" Grid.Row="0" Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- <DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType=DataGrid}}" Visibility="{TemplateBinding DetailsVisibility}"/>
- <DataGridRowHeader Grid.Row="0" Grid.Column="0" SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
- </SelectiveScrollingGrid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Background" Value="{StaticResource SecondaryImportant}"/>
- </Trigger>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Background" Value="{StaticResource Important}"/>
- <Setter Property="TextElement.Foreground" Value="#FFF"/>
- </Trigger>
- <!--<MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected" Value="true"/>
- <Condition Property="Selector.IsSelectionActive" Value="false"/>
- </MultiTrigger.Conditions>
- <Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}"/>
- <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
- </MultiTrigger>-->
- </Style.Triggers>
-
- </Style>
-
- <Style TargetType="DataGridColumnHeader" x:Key="CommonColumnHeader">
- <Setter Property="BorderBrush" Value="{Binding Path=HorizontalGridLinesBrush,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}"/>
- <Setter Property="BorderThickness" Value="0,1,1,1"/>
-
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Column.DisplayIndex}" Value="0">
- <Setter Property="BorderThickness" Value="1,1,1,1"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
-
- <Style TargetType="DataGridCell" x:Key="CommonCell" BasedOn="{StaticResource DataGridCellStyle}">
- <Setter Property="BorderBrush" Value="{Binding Path=HorizontalGridLinesBrush,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}"/>
- <Setter Property="BorderThickness" Value="0,0,1,1"/>
- <Setter Property="Padding" Value="0"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="DataGridCell">
- <Border Padding="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Column.DisplayIndex}" Value="0">
- <Setter Property="BorderThickness" Value="1,0,1,1"/>
- </DataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected,RelativeSource={RelativeSource Self}}" Value="true"/>
- <Condition Binding="{Binding SelectionUnit,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}" Value="Cell"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Foreground" Value="{StaticResource ImportantFont}"/>
- <Setter Property="Background" Value="{StaticResource Important}"/>
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected,RelativeSource={RelativeSource Self}}" Value="true"/>
- <Condition Binding="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="False"/>
- <Condition Binding="{Binding SelectionUnit,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}" Value="CellOrRowHeader"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Foreground" Value="{StaticResource ImportantFont}"/>
- <Setter Property="Background" Value="{StaticResource Important}"/>
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected,RelativeSource={RelativeSource Self}}" Value="true"/>
- <Condition Binding="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="True"/>
- <Condition Binding="{Binding SelectionUnit,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}" Value="CellOrRowHeader"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Foreground" Value="{StaticResource ImportantFont}"/>
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsSelected,RelativeSource={RelativeSource Self}}" Value="true"/>
- <Condition Binding="{Binding SelectionUnit,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}" Value="FullRow"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Foreground" Value="{StaticResource ImportantFont}"/>
- </MultiDataTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected" Value="true"/>
- <Condition Property="Selector.IsSelectionActive" Value="false"/>
- </MultiTrigger.Conditions>
- <Setter Property="Foreground" Value="{StaticResource ImportantFont}"/>
- <Setter Property="Background" Value="{StaticResource Important}"/>
- </MultiTrigger>
- </Style.Triggers>
- </Style>
-
- <Style TargetType="DataGrid" BasedOn="{StaticResource DataGridBaseStyle}">
- <Setter Property="GridLinesVisibility" Value="None"/>
- <Setter Property="HorizontalGridLinesBrush" Value="Gray"/>
- <Setter Property="RowStyle" Value="{StaticResource CommonRow}"/>
- <Setter Property="CellStyle" Value="{StaticResource CommonCell}"/>
- <Setter Property="ColumnHeaderStyle" Value="{StaticResource CommonColumnHeader}"/>
- <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
- <Setter Property="RowHeight" Value="30"/>
- </Style>
- </ResourceDictionary>
- </UserControl.Resources>
-
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*"/>
- <ColumnDefinition Width="2"/>
- <ColumnDefinition Width="7*"/>
- </Grid.ColumnDefinitions>
- <ListView ItemContainerStyle="{StaticResource a}" ItemsSource="{Binding Sequences}" BorderThickness="0"
- dd:DragDrop.IsDragSource="True"
- dd:DragDrop.IsDropTarget="True"
- dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
- dd:DragDrop.UseDefaultDragAdorner="True"
- SelectionChanged="ListView_SelectionChanged">
-
- <ListView.ItemTemplate>
- <DataTemplate>
- <ContentControl Content="{Binding Name}"/>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
-
- <GridSplitter Grid.Column="1" Background="LightGray" HorizontalAlignment="Center" Width="2" ResizeDirection="Columns"/>
-
- <Grid Grid.Column="2">
- <Grid.RowDefinitions>
- <RowDefinition Height="30"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Label Content="娴嬭瘯娴佺▼" VerticalContentAlignment="Center"/>
-
- <DataGrid x:Name="dataGrid" AutoGenerateColumns="False"
-
- CanUserAddRows="False"
- CanUserSortColumns="False"
- FrozenColumnCount="1" Background="#FFF" Grid.Row="1"
- BorderThickness="0"
- dd:DragDrop.IsDragSource="True"
- dd:DragDrop.IsDropTarget="True"
- dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
- dd:DragDrop.UseDefaultDragAdorner="True"
-
- dd:DragDrop.SelectDroppedItems="True"
- dd:DragDrop.DropHandler="{Binding dropHandler}"
-
- ItemsSource="{Binding Steps}">
- <DataGrid.Columns>
- <DataGridTextColumn IsReadOnly="True" Binding="{Binding Index}" Header="搴忓彿"/>
-
- <DataGridTextColumn Header="鏍囬1" Binding="{Binding Name}"></DataGridTextColumn>
- <DataGridTextColumn Header="鏍囬2" Binding="{Binding Name}"></DataGridTextColumn>
- <DataGridTextColumn Header="鏍囬3" Binding="{Binding Name}"></DataGridTextColumn>
- <DataGridTextColumn Header="鏍囬4" Binding="{Binding Name}"></DataGridTextColumn>
-
- <DataGridTemplateColumn x:Name="opt" Width="*" Header="鎿嶄綔">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <Button Style="{StaticResource LinkButton}" Margin="0,0,20,0">缂栬緫</Button>
- <Button Style="{StaticResource LinkButton}">鍒犻櫎</Button>
- </StackPanel>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
-
- <!--<ListView >
- <ListView.View>
- <GridView>
-
- </GridView>
- </ListView.View>
- </ListView>-->
- </Grid>
-
- </Grid>
-</UserControl>
+锘�<UserControl x:Class="WPFProject.UI.Test.SequnceList"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:WPFProject.UI.Test"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
+ xmlns:dd="urn:gong-wpf-dragdrop"
+
+ mc:Ignorable="d"
+ Background="#FFF"
+ d:DesignHeight="450" d:DesignWidth="800">
+ <UserControl.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
+ <ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
+ <ResourceDictionary Source="/WPFProject;component/Style/colors.xaml"/>
+ <ResourceDictionary Source="/WPFProject;component/Style/WindowResources.xaml"/>
+ <ResourceDictionary Source="/WPFProject;component/Style/ListViewStyle.xaml"/>
+ </ResourceDictionary.MergedDictionaries>
+
+ <Style TargetType="Label"></Style>
+ <Style TargetType="ListView"></Style>
+
+ <Style TargetType="DataGridRow" x:Key="CommonRow" BasedOn="{StaticResource DataGridRowStyle}">
+ <Setter Property="Margin" Value="0"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="DataGridRow">
+ <SelectiveScrollingGrid>
+ <SelectiveScrollingGrid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="*"/>
+ </SelectiveScrollingGrid.ColumnDefinitions>
+ <SelectiveScrollingGrid.RowDefinitions>
+ <RowDefinition Height="*"/>
+ <RowDefinition Height="Auto"/>
+ </SelectiveScrollingGrid.RowDefinitions>
+ <Border Grid.ColumnSpan="2" x:Name="DGR_Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
+ <DataGridCellsPresenter MinHeight="{TemplateBinding MinHeight}" VerticalContentAlignment="Center" Grid.Row="0" Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
+ <DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType=DataGrid}}" Visibility="{TemplateBinding DetailsVisibility}"/>
+ <DataGridRowHeader Grid.Row="0" Grid.Column="0" SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
+ </SelectiveScrollingGrid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <Trigger Property="IsMouseOver" Value="true">
+ <Setter Property="Background" Value="{StaticResource SecondaryImportant}"/>
+ </Trigger>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="Background" Value="{StaticResource Important}"/>
+ <Setter Property="TextElement.Foreground" Value="#FFF"/>
+ </Trigger>
+ <!--<MultiTrigger>
+ <MultiTrigger.Conditions>
+ <Condition Property="IsSelected" Value="true"/>
+ <Condition Property="Selector.IsSelectionActive" Value="false"/>
+ </MultiTrigger.Conditions>
+ <Setter Property="Background" Value="{DynamicResource DarkDefaultBrush}"/>
+ <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
+ </MultiTrigger>-->
+ </Style.Triggers>
+
+ </Style>
+
+ <Style TargetType="DataGridColumnHeader" x:Key="CommonColumnHeader">
+ <Setter Property="BorderBrush" Value="{Binding Path=HorizontalGridLinesBrush,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}"/>
+ <Setter Property="BorderThickness" Value="0,1,1,1"/>
+
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Column.DisplayIndex}" Value="0">
+ <Setter Property="BorderThickness" Value="1,1,1,1"/>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+
+ <Style TargetType="DataGridCell" x:Key="CommonCell" BasedOn="{StaticResource DataGridCellStyle}">
+ <Setter Property="BorderBrush" Value="{Binding Path=HorizontalGridLinesBrush,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}"/>
+ <Setter Property="BorderThickness" Value="0,0,1,1"/>
+ <Setter Property="Padding" Value="0"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="DataGridCell">
+ <Border Padding="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
+ <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
+ </Border>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Column.DisplayIndex}" Value="0">
+ <Setter Property="BorderThickness" Value="1,0,1,1"/>
+ </DataTrigger>
+ <MultiDataTrigger>
+ <MultiDataTrigger.Conditions>
+ <Condition Binding="{Binding IsSelected,RelativeSource={RelativeSource Self}}" Value="true"/>
+ <Condition Binding="{Binding SelectionUnit,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}" Value="Cell"/>
+ </MultiDataTrigger.Conditions>
+ <Setter Property="Foreground" Value="{StaticResource ImportantFont}"/>
+ <Setter Property="Background" Value="{StaticResource Important}"/>
+ </MultiDataTrigger>
+ <MultiDataTrigger>
+ <MultiDataTrigger.Conditions>
+ <Condition Binding="{Binding IsSelected,RelativeSource={RelativeSource Self}}" Value="true"/>
+ <Condition Binding="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="False"/>
+ <Condition Binding="{Binding SelectionUnit,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}" Value="CellOrRowHeader"/>
+ </MultiDataTrigger.Conditions>
+ <Setter Property="Foreground" Value="{StaticResource ImportantFont}"/>
+ <Setter Property="Background" Value="{StaticResource Important}"/>
+ </MultiDataTrigger>
+ <MultiDataTrigger>
+ <MultiDataTrigger.Conditions>
+ <Condition Binding="{Binding IsSelected,RelativeSource={RelativeSource Self}}" Value="true"/>
+ <Condition Binding="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=DataGridRow}}" Value="True"/>
+ <Condition Binding="{Binding SelectionUnit,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}" Value="CellOrRowHeader"/>
+ </MultiDataTrigger.Conditions>
+ <Setter Property="Foreground" Value="{StaticResource ImportantFont}"/>
+ </MultiDataTrigger>
+ <MultiDataTrigger>
+ <MultiDataTrigger.Conditions>
+ <Condition Binding="{Binding IsSelected,RelativeSource={RelativeSource Self}}" Value="true"/>
+ <Condition Binding="{Binding SelectionUnit,RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}" Value="FullRow"/>
+ </MultiDataTrigger.Conditions>
+ <Setter Property="Foreground" Value="{StaticResource ImportantFont}"/>
+ </MultiDataTrigger>
+ <MultiTrigger>
+ <MultiTrigger.Conditions>
+ <Condition Property="IsSelected" Value="true"/>
+ <Condition Property="Selector.IsSelectionActive" Value="false"/>
+ </MultiTrigger.Conditions>
+ <Setter Property="Foreground" Value="{StaticResource ImportantFont}"/>
+ <Setter Property="Background" Value="{StaticResource Important}"/>
+ </MultiTrigger>
+ </Style.Triggers>
+ </Style>
+
+ <Style TargetType="DataGrid" BasedOn="{StaticResource DataGridBaseStyle}">
+ <Setter Property="GridLinesVisibility" Value="None"/>
+ <Setter Property="HorizontalGridLinesBrush" Value="Gray"/>
+ <Setter Property="RowStyle" Value="{StaticResource CommonRow}"/>
+ <Setter Property="CellStyle" Value="{StaticResource CommonCell}"/>
+ <Setter Property="ColumnHeaderStyle" Value="{StaticResource CommonColumnHeader}"/>
+ <Setter Property="hc:BorderElement.CornerRadius" Value="0" />
+ <Setter Property="RowHeight" Value="30"/>
+ </Style>
+ </ResourceDictionary>
+ </UserControl.Resources>
+
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="3*"/>
+ <ColumnDefinition Width="2"/>
+ <ColumnDefinition Width="7*"/>
+ </Grid.ColumnDefinitions>
+ <ListView ItemContainerStyle="{StaticResource a}" ItemsSource="{Binding Sequences}" BorderThickness="0"
+ dd:DragDrop.IsDragSource="True"
+ dd:DragDrop.IsDropTarget="True"
+ dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
+ dd:DragDrop.UseDefaultDragAdorner="True"
+ SelectionChanged="ListView_SelectionChanged">
+
+ <ListView.ItemTemplate>
+ <DataTemplate>
+ <ContentControl Content="{Binding Name}"/>
+ </DataTemplate>
+ </ListView.ItemTemplate>
+ </ListView>
+
+ <GridSplitter Grid.Column="1" Background="LightGray" HorizontalAlignment="Center" Width="2" ResizeDirection="Columns"/>
+
+ <Grid Grid.Column="2">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="30"/>
+ <RowDefinition/>
+ </Grid.RowDefinitions>
+ <Label Content="娴嬭瘯娴佺▼" VerticalContentAlignment="Center"/>
+
+ <DataGrid x:Name="dataGrid" AutoGenerateColumns="False"
+
+ CanUserAddRows="False"
+ CanUserSortColumns="False"
+ FrozenColumnCount="1" Background="#FFF" Grid.Row="1"
+ BorderThickness="0"
+ dd:DragDrop.IsDragSource="True"
+ dd:DragDrop.IsDropTarget="True"
+ dd:DragDrop.ShowAlwaysDropTargetAdorner="True"
+ dd:DragDrop.UseDefaultDragAdorner="True"
+
+ dd:DragDrop.SelectDroppedItems="True"
+ dd:DragDrop.DropHandler="{Binding dropHandler}"
+
+ ItemsSource="{Binding Steps}">
+ <DataGrid.Columns>
+ <DataGridTextColumn IsReadOnly="True" Binding="{Binding Index}" Header="搴忓彿"/>
+
+ <DataGridTextColumn Header="鏍囬1" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="鏍囬2" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="鏍囬3" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="鏍囬4" Binding="{Binding Name}"></DataGridTextColumn>
+
+ <DataGridTemplateColumn x:Name="opt" Width="*" Header="鎿嶄綔">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <StackPanel Orientation="Horizontal">
+ <Button Style="{StaticResource LinkButton}" Margin="0,0,20,0">缂栬緫</Button>
+ <Button Style="{StaticResource LinkButton}">鍒犻櫎</Button>
+ </StackPanel>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+
+ <!--<ListView >
+ <ListView.View>
+ <GridView>
+
+ </GridView>
+ </ListView.View>
+ </ListView>-->
+ </Grid>
+
+ </Grid>
+</UserControl>
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();
+
+ }
+}
diff --git a/UI/TestWindow.xaml b/WPFProject/UI/TestWindow.xaml
similarity index 100%
rename from UI/TestWindow.xaml
rename to WPFProject/UI/TestWindow.xaml
diff --git a/UI/TestWindow.xaml.cs b/WPFProject/UI/TestWindow.xaml.cs
similarity index 100%
rename from UI/TestWindow.xaml.cs
rename to WPFProject/UI/TestWindow.xaml.cs
diff --git a/UI/WorkControl.xaml b/WPFProject/UI/WorkControl.xaml
similarity index 100%
rename from UI/WorkControl.xaml
rename to WPFProject/UI/WorkControl.xaml
diff --git a/UI/WorkControl.xaml.cs b/WPFProject/UI/WorkControl.xaml.cs
similarity index 99%
rename from UI/WorkControl.xaml.cs
rename to WPFProject/UI/WorkControl.xaml.cs
index eecf439..755b5d2 100644
--- a/UI/WorkControl.xaml.cs
+++ b/WPFProject/UI/WorkControl.xaml.cs
@@ -1,287 +1,287 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-using WPFProject.Controls;
-using WPFProject.Models;
-using WPFProject.UI.Test;
-using WPFProject.Utils;
-
-namespace WPFProject.UI
-{
- /// <summary>
- /// WorkControl.xaml 鐨勪氦浜掗�昏緫
- /// </summary>
- public partial class WorkControl : UserControl, IPlugin
- {
- public WorkControl()
- {
- InitializeComponent();
- Loaded += UserControl_Loaded;
- }
-
- private List<CanvasPosition> InitGridSize()
- {
- List<CanvasPosition> result = new List<CanvasPosition>();
- result.Add(new CanvasPosition
- {
- Left = 0,
- Top = 0,
- Width = 0.1 * ActualWidth - 2,
- Height = 0.5 * ActualHeight - 2
- });
- result.Add(new CanvasPosition
- {
- Left = 0.1 * ActualWidth + 2,
- Top = 0,
- Width = 0.5 * ActualWidth - 4,
- Height = ActualHeight,
- });
-
- result.Add(new CanvasPosition
- {
- Left = 0.6 * ActualWidth + 2,
- Top = 0,
- Width = 0.4 * ActualWidth - 2,
- Height = 0.5 * ActualHeight - 2
- });
-
- result.Add(new CanvasPosition
- {
- Left = 0,
- Top = 0.5 * ActualHeight + 2,
- Width = 0.1 * ActualWidth - 2,
- Height = 0.5 * ActualHeight - 2
- });
-
- result.Add(new CanvasPosition
- {
- Left = 0.6 * ActualWidth + 2,
- Top = 0.5 * ActualHeight + 2,
- Width = 0.4 * ActualWidth - 2,
- Height = 0.5 * ActualHeight - 2
- });
-
- return result;
- }
-
- private void UserControl_Loaded(object sender, RoutedEventArgs e)
- {
- List<CanvasPosition> pos = InitGridSize();
- ProgramList programList = new ProgramList();
- InnerWindow p = new InnerWindow(pos[0])
- {
- Title = "绋嬪簭鍒楄〃",
- Content = programList
- };
- HandleInnerWindow(p);
-
- InnerWindow p1 = new InnerWindow(pos[1])
- {
- Title = "鍥剧墖",
- };
- HandleInnerWindow(p1);
-
- SequnceList sequnceList = new SequnceList();
- programList.ProgramChanged += sequnceList.Selected_Program_Changed;
-
- InnerWindow p2 = new InnerWindow(pos[2])
- {
- Title = "搴忓垪",
- Content = sequnceList
- };
- HandleInnerWindow(p2);
-
- FunctionSetting functionSetting = new FunctionSetting();
- InnerWindow p3 = new InnerWindow(pos[3])
- {
- Title = "鍑芥暟",
- Content = functionSetting
- };
- HandleInnerWindow(p3);
-
- StepSetting stepSetting = new StepSetting();
- InnerWindow p4 = new InnerWindow(pos[4])
- {
- Title = "鍗曟璁剧疆",
- Content = stepSetting
- };
- HandleInnerWindow(p4);
-
-
- SizeChanged += WorkControl_SizeChanged;
- Loaded -= UserControl_Loaded;
-
- }
-
- public int CanvasChildrenCount { get; private set; } = 0;
-
- #region InnerWindow鎿嶄綔閫昏緫
- /// <summary>
- /// 璁剧疆InnerWindow
- /// </summary>
- /// <param name="inner"></param>
- private void HandleInnerWindow(InnerWindow inner)
- {
- inner.MinEvent += InnerWindowMin;
- inner.MaxEvent += InnerWindowMax;
- inner.ZIndexEvent += Inner_ZIndexEvent;
- inner.GotFocus += Inner_GotFocus;
- inner.AttachToCanvas(WorkArea);
- inner.Zindex = CanvasChildrenCount++;
- }
-
- /// <summary>
- /// InnerWindow鐒︾偣浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void Inner_GotFocus(object sender, RoutedEventArgs e)
- {
- CanvasHelper.SetTopZIndex(sender as InnerWindow, WorkArea, typeof(InnerWindow));
- }
-
- /// <summary>
- /// InnerWindow ZIndex鍒囨崲浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void Inner_ZIndexEvent(object sender, EventArgs e)
- {
- CanvasHelper.SetTopZIndex(sender as InnerWindow, WorkArea, typeof(InnerWindow));
- }
-
- /// <summary>
- /// InnerWindow鏈�灏忓寲浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void InnerWindowMin(object sender, System.EventArgs e)
- {
- InnerWindow inner = sender as InnerWindow;
- inner.Visibility = Visibility.Collapsed;
- HandleMinInnerWindow(inner);
- }
-
- /// <summary>
- /// InnerWindow鏈�澶у寲浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void InnerWindowMax(object sender, System.EventArgs e)
- {
- InnerWindow inner = sender as InnerWindow;
- if (inner.WindowState == WindowState.Maximized)
- {
- Canvas.SetLeft(inner, inner.canvasPosition.Left);
- Canvas.SetTop(inner, inner.canvasPosition.Top);
-
- inner.Width = inner.canvasPosition.Width;
- inner.Height = inner.canvasPosition.Height;
- inner.WindowState = WindowState.Normal;
- }
- else
- {
- Canvas.SetLeft(inner, 0);
- Canvas.SetTop(inner, 0);
- inner.Width = WorkArea.ActualWidth;
- inner.Height = WorkArea.ActualHeight;
- inner.WindowState = WindowState.Maximized;
- }
- }
-
- /// <summary>
- /// 閲嶈澶у皬
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void WorkControl_SizeChanged(object sender, SizeChangedEventArgs e)
- {
- //Size newSize = e.NewSize;
- //Size previousSize = e.PreviousSize;
-
- //double xRate = newSize.Width / previousSize.Width;
- //double yRate = newSize.Height / previousSize.Height;
- //for (int i = 0; i < VisualTreeHelper.GetChildrenCount(WorkArea); i++)
- //{
- // UIElement child = VisualTreeHelper.GetChild(WorkArea, i) as UIElement;
- // Canvas.SetLeft(child, Canvas.GetLeft(child) * xRate);
- // Canvas.SetTop(child, Canvas.GetTop(child) * yRate);
- //}
-
- //for (int i = 0; i < VisualTreeHelper.GetChildrenCount(WorkArea); i++)
- //{
- // UIElement child = VisualTreeHelper.GetChild(WorkArea, i) as UIElement;
- // if (Canvas.GetLeft(child) >= newSize.Width)
- // {
- // Canvas.SetLeft(child, Canvas.GetLeft(child) + newSize.Width - previousSize.Width);
- // }
- // if (Canvas.GetTop(child) >= newSize.Height)
- // {
- // Canvas.SetTop(child, Canvas.GetTop(child) + newSize.Height - previousSize.Height);
- // }
- //}
- }
- #endregion
-
- #region 搴曢儴MinInnerWindow鐩稿叧
- /// <summary>
- /// 搴曢儴MinInnerWindow澶勭悊
- /// </summary>
- /// <param name="inner"></param>
- private void HandleMinInnerWindow(InnerWindow inner)
- {
- MinInnerWindow min = new MinInnerWindow(inner);
- min.MaxEvent += MinInnerWindowMax;
- min.CloseEvent += MinInnerWindowClose;
- BottomBar.AddMinWindow(min);
- }
-
- /// <summary>
- /// 搴曢儴MinInnerWindow灞曞紑
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void MinInnerWindowMax(object sender, System.EventArgs e)
- {
- MinInnerWindow min = sender as MinInnerWindow;
- min.Inner.Visibility = Visibility.Visible;
- CanvasHelper.SetTopZIndex(min.Inner, WorkArea, typeof(InnerWindow));
- BottomBar.RemoveMinWindow(min);
- }
-
- /// <summary>
- /// 搴曢儴MinInnerWin鍏抽棴
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void MinInnerWindowClose(object sender, System.EventArgs e)
- {
- MinInnerWindow min = sender as MinInnerWindow;
- BottomBar.RemoveMinWindow(min);
- }
- #endregion
-
- public void OnTabChange(object sender, SelectionChangedEventArgs args)
- {
- if (args.AddedItems.Count > 0)
- {
- IconTabItem newTab = args.AddedItems[0] as IconTabItem;
- if (newTab != null && newTab.Content == this)
- {
-
- }
- }
-
- if (args.RemovedItems.Count > 0)
- {
- IconTabItem oldTab = args.RemovedItems[0] as IconTabItem;
- if (oldTab != null && oldTab.Content == this)
- {
-
- }
- }
- }
- }
+锘縰sing System;
+using System.Collections.Generic;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+using WPFProject.Controls;
+using WPFProject.Models;
+using WPFProject.UI.Test;
+using WPFProject.Utils;
+
+namespace WPFProject.UI
+{
+ /// <summary>
+ /// WorkControl.xaml 鐨勪氦浜掗�昏緫
+ /// </summary>
+ public partial class WorkControl : UserControl, IPlugin
+ {
+ public WorkControl()
+ {
+ InitializeComponent();
+ Loaded += UserControl_Loaded;
+ }
+
+ private List<CanvasPosition> InitGridSize()
+ {
+ List<CanvasPosition> result = new List<CanvasPosition>();
+ result.Add(new CanvasPosition
+ {
+ Left = 0,
+ Top = 0,
+ Width = 0.1 * ActualWidth - 2,
+ Height = 0.5 * ActualHeight - 2
+ });
+ result.Add(new CanvasPosition
+ {
+ Left = 0.1 * ActualWidth + 2,
+ Top = 0,
+ Width = 0.5 * ActualWidth - 4,
+ Height = ActualHeight,
+ });
+
+ result.Add(new CanvasPosition
+ {
+ Left = 0.6 * ActualWidth + 2,
+ Top = 0,
+ Width = 0.4 * ActualWidth - 2,
+ Height = 0.5 * ActualHeight - 2
+ });
+
+ result.Add(new CanvasPosition
+ {
+ Left = 0,
+ Top = 0.5 * ActualHeight + 2,
+ Width = 0.1 * ActualWidth - 2,
+ Height = 0.5 * ActualHeight - 2
+ });
+
+ result.Add(new CanvasPosition
+ {
+ Left = 0.6 * ActualWidth + 2,
+ Top = 0.5 * ActualHeight + 2,
+ Width = 0.4 * ActualWidth - 2,
+ Height = 0.5 * ActualHeight - 2
+ });
+
+ return result;
+ }
+
+ private void UserControl_Loaded(object sender, RoutedEventArgs e)
+ {
+ List<CanvasPosition> pos = InitGridSize();
+ ProgramList programList = new ProgramList();
+ InnerWindow p = new InnerWindow(pos[0])
+ {
+ Title = "绋嬪簭鍒楄〃",
+ Content = programList
+ };
+ HandleInnerWindow(p);
+
+ InnerWindow p1 = new InnerWindow(pos[1])
+ {
+ Title = "鍥剧墖",
+ };
+ HandleInnerWindow(p1);
+
+ SequnceList sequnceList = new SequnceList();
+ programList.ProgramChanged += sequnceList.Selected_Program_Changed;
+
+ InnerWindow p2 = new InnerWindow(pos[2])
+ {
+ Title = "搴忓垪",
+ Content = sequnceList
+ };
+ HandleInnerWindow(p2);
+
+ FunctionSetting functionSetting = new FunctionSetting();
+ InnerWindow p3 = new InnerWindow(pos[3])
+ {
+ Title = "鍑芥暟",
+ Content = functionSetting
+ };
+ HandleInnerWindow(p3);
+
+ StepSetting stepSetting = new StepSetting();
+ InnerWindow p4 = new InnerWindow(pos[4])
+ {
+ Title = "鍗曟璁剧疆",
+ Content = stepSetting
+ };
+ HandleInnerWindow(p4);
+
+
+ SizeChanged += WorkControl_SizeChanged;
+ Loaded -= UserControl_Loaded;
+
+ }
+
+ public int CanvasChildrenCount { get; private set; } = 0;
+
+ #region InnerWindow鎿嶄綔閫昏緫
+ /// <summary>
+ /// 璁剧疆InnerWindow
+ /// </summary>
+ /// <param name="inner"></param>
+ private void HandleInnerWindow(InnerWindow inner)
+ {
+ inner.MinEvent += InnerWindowMin;
+ inner.MaxEvent += InnerWindowMax;
+ inner.ZIndexEvent += Inner_ZIndexEvent;
+ inner.GotFocus += Inner_GotFocus;
+ inner.AttachToCanvas(WorkArea);
+ inner.Zindex = CanvasChildrenCount++;
+ }
+
+ /// <summary>
+ /// InnerWindow鐒︾偣浜嬩欢
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void Inner_GotFocus(object sender, RoutedEventArgs e)
+ {
+ CanvasHelper.SetTopZIndex(sender as InnerWindow, WorkArea, typeof(InnerWindow));
+ }
+
+ /// <summary>
+ /// InnerWindow ZIndex鍒囨崲浜嬩欢
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void Inner_ZIndexEvent(object sender, EventArgs e)
+ {
+ CanvasHelper.SetTopZIndex(sender as InnerWindow, WorkArea, typeof(InnerWindow));
+ }
+
+ /// <summary>
+ /// InnerWindow鏈�灏忓寲浜嬩欢
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void InnerWindowMin(object sender, System.EventArgs e)
+ {
+ InnerWindow inner = sender as InnerWindow;
+ inner.Visibility = Visibility.Collapsed;
+ HandleMinInnerWindow(inner);
+ }
+
+ /// <summary>
+ /// InnerWindow鏈�澶у寲浜嬩欢
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void InnerWindowMax(object sender, System.EventArgs e)
+ {
+ InnerWindow inner = sender as InnerWindow;
+ if (inner.WindowState == WindowState.Maximized)
+ {
+ Canvas.SetLeft(inner, inner.canvasPosition.Left);
+ Canvas.SetTop(inner, inner.canvasPosition.Top);
+
+ inner.Width = inner.canvasPosition.Width;
+ inner.Height = inner.canvasPosition.Height;
+ inner.WindowState = WindowState.Normal;
+ }
+ else
+ {
+ Canvas.SetLeft(inner, 0);
+ Canvas.SetTop(inner, 0);
+ inner.Width = WorkArea.ActualWidth;
+ inner.Height = WorkArea.ActualHeight;
+ inner.WindowState = WindowState.Maximized;
+ }
+ }
+
+ /// <summary>
+ /// 閲嶈澶у皬
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void WorkControl_SizeChanged(object sender, SizeChangedEventArgs e)
+ {
+ //Size newSize = e.NewSize;
+ //Size previousSize = e.PreviousSize;
+
+ //double xRate = newSize.Width / previousSize.Width;
+ //double yRate = newSize.Height / previousSize.Height;
+ //for (int i = 0; i < VisualTreeHelper.GetChildrenCount(WorkArea); i++)
+ //{
+ // UIElement child = VisualTreeHelper.GetChild(WorkArea, i) as UIElement;
+ // Canvas.SetLeft(child, Canvas.GetLeft(child) * xRate);
+ // Canvas.SetTop(child, Canvas.GetTop(child) * yRate);
+ //}
+
+ //for (int i = 0; i < VisualTreeHelper.GetChildrenCount(WorkArea); i++)
+ //{
+ // UIElement child = VisualTreeHelper.GetChild(WorkArea, i) as UIElement;
+ // if (Canvas.GetLeft(child) >= newSize.Width)
+ // {
+ // Canvas.SetLeft(child, Canvas.GetLeft(child) + newSize.Width - previousSize.Width);
+ // }
+ // if (Canvas.GetTop(child) >= newSize.Height)
+ // {
+ // Canvas.SetTop(child, Canvas.GetTop(child) + newSize.Height - previousSize.Height);
+ // }
+ //}
+ }
+ #endregion
+
+ #region 搴曢儴MinInnerWindow鐩稿叧
+ /// <summary>
+ /// 搴曢儴MinInnerWindow澶勭悊
+ /// </summary>
+ /// <param name="inner"></param>
+ private void HandleMinInnerWindow(InnerWindow inner)
+ {
+ MinInnerWindow min = new MinInnerWindow(inner);
+ min.MaxEvent += MinInnerWindowMax;
+ min.CloseEvent += MinInnerWindowClose;
+ BottomBar.AddMinWindow(min);
+ }
+
+ /// <summary>
+ /// 搴曢儴MinInnerWindow灞曞紑
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void MinInnerWindowMax(object sender, System.EventArgs e)
+ {
+ MinInnerWindow min = sender as MinInnerWindow;
+ min.Inner.Visibility = Visibility.Visible;
+ CanvasHelper.SetTopZIndex(min.Inner, WorkArea, typeof(InnerWindow));
+ BottomBar.RemoveMinWindow(min);
+ }
+
+ /// <summary>
+ /// 搴曢儴MinInnerWin鍏抽棴
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void MinInnerWindowClose(object sender, System.EventArgs e)
+ {
+ MinInnerWindow min = sender as MinInnerWindow;
+ BottomBar.RemoveMinWindow(min);
+ }
+ #endregion
+
+ public void OnTabChange(object sender, SelectionChangedEventArgs args)
+ {
+ if (args.AddedItems.Count > 0)
+ {
+ IconTabItem newTab = args.AddedItems[0] as IconTabItem;
+ if (newTab != null && newTab.Content == this)
+ {
+
+ }
+ }
+
+ if (args.RemovedItems.Count > 0)
+ {
+ IconTabItem oldTab = args.RemovedItems[0] as IconTabItem;
+ if (oldTab != null && oldTab.Content == this)
+ {
+
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/UI/WorkWindow.xaml b/WPFProject/UI/WorkWindow.xaml
similarity index 100%
rename from UI/WorkWindow.xaml
rename to WPFProject/UI/WorkWindow.xaml
diff --git a/UI/WorkWindow.xaml.cs b/WPFProject/UI/WorkWindow.xaml.cs
similarity index 100%
rename from UI/WorkWindow.xaml.cs
rename to WPFProject/UI/WorkWindow.xaml.cs
diff --git a/Utils/CanvasHelper.cs b/WPFProject/Utils/CanvasHelper.cs
similarity index 100%
rename from Utils/CanvasHelper.cs
rename to WPFProject/Utils/CanvasHelper.cs
diff --git a/Utils/DdDragHandler.cs b/WPFProject/Utils/DdDragHandler.cs
similarity index 99%
rename from Utils/DdDragHandler.cs
rename to WPFProject/Utils/DdDragHandler.cs
index 009f608..0b7ddef 100644
--- a/Utils/DdDragHandler.cs
+++ b/WPFProject/Utils/DdDragHandler.cs
@@ -1,20 +1,20 @@
-锘縰sing GongSolutions.Wpf.DragDrop;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using WPFProject.Models;
-
-namespace WPFProject.Utils
-{
- public class DdDragHandler : DefaultDragHandler
- {
- public override bool CanStartDrag(IDragInfo dragInfo)
- {
- FuncModel model = dragInfo.SourceItem as FuncModel;
- return model.Children ==null || model.Children.Count == 0;
- }
- }
-}
+锘縰sing GongSolutions.Wpf.DragDrop;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using WPFProject.Models;
+
+namespace WPFProject.Utils
+{
+ public class DdDragHandler : DefaultDragHandler
+ {
+ public override bool CanStartDrag(IDragInfo dragInfo)
+ {
+ FuncModel model = dragInfo.SourceItem as FuncModel;
+ return model.Children ==null || model.Children.Count == 0;
+ }
+ }
+}
diff --git a/Utils/DdDropHandler.cs b/WPFProject/Utils/DdDropHandler.cs
similarity index 99%
rename from Utils/DdDropHandler.cs
rename to WPFProject/Utils/DdDropHandler.cs
index 6722c5c..6b60a8d 100644
--- a/Utils/DdDropHandler.cs
+++ b/WPFProject/Utils/DdDropHandler.cs
@@ -1,94 +1,94 @@
-锘縰sing GongSolutions.Wpf.DragDrop;
-using GongSolutions.Wpf.DragDrop.Utilities;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Markup;
-using System.Linq;
-using System.Collections;
-using WPFProject.Models;
-
-namespace WPFProject.Utils
-{
- public class DdDropHandler : DefaultDropHandler
- {
- public bool CanConvert(IDropInfo dropInfo)
- {
- bool InterfaceFilter(Type t, object o) => (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(IEnumerable<>));
- Type[] enumerableInterfaces = dropInfo.TargetCollection.GetType().FindInterfaces(InterfaceFilter, null);
- var enumerableTypes = from i in enumerableInterfaces
- select i.GetGenericArguments().Single();
-
- if (enumerableTypes.Any())
- {
- Type dataType = TypeUtilities.GetCommonBaseClass(ExtractData(dropInfo.Data));
- return dataType == typeof(FuncModel) && enumerableTypes.Any(t => t==typeof(Step));
- }
-
- return false;
- }
-
- public Step ConvertFunc2Step(FuncModel func) {
- return new Step
- {
- Name = func.Name
- };
- }
-
-
-
- public override void DragOver(IDropInfo dropInfo)
- {
- if (CanAcceptData(dropInfo))
- {
- base.DragOver(dropInfo);
- }
- else if (CanConvert(dropInfo))
- {
- // 鍥哄畾Copy
- dropInfo.Effects = DragDropEffects.Copy;
- var isTreeViewItem = dropInfo.InsertPosition.HasFlag(RelativeInsertPosition.TargetItemCenter) && dropInfo.VisualTargetItem is TreeViewItem;
- dropInfo.DropTargetAdorner = isTreeViewItem ? DropTargetAdorners.Highlight : DropTargetAdorners.Insert;
- }
- }
-
- public override void Drop(IDropInfo dropInfo)
- {
- if (CanAcceptData(dropInfo))
- {
- base.Drop(dropInfo);
- }
- else if (CanConvert(dropInfo))
- {
- int insertIndex = GetInsertIndex(dropInfo);
- var destinationList = dropInfo.TargetCollection.TryGetList();
- var data = ExtractData(dropInfo.Data).OfType<object>().ToList();
-
- if (destinationList != null)
- {
- var objects2Insert = new List<object>();
-
- foreach (var o in data)
- {
- var obj2Insert = ConvertFunc2Step(o as FuncModel);
-
- objects2Insert.Add(obj2Insert);
-
- destinationList.Insert(insertIndex++, obj2Insert);
- // 涓嬫柟瀵硅薄濡傛灉瀹炵幇浜� IDragItemSource 鎺ュ彛锛屼細鍦ㄨ繖閲岃皟鐢� ItemDropped 鏂规硶锛岀畻鏄悗缃鐞�
- if (obj2Insert is IDragItemSource dragItemSource)
- {
- dragItemSource.ItemDropped(dropInfo);
- }
- }
-
- SelectDroppedItems(dropInfo, objects2Insert);
- }
- }
-
- }
-
- }
-}
+锘縰sing GongSolutions.Wpf.DragDrop;
+using GongSolutions.Wpf.DragDrop.Utilities;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Markup;
+using System.Linq;
+using System.Collections;
+using WPFProject.Models;
+
+namespace WPFProject.Utils
+{
+ public class DdDropHandler : DefaultDropHandler
+ {
+ public bool CanConvert(IDropInfo dropInfo)
+ {
+ bool InterfaceFilter(Type t, object o) => (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(IEnumerable<>));
+ Type[] enumerableInterfaces = dropInfo.TargetCollection.GetType().FindInterfaces(InterfaceFilter, null);
+ var enumerableTypes = from i in enumerableInterfaces
+ select i.GetGenericArguments().Single();
+
+ if (enumerableTypes.Any())
+ {
+ Type dataType = TypeUtilities.GetCommonBaseClass(ExtractData(dropInfo.Data));
+ return dataType == typeof(FuncModel) && enumerableTypes.Any(t => t==typeof(Step));
+ }
+
+ return false;
+ }
+
+ public Step ConvertFunc2Step(FuncModel func) {
+ return new Step
+ {
+ Name = func.Name
+ };
+ }
+
+
+
+ public override void DragOver(IDropInfo dropInfo)
+ {
+ if (CanAcceptData(dropInfo))
+ {
+ base.DragOver(dropInfo);
+ }
+ else if (CanConvert(dropInfo))
+ {
+ // 鍥哄畾Copy
+ dropInfo.Effects = DragDropEffects.Copy;
+ var isTreeViewItem = dropInfo.InsertPosition.HasFlag(RelativeInsertPosition.TargetItemCenter) && dropInfo.VisualTargetItem is TreeViewItem;
+ dropInfo.DropTargetAdorner = isTreeViewItem ? DropTargetAdorners.Highlight : DropTargetAdorners.Insert;
+ }
+ }
+
+ public override void Drop(IDropInfo dropInfo)
+ {
+ if (CanAcceptData(dropInfo))
+ {
+ base.Drop(dropInfo);
+ }
+ else if (CanConvert(dropInfo))
+ {
+ int insertIndex = GetInsertIndex(dropInfo);
+ var destinationList = dropInfo.TargetCollection.TryGetList();
+ var data = ExtractData(dropInfo.Data).OfType<object>().ToList();
+
+ if (destinationList != null)
+ {
+ var objects2Insert = new List<object>();
+
+ foreach (var o in data)
+ {
+ var obj2Insert = ConvertFunc2Step(o as FuncModel);
+
+ objects2Insert.Add(obj2Insert);
+
+ destinationList.Insert(insertIndex++, obj2Insert);
+ // 涓嬫柟瀵硅薄濡傛灉瀹炵幇浜� IDragItemSource 鎺ュ彛锛屼細鍦ㄨ繖閲岃皟鐢� ItemDropped 鏂规硶锛岀畻鏄悗缃鐞�
+ if (obj2Insert is IDragItemSource dragItemSource)
+ {
+ dragItemSource.ItemDropped(dropInfo);
+ }
+ }
+
+ SelectDroppedItems(dropInfo, objects2Insert);
+ }
+ }
+
+ }
+
+ }
+}
diff --git a/Utils/IPlugin.cs b/WPFProject/Utils/IPlugin.cs
similarity index 100%
rename from Utils/IPlugin.cs
rename to WPFProject/Utils/IPlugin.cs
diff --git a/Utils/Resize.cs b/WPFProject/Utils/Resize.cs
similarity index 99%
rename from Utils/Resize.cs
rename to WPFProject/Utils/Resize.cs
index bbc5615..bafa586 100644
--- a/Utils/Resize.cs
+++ b/WPFProject/Utils/Resize.cs
@@ -420,13 +420,13 @@
double oldLeft = double.IsNaN(Canvas.GetLeft(target)) ? 0 : Canvas.GetLeft(target),
oldTop = double.IsNaN(Canvas.GetTop(target)) ? 0 : Canvas.GetTop(target),
oldWidth = double.IsNaN(target.ActualWidth) ? 0 : target.ActualWidth,
- oldHeight = double.IsNaN(target.ActualHeight) ? 0 : target.ActualHeight;
+ oldHeight = double.IsNaN(target.ActualHeight) ? 0 : target.ActualHeight;
double left, top, width, height;
double x = e.HorizontalChange, y = e.VerticalChange;
- bool toLeft = x < 0, toTop = y < 0;
- bool isLeft = thumb.HorizontalAlignment == HorizontalAlignment.Left,
- isTop = thumb.VerticalAlignment == VerticalAlignment.Top;
+ bool toLeft = x < 0, toTop = y < 0;
+ bool isLeft = thumb.HorizontalAlignment == HorizontalAlignment.Left,
+ isTop = thumb.VerticalAlignment == VerticalAlignment.Top;
if (isLeft)
{
// 宸︿晶鐨勬嫋鎷�
@@ -461,33 +461,33 @@
if (top + height > parent.ActualHeight) height = parent.ActualHeight - top;
}
- if (thumb.HorizontalAlignment != HorizontalAlignment.Center &&
+ if (thumb.HorizontalAlignment != HorizontalAlignment.Center &&
thumb.HorizontalAlignment != HorizontalAlignment.Stretch)
{
// 姘村钩鏂瑰悜鏈�缁堝垽鏂�
Canvas.SetLeft(target, left);
target.Width = width;
- //if ((isLeft && toLeft && left >= 0) ||
- // (isLeft && !toLeft && width >= MinWidth) ||
- // (!isLeft && toLeft && width >= MinWidth) ||
- // (!isLeft && !toLeft && (left + width) <= parent.ActualWidth))
- //{
+ //if ((isLeft && toLeft && left >= 0) ||
+ // (isLeft && !toLeft && width >= MinWidth) ||
+ // (!isLeft && toLeft && width >= MinWidth) ||
+ // (!isLeft && !toLeft && (left + width) <= parent.ActualWidth))
+ //{
// Canvas.SetLeft(target, left);
// target.Width = width;
//}
}
- if (thumb.VerticalAlignment != VerticalAlignment.Center &&
+ if (thumb.VerticalAlignment != VerticalAlignment.Center &&
thumb.VerticalAlignment != VerticalAlignment.Stretch)
{
// 鍨傜洿鏂瑰悜鏈�缁堝垽鏂�
- Canvas.SetTop(target, top);
+ Canvas.SetTop(target, top);
target.Height = height;
- //if ((isTop && toTop && top >= 0) ||
- // (isTop && !toTop && height >= MinHeight) ||
- // (!isTop && toTop && height >= MinHeight) ||
- // (!isTop && !toTop && (top + height) <= parent.ActualHeight))
- //{
+ //if ((isTop && toTop && top >= 0) ||
+ // (isTop && !toTop && height >= MinHeight) ||
+ // (!isTop && toTop && height >= MinHeight) ||
+ // (!isTop && !toTop && (top + height) <= parent.ActualHeight))
+ //{
// Canvas.SetTop(target, top);
// target.Height = height;
//}
diff --git a/Utils/Win32Helper.cs b/WPFProject/Utils/Win32Helper.cs
similarity index 100%
rename from Utils/Win32Helper.cs
rename to WPFProject/Utils/Win32Helper.cs
diff --git a/Utils/XmlUtil.cs b/WPFProject/Utils/XmlUtil.cs
similarity index 99%
rename from Utils/XmlUtil.cs
rename to WPFProject/Utils/XmlUtil.cs
index 5353449..5780a16 100644
--- a/Utils/XmlUtil.cs
+++ b/WPFProject/Utils/XmlUtil.cs
@@ -1,41 +1,41 @@
-锘縰sing System;
-using System.IO;
-using System.Xml.Serialization;
-
-namespace WPFProject.Utils
-{
- public class XmlUtil
- {
- /// <summary>
- /// 灏嗗璞″簭鍒楀寲鍒癤ml鏂囦欢涓�
- /// </summary>
- /// <param name="data">瀵硅薄</param>
- /// <param name="filePath">xml璺緞</param>
- public static void SerialToFile(object data, string filePath)
- {
- XmlSerializer serializer = new XmlSerializer(data.GetType());
- string content = string.Empty;
- //serialize
- using (StringWriter writer = new StringWriter())
- {
- serializer.Serialize(writer, data);
- content = writer.ToString();
- }
- //save to file
- using (StreamWriter stream_writer = new StreamWriter(filePath))
- {
- stream_writer.Write(content);
- }
- }
-
- public static T DeserialFromXml<T>(string filePath)
- {
- XmlSerializer serializer = new XmlSerializer(typeof(T));
- using (StreamReader reader = new StreamReader(filePath))
- {
- return (T) serializer.Deserialize(reader);
- }
- }
-
- }
-}
+锘縰sing System;
+using System.IO;
+using System.Xml.Serialization;
+
+namespace WPFProject.Utils
+{
+ public class XmlUtil
+ {
+ /// <summary>
+ /// 灏嗗璞″簭鍒楀寲鍒癤ml鏂囦欢涓�
+ /// </summary>
+ /// <param name="data">瀵硅薄</param>
+ /// <param name="filePath">xml璺緞</param>
+ public static void SerialToFile(object data, string filePath)
+ {
+ XmlSerializer serializer = new XmlSerializer(data.GetType());
+ string content = string.Empty;
+ //serialize
+ using (StringWriter writer = new StringWriter())
+ {
+ serializer.Serialize(writer, data);
+ content = writer.ToString();
+ }
+ //save to file
+ using (StreamWriter stream_writer = new StreamWriter(filePath))
+ {
+ stream_writer.Write(content);
+ }
+ }
+
+ public static T DeserialFromXml<T>(string filePath)
+ {
+ XmlSerializer serializer = new XmlSerializer(typeof(T));
+ using (StreamReader reader = new StreamReader(filePath))
+ {
+ return (T) serializer.Deserialize(reader);
+ }
+ }
+
+ }
+}
diff --git a/ViewModels/ProgramListViewModel.cs b/WPFProject/ViewModels/ProgramListViewModel.cs
similarity index 100%
rename from ViewModels/ProgramListViewModel.cs
rename to WPFProject/ViewModels/ProgramListViewModel.cs
diff --git a/WPFProject.csproj b/WPFProject/WPFProject.csproj
similarity index 99%
rename from WPFProject.csproj
rename to WPFProject/WPFProject.csproj
index d304059..a49ab0d 100644
--- a/WPFProject.csproj
+++ b/WPFProject/WPFProject.csproj
@@ -1,305 +1,305 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{D47D2314-5DD5-4899-ADF9-15ED057289D3}</ProjectGuid>
- <OutputType>WinExe</OutputType>
- <RootNamespace>WPFProject</RootNamespace>
- <AssemblyName>WPFProject</AssemblyName>
- <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <WarningLevel>4</WarningLevel>
- <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
- <Deterministic>true</Deterministic>
- <LangVersion>latest</LangVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="AIStudio.Wpf.Controls, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>packages\AIStudio.Wpf.Controls.1.2.2\lib\net461\AIStudio.Wpf.Controls.dll</HintPath>
- </Reference>
- <Reference Include="GongSolutions.WPF.DragDrop, Version=3.0.0.0, Culture=neutral, PublicKeyToken=91f1945125b7a587, processorArchitecture=MSIL">
- <HintPath>packages\gong-wpf-dragdrop.3.2.1\lib\net47\GongSolutions.WPF.DragDrop.dll</HintPath>
- </Reference>
- <Reference Include="HandyControl, Version=3.4.0.0, Culture=neutral, PublicKeyToken=45be8712787a1e5b, processorArchitecture=MSIL">
- <HintPath>packages\HandyControl.3.4.0\lib\net472\HandyControl.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\Microsoft.Xaml.Behaviors.Wpf.1.1.39\lib\net45\Microsoft.Xaml.Behaviors.dll</HintPath>
- </Reference>
- <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
- <HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
- </Reference>
- <Reference Include="PresentationFramework.Aero" />
- <Reference Include="System" />
- <Reference Include="System.ComponentModel.Composition" />
- <Reference Include="System.ComponentModel.DataAnnotations" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
- <Private>True</Private>
- <Private>True</Private>
- </Reference>
- <Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
- <Private>True</Private>
- <Private>True</Private>
- </Reference>
- <Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
- <Private>True</Private>
- <Private>True</Private>
- </Reference>
- <Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
- <Private>True</Private>
- <Private>True</Private>
- </Reference>
- <Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
- <Private>True</Private>
- <Private>True</Private>
- </Reference>
- <Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
- <Private>True</Private>
- <Private>True</Private>
- </Reference>
- <Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
- <Private>True</Private>
- <Private>True</Private>
- </Reference>
- <Reference Include="System.Web" />
- <Reference Include="System.Web.Extensions" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="System.Xaml">
- <RequiredTargetFramework>4.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="UIAutomationProvider" />
- <Reference Include="WindowsBase" />
- <Reference Include="PresentationCore" />
- <Reference Include="PresentationFramework" />
- <Reference Include="WindowsFormsIntegration" />
- <Reference Include="WPF.MDI, Version=1.1.4.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>packages\WPF.MDI.1.1.4\lib\net40-client\WPF.MDI.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- <Compile Include="Controls\DpPlugin.cs" />
- <Compile Include="Controls\InnerWindow.xaml.cs">
- <DependentUpon>InnerWindow.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\MinInnerWindow.xaml.cs">
- <DependentUpon>MinInnerWindow.xaml</DependentUpon>
- </Compile>
- <Compile Include="Events\TabChange.cs" />
- <Compile Include="Forms\Form1.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="Forms\Form1.Designer.cs">
- <DependentUpon>Form1.cs</DependentUpon>
- </Compile>
- <Compile Include="Models\CanvasPosition.cs" />
- <Compile Include="Models\FuncModel.cs" />
- <Compile Include="Models\NotifyBase.cs" />
- <Compile Include="Models\Variable.cs" />
- <Compile Include="Models\Program.cs" />
- <Compile Include="Models\Sequence.cs" />
- <Compile Include="Models\Step.cs" />
- <Compile Include="UI\BottomBar.xaml.cs">
- <DependentUpon>BottomBar.xaml</DependentUpon>
- </Compile>
- <Compile Include="UI\StepSetting.xaml.cs">
- <DependentUpon>StepSetting.xaml</DependentUpon>
- </Compile>
- <Compile Include="UI\TestWindow.xaml.cs">
- <DependentUpon>TestWindow.xaml</DependentUpon>
- </Compile>
- <Compile Include="UI\Test\FunctionSetting.xaml.cs">
- <DependentUpon>FunctionSetting.xaml</DependentUpon>
- </Compile>
- <Compile Include="UI\Test\ProgramList.xaml.cs">
- <DependentUpon>ProgramList.xaml</DependentUpon>
- </Compile>
- <Compile Include="UI\Test\SequnceList.xaml.cs">
- <DependentUpon>SequnceList.xaml</DependentUpon>
- </Compile>
- <Compile Include="UI\WorkControl.xaml.cs">
- <DependentUpon>WorkControl.xaml</DependentUpon>
- </Compile>
- <Compile Include="UI\WorkWindow.xaml.cs">
- <DependentUpon>WorkWindow.xaml</DependentUpon>
- </Compile>
- <Compile Include="Utils\CanvasHelper.cs" />
- <Compile Include="Utils\DdDragHandler.cs" />
- <Compile Include="Utils\DdDropHandler.cs" />
- <Compile Include="Utils\IPlugin.cs" />
- <Compile Include="Utils\Resize.cs" />
- <Compile Include="Utils\Win32Helper.cs" />
- <Compile Include="Utils\XmlUtil.cs" />
- <Compile Include="ViewModels\ProgramListViewModel.cs" />
- <Page Include="Controls\InnerWindow.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\MenuTabControl.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\MinInnerWindow.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="MainWindow.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Controls\IconTabItem.cs" />
- <Compile Include="Controls\MenuTabControl.xaml.cs">
- <DependentUpon>MenuTabControl.xaml</DependentUpon>
- </Compile>
- <Compile Include="MainWindow.xaml.cs">
- <DependentUpon>MainWindow.xaml</DependentUpon>
- <SubType>Code</SubType>
- </Compile>
- <Resource Include="Resources\Font\Font.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Resource>
- <Page Include="Style\Colors.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Style\ListViewStyle.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Style\CommonTree.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="Style\MainTab.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Style\WindowResources.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="UI\BottomBar.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="UI\StepSetting.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="UI\TestWindow.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="UI\Test\FunctionSetting.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="UI\Test\ProgramList.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="UI\Test\SequnceList.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="UI\WorkControl.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="UI\WorkWindow.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Properties\AssemblyInfo.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Resources.resx</DependentUpon>
- </Compile>
- <Compile Include="Properties\Settings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Settings.settings</DependentUpon>
- <DesignTimeSharedInput>True</DesignTimeSharedInput>
- </Compile>
- <EmbeddedResource Include="Forms\Form1.resx">
- <DependentUpon>Form1.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- </EmbeddedResource>
- <None Include="packages.config" />
- <None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>
- </None>
- <Resource Include="Resources\Font\iconfont.ttf">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Resource>
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config" />
- </ItemGroup>
- <ItemGroup>
- <WCFMetadata Include="Connected Services\" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\VisionBuilder.Core\VisionBuilder.Core.csproj">
- <Project>{65100b0e-1eba-4534-ac73-61ad3ae6ab36}</Project>
- <Name>VisionBuilder.Core</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Icon\xinzeng_1.png" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+锘�<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{D47D2314-5DD5-4899-ADF9-15ED057289D3}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <RootNamespace>WPFProject</RootNamespace>
+ <AssemblyName>WPFProject</AssemblyName>
+ <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WarningLevel>4</WarningLevel>
+ <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+ <Deterministic>true</Deterministic>
+ <LangVersion>latest</LangVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="AIStudio.Wpf.Controls, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>packages\AIStudio.Wpf.Controls.1.2.2\lib\net461\AIStudio.Wpf.Controls.dll</HintPath>
+ </Reference>
+ <Reference Include="GongSolutions.WPF.DragDrop, Version=3.0.0.0, Culture=neutral, PublicKeyToken=91f1945125b7a587, processorArchitecture=MSIL">
+ <HintPath>packages\gong-wpf-dragdrop.3.2.1\lib\net47\GongSolutions.WPF.DragDrop.dll</HintPath>
+ </Reference>
+ <Reference Include="HandyControl, Version=3.4.0.0, Culture=neutral, PublicKeyToken=45be8712787a1e5b, processorArchitecture=MSIL">
+ <HintPath>packages\HandyControl.3.4.0\lib\net472\HandyControl.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>packages\Microsoft.Xaml.Behaviors.Wpf.1.1.39\lib\net45\Microsoft.Xaml.Behaviors.dll</HintPath>
+ </Reference>
+ <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+ <HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+ </Reference>
+ <Reference Include="PresentationFramework.Aero" />
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.ComponentModel.DataAnnotations" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
+ <Private>True</Private>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
+ <Private>True</Private>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
+ <Private>True</Private>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
+ <Private>True</Private>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
+ <Private>True</Private>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
+ <Private>True</Private>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
+ <Private>True</Private>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="System.Web" />
+ <Reference Include="System.Web.Extensions" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Xaml">
+ <RequiredTargetFramework>4.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="UIAutomationProvider" />
+ <Reference Include="WindowsBase" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="PresentationFramework" />
+ <Reference Include="WindowsFormsIntegration" />
+ <Reference Include="WPF.MDI, Version=1.1.4.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>packages\WPF.MDI.1.1.4\lib\net40-client\WPF.MDI.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </ApplicationDefinition>
+ <Compile Include="Controls\DpPlugin.cs" />
+ <Compile Include="Controls\InnerWindow.xaml.cs">
+ <DependentUpon>InnerWindow.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Controls\MinInnerWindow.xaml.cs">
+ <DependentUpon>MinInnerWindow.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Events\TabChange.cs" />
+ <Compile Include="Forms\Form1.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Forms\Form1.Designer.cs">
+ <DependentUpon>Form1.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Models\CanvasPosition.cs" />
+ <Compile Include="Models\FuncModel.cs" />
+ <Compile Include="Models\NotifyBase.cs" />
+ <Compile Include="Models\Variable.cs" />
+ <Compile Include="Models\Program.cs" />
+ <Compile Include="Models\Sequence.cs" />
+ <Compile Include="Models\Step.cs" />
+ <Compile Include="UI\BottomBar.xaml.cs">
+ <DependentUpon>BottomBar.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="UI\StepSetting.xaml.cs">
+ <DependentUpon>StepSetting.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="UI\TestWindow.xaml.cs">
+ <DependentUpon>TestWindow.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="UI\Test\FunctionSetting.xaml.cs">
+ <DependentUpon>FunctionSetting.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="UI\Test\ProgramList.xaml.cs">
+ <DependentUpon>ProgramList.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="UI\Test\SequnceList.xaml.cs">
+ <DependentUpon>SequnceList.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="UI\WorkControl.xaml.cs">
+ <DependentUpon>WorkControl.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="UI\WorkWindow.xaml.cs">
+ <DependentUpon>WorkWindow.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Utils\CanvasHelper.cs" />
+ <Compile Include="Utils\DdDragHandler.cs" />
+ <Compile Include="Utils\DdDropHandler.cs" />
+ <Compile Include="Utils\IPlugin.cs" />
+ <Compile Include="Utils\Resize.cs" />
+ <Compile Include="Utils\Win32Helper.cs" />
+ <Compile Include="Utils\XmlUtil.cs" />
+ <Compile Include="ViewModels\ProgramListViewModel.cs" />
+ <Page Include="Controls\InnerWindow.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Controls\MenuTabControl.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Controls\MinInnerWindow.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="MainWindow.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Controls\IconTabItem.cs" />
+ <Compile Include="Controls\MenuTabControl.xaml.cs">
+ <DependentUpon>MenuTabControl.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="MainWindow.xaml.cs">
+ <DependentUpon>MainWindow.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
+ <Resource Include="Resources\Font\Font.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Resource>
+ <Page Include="Style\Colors.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Style\ListViewStyle.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Style\CommonTree.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Style\MainTab.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="Style\WindowResources.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="UI\BottomBar.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="UI\StepSetting.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="UI\TestWindow.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="UI\Test\FunctionSetting.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="UI\Test\ProgramList.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="UI\Test\SequnceList.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="UI\WorkControl.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="UI\WorkWindow.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Settings.settings</DependentUpon>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ </Compile>
+ <EmbeddedResource Include="Forms\Form1.resx">
+ <DependentUpon>Form1.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <None Include="packages.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ <Resource Include="Resources\Font\iconfont.ttf">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Resource>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <WCFMetadata Include="Connected Services\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\Icon\xinzeng_1.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\VisionBuilder.Core\VisionBuilder.Core.csproj">
+ <Project>{3e3bf44a-0b69-45c5-9512-528cb48a7106}</Project>
+ <Name>VisionBuilder.Core</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
diff --git a/WPFProject/WPFProject.sln b/WPFProject/WPFProject.sln
new file mode 100644
index 0000000..59fbd83
--- /dev/null
+++ b/WPFProject/WPFProject.sln
@@ -0,0 +1,43 @@
+锘�
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.33328.57
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFProject", "WPFProject.csproj", "{D47D2314-5DD5-4899-ADF9-15ED057289D3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisionBuilder.Core", "..\VisionBuilder.Core\VisionBuilder.Core.csproj", "{3E3BF44A-0B69-45C5-9512-528CB48A7106}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisionBuilder.Test", "..\VisionBuilder.Test\VisionBuilder.Test.csproj", "{6E1CC97A-B3CB-4E9F-94E0-F264DE0D8298}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisionBuilder.Engine", "..\VisionBuilder.Engine\VisionBuilder.Engine.csproj", "{8E5E8A68-0B9D-4A6A-B325-730C64603FDF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D47D2314-5DD5-4899-ADF9-15ED057289D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D47D2314-5DD5-4899-ADF9-15ED057289D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D47D2314-5DD5-4899-ADF9-15ED057289D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D47D2314-5DD5-4899-ADF9-15ED057289D3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3E3BF44A-0B69-45C5-9512-528CB48A7106}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3E3BF44A-0B69-45C5-9512-528CB48A7106}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3E3BF44A-0B69-45C5-9512-528CB48A7106}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3E3BF44A-0B69-45C5-9512-528CB48A7106}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6E1CC97A-B3CB-4E9F-94E0-F264DE0D8298}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E1CC97A-B3CB-4E9F-94E0-F264DE0D8298}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6E1CC97A-B3CB-4E9F-94E0-F264DE0D8298}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6E1CC97A-B3CB-4E9F-94E0-F264DE0D8298}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8E5E8A68-0B9D-4A6A-B325-730C64603FDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E5E8A68-0B9D-4A6A-B325-730C64603FDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8E5E8A68-0B9D-4A6A-B325-730C64603FDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8E5E8A68-0B9D-4A6A-B325-730C64603FDF}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {784CEA1D-A890-4625-B0C1-72294A6B4803}
+ EndGlobalSection
+EndGlobal
diff --git a/packages.config b/WPFProject/packages.config
similarity index 99%
rename from packages.config
rename to WPFProject/packages.config
index 925ee0e..1143c77 100644
--- a/packages.config
+++ b/WPFProject/packages.config
@@ -1,16 +1,16 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="AIStudio.Wpf.Controls" version="1.2.2" targetFramework="net472" />
- <package id="gong-wpf-dragdrop" version="3.2.1" targetFramework="net472" />
- <package id="HandyControl" version="3.4.0" targetFramework="net472" />
- <package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.39" targetFramework="net472" />
- <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
- <package id="System.IO" version="4.3.0" targetFramework="net472" />
- <package id="System.Net.Http" version="4.3.4" targetFramework="net472" />
- <package id="System.Runtime" version="4.3.0" targetFramework="net472" />
- <package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net472" />
- <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net472" />
- <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net472" />
- <package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net472" />
- <package id="WPF.MDI" version="1.1.4" targetFramework="net472" />
+锘�<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="AIStudio.Wpf.Controls" version="1.2.2" targetFramework="net472" />
+ <package id="gong-wpf-dragdrop" version="3.2.1" targetFramework="net472" />
+ <package id="HandyControl" version="3.4.0" targetFramework="net472" />
+ <package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.39" targetFramework="net472" />
+ <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
+ <package id="System.IO" version="4.3.0" targetFramework="net472" />
+ <package id="System.Net.Http" version="4.3.4" targetFramework="net472" />
+ <package id="System.Runtime" version="4.3.0" targetFramework="net472" />
+ <package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net472" />
+ <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net472" />
+ <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net472" />
+ <package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net472" />
+ <package id="WPF.MDI" version="1.1.4" targetFramework="net472" />
</packages>
\ No newline at end of file
diff --git a/test.xml b/WPFProject/test.xml
similarity index 99%
rename from test.xml
rename to WPFProject/test.xml
index 2788da7..8a72696 100644
--- a/test.xml
+++ b/WPFProject/test.xml
@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="utf-16"?>
-<ArrayOfProgram xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <Program>
- <Name>123</Name>
- <Sequences>
- <Sequence>
- <Name>S123</Name>
- <Steps>
- <Step>
- <Index>0</Index>
- <Name>000</Name>
- </Step>
- <Step>
- <Index>0</Index>
- <Name>111</Name>
- </Step>
- </Steps>
- </Sequence>
- <Sequence>
- <Name>S223</Name>
- <Steps>
- <Step>
- <Index>0</Index>
- <Name>000</Name>
- </Step>
- <Step>
- <Index>0</Index>
- <Name>111</Name>
- </Step>
- </Steps>
- </Sequence>
- </Sequences>
- </Program>
- <Program>
- <Name>223</Name>
- <Sequences>
- <Sequence>
- <Name>D123</Name>
- <Steps>
- <Step>
- <Index>0</Index>
- <Name>000</Name>
- </Step>
- <Step>
- <Index>0</Index>
- <Name>111</Name>
- </Step>
- </Steps>
- </Sequence>
- <Sequence>
- <Name>D223</Name>
- <Steps>
- <Step>
- <Index>0</Index>
- <Name>000</Name>
- </Step>
- <Step>
- <Index>0</Index>
- <Name>111</Name>
- </Step>
- </Steps>
- </Sequence>
- </Sequences>
- </Program>
+<?xml version="1.0" encoding="utf-16"?>
+<ArrayOfProgram xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <Program>
+ <Name>123</Name>
+ <Sequences>
+ <Sequence>
+ <Name>S123</Name>
+ <Steps>
+ <Step>
+ <Index>0</Index>
+ <Name>000</Name>
+ </Step>
+ <Step>
+ <Index>0</Index>
+ <Name>111</Name>
+ </Step>
+ </Steps>
+ </Sequence>
+ <Sequence>
+ <Name>S223</Name>
+ <Steps>
+ <Step>
+ <Index>0</Index>
+ <Name>000</Name>
+ </Step>
+ <Step>
+ <Index>0</Index>
+ <Name>111</Name>
+ </Step>
+ </Steps>
+ </Sequence>
+ </Sequences>
+ </Program>
+ <Program>
+ <Name>223</Name>
+ <Sequences>
+ <Sequence>
+ <Name>D123</Name>
+ <Steps>
+ <Step>
+ <Index>0</Index>
+ <Name>000</Name>
+ </Step>
+ <Step>
+ <Index>0</Index>
+ <Name>111</Name>
+ </Step>
+ </Steps>
+ </Sequence>
+ <Sequence>
+ <Name>D223</Name>
+ <Steps>
+ <Step>
+ <Index>0</Index>
+ <Name>000</Name>
+ </Step>
+ <Step>
+ <Index>0</Index>
+ <Name>111</Name>
+ </Step>
+ </Steps>
+ </Sequence>
+ </Sequences>
+ </Program>
</ArrayOfProgram>
\ No newline at end of file
--
Gitblit v1.9.1