From 13f30f23d83ab1632e00be15b4b687c09df920a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=89=BE=E7=AB=B9?= Date: Wed, 30 Nov 2022 19:07:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=A6=BB=E5=87=BA=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=B0=8Fdemo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AIStudio.Wpf.Diagram.sln | 10 ++- .../Models/PathToolBoxData.cs | 23 ------- .../ViewModels/ToolBoxViewModel.cs | 2 + AIStudio.Wpf.DiagramApp/Views/MainWindow.xaml | 2 +- .../Views/PropertyControl.xaml | 2 +- .../Views/ToolBoxControl.xaml | 22 +++---- .../AIStudio.Wpf.DiagramDesigner.Test.csproj | 14 ++++ AIStudio.Wpf.DiagramDesigner.Test/App.xaml | 21 ++++++ AIStudio.Wpf.DiagramDesigner.Test/App.xaml.cs | 17 +++++ .../AssemblyInfo.cs | 10 +++ .../MainWindow.xaml | 36 ++++++++++ .../MainWindow.xaml.cs | 30 +++++++++ .../ToolBoxControl.xaml | 66 +++++++++++++++++++ .../ToolBoxControl.xaml.cs | 27 ++++++++ .../ViewModels/MainWindowViewModel.cs | 44 +++++++++++++ .../ViewModels/ToolBoxViewModel.cs | 35 ++++++++++ .../Properties/AssemblyInfo.cs | 6 +- .../Controls/GradientStopControl.xaml | 2 +- .../BarcodeDesignerItemViewModel.xaml | 2 +- .../OutLineTextDesignerItemViewModel.xaml | 2 +- .../PersistDesignerItemViewModel.xaml | 2 +- .../SettingsDesignerItemViewModel.xaml | 2 +- .../Models/FlowchartToolBoxData.cs | 24 +++++++ .../ViewModels/LogicalGateItemViewModel.xaml | 2 +- AIStudio.Wpf.SFC/Models/SFCToolBoxData.cs | 21 ++++++ 25 files changed, 377 insertions(+), 47 deletions(-) create mode 100644 AIStudio.Wpf.DiagramDesigner.Test/AIStudio.Wpf.DiagramDesigner.Test.csproj create mode 100644 AIStudio.Wpf.DiagramDesigner.Test/App.xaml create mode 100644 AIStudio.Wpf.DiagramDesigner.Test/App.xaml.cs create mode 100644 AIStudio.Wpf.DiagramDesigner.Test/AssemblyInfo.cs create mode 100644 AIStudio.Wpf.DiagramDesigner.Test/MainWindow.xaml create mode 100644 AIStudio.Wpf.DiagramDesigner.Test/MainWindow.xaml.cs create mode 100644 AIStudio.Wpf.DiagramDesigner.Test/ToolBoxControl.xaml create mode 100644 AIStudio.Wpf.DiagramDesigner.Test/ToolBoxControl.xaml.cs create mode 100644 AIStudio.Wpf.DiagramDesigner.Test/ViewModels/MainWindowViewModel.cs create mode 100644 AIStudio.Wpf.DiagramDesigner.Test/ViewModels/ToolBoxViewModel.cs create mode 100644 AIStudio.Wpf.Flowchart/Models/FlowchartToolBoxData.cs create mode 100644 AIStudio.Wpf.SFC/Models/SFCToolBoxData.cs diff --git a/AIStudio.Wpf.Diagram.sln b/AIStudio.Wpf.Diagram.sln index 4fa5142..0cfd94c 100644 --- a/AIStudio.Wpf.Diagram.sln +++ b/AIStudio.Wpf.Diagram.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.3.32922.545 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31727.386 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AIStudio.Wpf.Flowchart", "AIStudio.Wpf.Flowchart\AIStudio.Wpf.Flowchart.csproj", "{86ED5B40-D185-4AFA-B5BD-BC8E78DB8758}" EndProject @@ -23,6 +23,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决 Directory.Build.Props = Directory.Build.Props EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AIStudio.Wpf.DiagramDesigner.Test", "AIStudio.Wpf.DiagramDesigner.Test\AIStudio.Wpf.DiagramDesigner.Test.csproj", "{559BBB2C-03DE-4C95-B38F-538F0A275793}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -53,6 +55,10 @@ Global {1E77B64D-B457-4467-A5DB-BB7BA01806D9}.Debug|Any CPU.Build.0 = Debug|Any CPU {1E77B64D-B457-4467-A5DB-BB7BA01806D9}.Release|Any CPU.ActiveCfg = Release|Any CPU {1E77B64D-B457-4467-A5DB-BB7BA01806D9}.Release|Any CPU.Build.0 = Release|Any CPU + {559BBB2C-03DE-4C95-B38F-538F0A275793}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {559BBB2C-03DE-4C95-B38F-538F0A275793}.Debug|Any CPU.Build.0 = Debug|Any CPU + {559BBB2C-03DE-4C95-B38F-538F0A275793}.Release|Any CPU.ActiveCfg = Release|Any CPU + {559BBB2C-03DE-4C95-B38F-538F0A275793}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/AIStudio.Wpf.DiagramApp/Models/PathToolBoxData.cs b/AIStudio.Wpf.DiagramApp/Models/PathToolBoxData.cs index 72b3cac..f717f73 100644 --- a/AIStudio.Wpf.DiagramApp/Models/PathToolBoxData.cs +++ b/AIStudio.Wpf.DiagramApp/Models/PathToolBoxData.cs @@ -42,29 +42,6 @@ namespace AIStudio.Wpf.DiagramApp.Models } } - public class FlowchartToolBoxData : ToolBoxData - { - public NodeKinds Kind { get; set; } - public FlowchartToolBoxData(NodeKinds kind, Type type, double width = 32, double height = 32) : base(kind.GetDescription(), null, type, width, height) - { - Kind = kind; - ColorViewModel.LineColor.Color = Colors.Black; - } - - } - - public class SFCToolBoxData : ToolBoxData - { - public SFCNodeKinds Kind { get; set; } - public SFCToolBoxData(SFCNodeKinds kind, Type type, double width = 32, double height = 32) : base(null, null, type, width, height) - { - Kind = kind; - ColorViewModel.LineColor.Color = Colors.Gray; - ColorViewModel.FillColor.Color = Colors.Blue; - - } - } - public class DesignerItemToolBoxData : ToolBoxData { public string FileName { get; set; } diff --git a/AIStudio.Wpf.DiagramApp/ViewModels/ToolBoxViewModel.cs b/AIStudio.Wpf.DiagramApp/ViewModels/ToolBoxViewModel.cs index f43fccd..0e1e5de 100644 --- a/AIStudio.Wpf.DiagramApp/ViewModels/ToolBoxViewModel.cs +++ b/AIStudio.Wpf.DiagramApp/ViewModels/ToolBoxViewModel.cs @@ -16,6 +16,8 @@ using AIStudio.Wpf.DiagramDesigner.Helpers; using AIStudio.Wpf.SFC; using AIStudio.Wpf.SFC.ViewModels; using System.Windows.Media; +using AIStudio.Wpf.Flowchart.Models; +using AIStudio.Wpf.SFC.Models; namespace AIStudio.Wpf.DiagramApp.ViewModels { diff --git a/AIStudio.Wpf.DiagramApp/Views/MainWindow.xaml b/AIStudio.Wpf.DiagramApp/Views/MainWindow.xaml index 054448e..05f185e 100644 --- a/AIStudio.Wpf.DiagramApp/Views/MainWindow.xaml +++ b/AIStudio.Wpf.DiagramApp/Views/MainWindow.xaml @@ -14,7 +14,7 @@ xmlns:dragablz="http://dragablz.net/winfx/xaml/dragablz" xmlns:helper="clr-namespace:AIStudio.Wpf.DiagramHelper.Helpers;assembly=AIStudio.Wpf.DiagramHelper" xmlns:model="clr-namespace:AIStudio.Wpf.DiagramApp.Models" - xmlns:dd="https://astudio.github.io/diagram" + xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram" xmlns:drop="urn:gong-wpf-dragdrop" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" xmlns:converter="clr-namespace:AIStudio.Wpf.DiagramHelper.Converters;assembly=AIStudio.Wpf.DiagramHelper" diff --git a/AIStudio.Wpf.DiagramApp/Views/PropertyControl.xaml b/AIStudio.Wpf.DiagramApp/Views/PropertyControl.xaml index eccc973..96db881 100644 --- a/AIStudio.Wpf.DiagramApp/Views/PropertyControl.xaml +++ b/AIStudio.Wpf.DiagramApp/Views/PropertyControl.xaml @@ -8,7 +8,7 @@ xmlns:views="clr-namespace:AIStudio.Wpf.DiagramApp.Views" xmlns:converter="clr-namespace:AIStudio.Wpf.DiagramHelper.Converters;assembly=AIStudio.Wpf.DiagramHelper" xmlns:helper="clr-namespace:AIStudio.Wpf.DiagramHelper.Helpers;assembly=AIStudio.Wpf.DiagramHelper" - xmlns:dd="https://astudio.github.io/diagram" + xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" xmlns:flowchart="clr-namespace:AIStudio.Wpf.Flowchart;assembly=AIStudio.Wpf.Flowchart" mc:Ignorable="d" diff --git a/AIStudio.Wpf.DiagramApp/Views/ToolBoxControl.xaml b/AIStudio.Wpf.DiagramApp/Views/ToolBoxControl.xaml index 6c93e7b..8dd58c1 100644 --- a/AIStudio.Wpf.DiagramApp/Views/ToolBoxControl.xaml +++ b/AIStudio.Wpf.DiagramApp/Views/ToolBoxControl.xaml @@ -6,7 +6,9 @@ xmlns:views="clr-namespace:AIStudio.Wpf.DiagramApp.Views" xmlns:viewmodels="clr-namespace:AIStudio.Wpf.DiagramApp.ViewModels" xmlns:model="clr-namespace:AIStudio.Wpf.DiagramApp.Models" - xmlns:dd="https://astudio.github.io/diagram" + xmlns:flowchartmodel="clr-namespace:AIStudio.Wpf.Flowchart.Models;assembly=AIStudio.Wpf.Flowchart" + xmlns:sfcmodel="clr-namespace:AIStudio.Wpf.SFC.Models;assembly=AIStudio.Wpf.SFC" + xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram" xmlns:conventer="clr-namespace:AIStudio.Wpf.DiagramHelper.Converters;assembly=AIStudio.Wpf.DiagramHelper" xmlns:command="clr-namespace:AIStudio.Wpf.DiagramHelper.Commands;assembly=AIStudio.Wpf.DiagramHelper" xmlns:svg="clr-namespace:Svg2XamlTestExtension;assembly=Svg2XamlTestExtension" @@ -19,7 +21,7 @@ - + - + - - - - - - + + + + @@ -179,7 +179,7 @@ - + - + diff --git a/AIStudio.Wpf.DiagramDesigner.Test/AIStudio.Wpf.DiagramDesigner.Test.csproj b/AIStudio.Wpf.DiagramDesigner.Test/AIStudio.Wpf.DiagramDesigner.Test.csproj new file mode 100644 index 0000000..59bbf7f --- /dev/null +++ b/AIStudio.Wpf.DiagramDesigner.Test/AIStudio.Wpf.DiagramDesigner.Test.csproj @@ -0,0 +1,14 @@ + + + + WinExe + true + + + + + + + + + diff --git a/AIStudio.Wpf.DiagramDesigner.Test/App.xaml b/AIStudio.Wpf.DiagramDesigner.Test/App.xaml new file mode 100644 index 0000000..b44c662 --- /dev/null +++ b/AIStudio.Wpf.DiagramDesigner.Test/App.xaml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/AIStudio.Wpf.DiagramDesigner.Test/App.xaml.cs b/AIStudio.Wpf.DiagramDesigner.Test/App.xaml.cs new file mode 100644 index 0000000..eac15b6 --- /dev/null +++ b/AIStudio.Wpf.DiagramDesigner.Test/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace AIStudio.Wpf.DiagramDesigner.Test +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/AIStudio.Wpf.DiagramDesigner.Test/AssemblyInfo.cs b/AIStudio.Wpf.DiagramDesigner.Test/AssemblyInfo.cs new file mode 100644 index 0000000..8b5504e --- /dev/null +++ b/AIStudio.Wpf.DiagramDesigner.Test/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/AIStudio.Wpf.DiagramDesigner.Test/MainWindow.xaml b/AIStudio.Wpf.DiagramDesigner.Test/MainWindow.xaml new file mode 100644 index 0000000..a684a62 --- /dev/null +++ b/AIStudio.Wpf.DiagramDesigner.Test/MainWindow.xaml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AIStudio.Wpf.DiagramDesigner.Test/MainWindow.xaml.cs b/AIStudio.Wpf.DiagramDesigner.Test/MainWindow.xaml.cs new file mode 100644 index 0000000..19c1e04 --- /dev/null +++ b/AIStudio.Wpf.DiagramDesigner.Test/MainWindow.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using AIStudio.Wpf.DiagramDesigner.Test.ViewModels; + +namespace AIStudio.Wpf.DiagramDesigner.Test +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + this.DataContext = new MainWindowViewModel(); + } + } +} diff --git a/AIStudio.Wpf.DiagramDesigner.Test/ToolBoxControl.xaml b/AIStudio.Wpf.DiagramDesigner.Test/ToolBoxControl.xaml new file mode 100644 index 0000000..7ff5574 --- /dev/null +++ b/AIStudio.Wpf.DiagramDesigner.Test/ToolBoxControl.xaml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AIStudio.Wpf.DiagramDesigner.Test/ToolBoxControl.xaml.cs b/AIStudio.Wpf.DiagramDesigner.Test/ToolBoxControl.xaml.cs new file mode 100644 index 0000000..5a46b24 --- /dev/null +++ b/AIStudio.Wpf.DiagramDesigner.Test/ToolBoxControl.xaml.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace AIStudio.Wpf.DiagramDesigner.Test +{ + /// + /// Interaction logic for ToolBoxControl.xaml + /// + public partial class ToolBoxControl : UserControl + { + public ToolBoxControl() + { + InitializeComponent(); + } + } +} diff --git a/AIStudio.Wpf.DiagramDesigner.Test/ViewModels/MainWindowViewModel.cs b/AIStudio.Wpf.DiagramDesigner.Test/ViewModels/MainWindowViewModel.cs new file mode 100644 index 0000000..0bcdc50 --- /dev/null +++ b/AIStudio.Wpf.DiagramDesigner.Test/ViewModels/MainWindowViewModel.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; + +namespace AIStudio.Wpf.DiagramDesigner.Test.ViewModels +{ + class MainWindowViewModel : BindableBase + { + public ToolBoxViewModel ToolBoxViewModel + { + get; private set; + } + + public DiagramViewModel DiagramViewModel + { + get; private set; + } + + protected IDiagramServiceProvider _service + { + get + { + return DiagramServicesProvider.Instance.Provider; + } + } + + public MainWindowViewModel() + { + ToolBoxViewModel = new ToolBoxViewModel(); + DiagramViewModel = new DiagramViewModel(); + DiagramViewModel.ShowGrid = true; + DiagramViewModel.GridCellSize = new Size(100, 60); + DiagramViewModel.CellHorizontalAlignment = CellHorizontalAlignment.Center; + DiagramViewModel.CellVerticalAlignment = CellVerticalAlignment.Center; + DiagramViewModel.PageSizeType = PageSizeType.Custom; + DiagramViewModel.PageSize = new Size(double.NaN, double.NaN); + + ConnectorViewModel.PathFinder = new OrthogonalPathFinder(); + _service.DrawModeViewModel.VectorLineDrawMode = DrawMode.BoundaryConnectingLine; + } + } + +} diff --git a/AIStudio.Wpf.DiagramDesigner.Test/ViewModels/ToolBoxViewModel.cs b/AIStudio.Wpf.DiagramDesigner.Test/ViewModels/ToolBoxViewModel.cs new file mode 100644 index 0000000..4a514b2 --- /dev/null +++ b/AIStudio.Wpf.DiagramDesigner.Test/ViewModels/ToolBoxViewModel.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Media; +using AIStudio.Wpf.DiagramDesigner.Helpers; +using AIStudio.Wpf.Flowchart; +using AIStudio.Wpf.Flowchart.Models; +using AIStudio.Wpf.Flowchart.ViewModels; + +namespace AIStudio.Wpf.DiagramDesigner.Test.ViewModels +{ + public class ToolBoxViewModel + { + private List toolBoxItems = new List(); + + public ToolBoxViewModel() + { + toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Start, typeof(StartFlowNode), 80, 48)); + toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.End, typeof(EndFlowNode), 80, 48)); + toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Middle, typeof(MiddleFlowNode), 80, 48)); + toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Decide, typeof(DecideFlowNode), 80, 48)); + toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.COBegin, typeof(COBeginFlowNode), 48, 48)); + toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.COEnd, typeof(COEndFlowNode), 80, 48)); + } + + public List ToolBoxItems + { + get + { + return toolBoxItems; + } + } + } + +} diff --git a/AIStudio.Wpf.DiagramDesigner/Properties/AssemblyInfo.cs b/AIStudio.Wpf.DiagramDesigner/Properties/AssemblyInfo.cs index 71f8852..3c7c9ad 100644 --- a/AIStudio.Wpf.DiagramDesigner/Properties/AssemblyInfo.cs +++ b/AIStudio.Wpf.DiagramDesigner/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Windows.Markup; // app, or any theme specific resource dictionaries) )] -[assembly: XmlnsDefinition("https://astudio.github.io/diagram", "AIStudio.Wpf.DiagramDesigner")] -[assembly: XmlnsDefinition("https://astudio.github.io/diagram", "AIStudio.Wpf.DiagramDesigner.Controls")] +[assembly: XmlnsDefinition("https://gitee.com/akwkevin/aistudio.-wpf.-diagram", "AIStudio.Wpf.DiagramDesigner")] +[assembly: XmlnsDefinition("https://gitee.com/akwkevin/aistudio.-wpf.-diagram", "AIStudio.Wpf.DiagramDesigner.Controls")] -[assembly: XmlnsPrefix("https://astudio.github.io/diagram", "dd")] \ No newline at end of file +[assembly: XmlnsPrefix("https://gitee.com/akwkevin/aistudio.-wpf.-diagram", "dd")] \ No newline at end of file diff --git a/AIStudio.Wpf.DiagramHelper/Controls/GradientStopControl.xaml b/AIStudio.Wpf.DiagramHelper/Controls/GradientStopControl.xaml index ecf9e46..6ed7ef7 100644 --- a/AIStudio.Wpf.DiagramHelper/Controls/GradientStopControl.xaml +++ b/AIStudio.Wpf.DiagramHelper/Controls/GradientStopControl.xaml @@ -7,7 +7,7 @@ xmlns:Fluent="urn:fluent-ribbon" xmlns:converter="clr-namespace:AIStudio.Wpf.DiagramHelper.Converters" xmlns:helper="clr-namespace:AIStudio.Wpf.DiagramHelper.Helpers" - xmlns:dd="https://astudio.github.io/diagram" + xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> diff --git a/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/BarcodeDesignerItemViewModel.xaml b/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/BarcodeDesignerItemViewModel.xaml index 629d14b..37f09b3 100644 --- a/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/BarcodeDesignerItemViewModel.xaml +++ b/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/BarcodeDesignerItemViewModel.xaml @@ -4,7 +4,7 @@ xmlns:gif="http://wpfanimatedgif.codeplex.com" xmlns:converter="clr-namespace:AIStudio.Wpf.DiagramHelper.Converters" xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramHelper.Controls" - xmlns:dd="https://astudio.github.io/diagram" + xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram" xmlns:Fluent="urn:fluent-ribbon" xmlns:s="clr-namespace:AIStudio.Wpf.DiagramDesigner;assembly=AIStudio.Wpf.DiagramDesigner" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"> diff --git a/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/OutLineTextDesignerItemViewModel.xaml b/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/OutLineTextDesignerItemViewModel.xaml index d74ff38..67ca0c6 100644 --- a/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/OutLineTextDesignerItemViewModel.xaml +++ b/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/OutLineTextDesignerItemViewModel.xaml @@ -4,7 +4,7 @@ xmlns:gif="http://wpfanimatedgif.codeplex.com" xmlns:converter="clr-namespace:AIStudio.Wpf.DiagramHelper.Converters" xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramHelper.Controls" - xmlns:dd="https://astudio.github.io/diagram" + xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram" xmlns:Fluent="urn:fluent-ribbon" xmlns:s="clr-namespace:AIStudio.Wpf.DiagramDesigner;assembly=AIStudio.Wpf.DiagramDesigner" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"> diff --git a/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/PersistDesignerItemViewModel.xaml b/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/PersistDesignerItemViewModel.xaml index 4c02418..4bc5b4e 100644 --- a/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/PersistDesignerItemViewModel.xaml +++ b/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/PersistDesignerItemViewModel.xaml @@ -4,7 +4,7 @@ xmlns:gif="http://wpfanimatedgif.codeplex.com" xmlns:converter="clr-namespace:AIStudio.Wpf.DiagramHelper.Converters" xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramHelper.Controls" - xmlns:dd="https://astudio.github.io/diagram" + xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram" xmlns:Fluent="urn:fluent-ribbon" xmlns:s="clr-namespace:AIStudio.Wpf.DiagramDesigner;assembly=AIStudio.Wpf.DiagramDesigner" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"> diff --git a/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/SettingsDesignerItemViewModel.xaml b/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/SettingsDesignerItemViewModel.xaml index 2960bd4..879f1fa 100644 --- a/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/SettingsDesignerItemViewModel.xaml +++ b/AIStudio.Wpf.DiagramHelper/Extensions/ViewModels/SettingsDesignerItemViewModel.xaml @@ -4,7 +4,7 @@ xmlns:gif="http://wpfanimatedgif.codeplex.com" xmlns:converter="clr-namespace:AIStudio.Wpf.DiagramHelper.Converters" xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramHelper.Controls" - xmlns:dd="https://astudio.github.io/diagram" + xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram" xmlns:Fluent="urn:fluent-ribbon" xmlns:s="clr-namespace:AIStudio.Wpf.DiagramDesigner;assembly=AIStudio.Wpf.DiagramDesigner" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"> diff --git a/AIStudio.Wpf.Flowchart/Models/FlowchartToolBoxData.cs b/AIStudio.Wpf.Flowchart/Models/FlowchartToolBoxData.cs new file mode 100644 index 0000000..421c1d7 --- /dev/null +++ b/AIStudio.Wpf.Flowchart/Models/FlowchartToolBoxData.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Media; +using AIStudio.Wpf.DiagramDesigner; +using AIStudio.Wpf.DiagramDesigner.Helpers; + +namespace AIStudio.Wpf.Flowchart.Models +{ + public class FlowchartToolBoxData : ToolBoxData + { + public NodeKinds Kind + { + get; set; + } + + public FlowchartToolBoxData(NodeKinds kind, Type type, double width = 32, double height = 32) : base(kind.GetDescription(), null, type, width, height) + { + Kind = kind; + ColorViewModel.LineColor.Color = Colors.Black; + } + + } +} diff --git a/AIStudio.Wpf.Logical/ViewModels/LogicalGateItemViewModel.xaml b/AIStudio.Wpf.Logical/ViewModels/LogicalGateItemViewModel.xaml index e150e71..709c8cd 100644 --- a/AIStudio.Wpf.Logical/ViewModels/LogicalGateItemViewModel.xaml +++ b/AIStudio.Wpf.Logical/ViewModels/LogicalGateItemViewModel.xaml @@ -5,7 +5,7 @@ xmlns:gif="http://wpfanimatedgif.codeplex.com" xmlns:converter="clr-namespace:AIStudio.Wpf.DiagramHelper.Converters;assembly=AIStudio.Wpf.DiagramHelper" xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramHelper.Controls;assembly=AIStudio.Wpf.DiagramHelper" - xmlns:dd="https://astudio.github.io/diagram" + xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram" xmlns:Fluent="urn:fluent-ribbon" xmlns:s="clr-namespace:AIStudio.Wpf.DiagramDesigner;assembly=AIStudio.Wpf.DiagramDesigner" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"> diff --git a/AIStudio.Wpf.SFC/Models/SFCToolBoxData.cs b/AIStudio.Wpf.SFC/Models/SFCToolBoxData.cs new file mode 100644 index 0000000..8b6c6a7 --- /dev/null +++ b/AIStudio.Wpf.SFC/Models/SFCToolBoxData.cs @@ -0,0 +1,21 @@ +using System; +using System.Windows.Media; +using AIStudio.Wpf.DiagramDesigner.Helpers; + +namespace AIStudio.Wpf.SFC.Models +{ + public class SFCToolBoxData : ToolBoxData + { + public SFCNodeKinds Kind + { + get; set; + } + public SFCToolBoxData(SFCNodeKinds kind, Type type, double width = 32, double height = 32) : base(null, null, type, width, height) + { + Kind = kind; + ColorViewModel.LineColor.Color = Colors.Gray; + ColorViewModel.FillColor.Color = Colors.Blue; + + } + } +}