mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
demo提交
This commit is contained in:
@@ -4,12 +4,13 @@ using System;
|
||||
using System.Windows.Media;
|
||||
using AIStudio.Wpf.DiagramDesigner;
|
||||
using AIStudio.Wpf.DiagramDesigner.Helpers;
|
||||
using System.Windows;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramApp.Models
|
||||
{
|
||||
public class PathToolBoxData : ToolBoxData
|
||||
{
|
||||
public PathToolBoxData(string icon, Type type, double width = 32, double height = 32) : base(null, icon, type, width, height)
|
||||
public PathToolBoxData(string icon, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(null, icon, type, width, height, desiredSize, description)
|
||||
{
|
||||
ColorViewModel.FillColor.Color = Colors.Orange;
|
||||
}
|
||||
@@ -18,7 +19,7 @@ namespace AIStudio.Wpf.DiagramApp.Models
|
||||
|
||||
public class TextToolBoxData : ToolBoxData
|
||||
{
|
||||
public TextToolBoxData(string text, Type type, double width = 32, double height = 32) : base(text, null, type, width, height)
|
||||
public TextToolBoxData(string text, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(text, null, type, width, height, desiredSize, description)
|
||||
{
|
||||
ColorViewModel.FillColor.Color = Colors.Orange;
|
||||
}
|
||||
@@ -27,7 +28,7 @@ namespace AIStudio.Wpf.DiagramApp.Models
|
||||
|
||||
public class EllipseTextToolBoxData : ToolBoxData
|
||||
{
|
||||
public EllipseTextToolBoxData(string text, Type type, double width = 32, double height = 32) : base(text, null, type, width, height)
|
||||
public EllipseTextToolBoxData(string text, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(text, null, type, width, height, desiredSize, description)
|
||||
{
|
||||
ColorViewModel.FillColor.Color = Colors.Orange;
|
||||
}
|
||||
@@ -36,7 +37,7 @@ namespace AIStudio.Wpf.DiagramApp.Models
|
||||
|
||||
public class ImageToolBoxData : ToolBoxData
|
||||
{
|
||||
public ImageToolBoxData(string icon, Type type, double width = 32, double height = 32) : base(null, icon, type, width, height)
|
||||
public ImageToolBoxData(string icon, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(null, icon, type, width, height, desiredSize, description)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -46,7 +47,7 @@ namespace AIStudio.Wpf.DiagramApp.Models
|
||||
{
|
||||
public string FileName { get; set; }
|
||||
public DesignerItemViewModelBase DesignerItemViewModel { get; set; }
|
||||
public DesignerItemToolBoxData(DesignerItemBase designerItemBase, string filename, Type type, double width = 32, double height = 32) : base(null, null, type, width, height)
|
||||
public DesignerItemToolBoxData(DesignerItemBase designerItemBase, string filename, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(null, null, type, width, height, desiredSize, description)
|
||||
{
|
||||
Addition = designerItemBase;
|
||||
DesignerItemViewModel = Activator.CreateInstance(type, null, designerItemBase) as DesignerItemViewModelBase;
|
||||
@@ -57,7 +58,7 @@ namespace AIStudio.Wpf.DiagramApp.Models
|
||||
|
||||
public class SvgToolBoxData : ToolBoxData
|
||||
{
|
||||
public SvgToolBoxData(string filename, Type type, double width = 32, double height = 32) : base(null, filename, type, width, height)
|
||||
public SvgToolBoxData(string filename, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(null, filename, type, width, height, desiredSize, description)
|
||||
{
|
||||
ColorViewModel.FillColor.Color = Colors.Blue;
|
||||
}
|
||||
@@ -65,7 +66,7 @@ namespace AIStudio.Wpf.DiagramApp.Models
|
||||
|
||||
public class MediaToolBoxData : ToolBoxData
|
||||
{
|
||||
public MediaToolBoxData(string icon, Type type, double width = 32, double height = 32) : base(icon, null, type, width, height)
|
||||
public MediaToolBoxData(string icon, Type type, double width = 32, double height = 32, Size? desiredSize = null, string description = null) : base(icon, null, type, width, height, desiredSize, description)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -3,13 +3,8 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ScrollBar.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/Expander.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/GroupBox.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ToolTip.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ScrollViewer.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ZoomBox.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ComboBox.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Themes/Generic.xaml" />
|
||||
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramApp;component/Styles/Fluent.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramApp;component/Styles/Expander.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramApp;component/Styles/ListBox.xaml"/>
|
||||
|
||||
@@ -25,7 +25,13 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
{
|
||||
public class ToolBoxViewModel : BindableBase
|
||||
{
|
||||
private IDiagramServiceProvider _service { get { return DiagramServicesProvider.Instance.Provider; } }
|
||||
private IDiagramServiceProvider _service
|
||||
{
|
||||
get
|
||||
{
|
||||
return DiagramServicesProvider.Instance.Provider;
|
||||
}
|
||||
}
|
||||
public ToolBoxViewModel()
|
||||
{
|
||||
Init();
|
||||
@@ -44,11 +50,26 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public ObservableCollection<ToolBoxCategory> TotalToolBoxCategory { get; set; }
|
||||
public ObservableCollection<ToolBoxCategory> TotalToolBoxCategory
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public ToolBoxCategory MyToolBoxCategory { get { return ToolBoxCategory[0]; } }
|
||||
public ToolBoxCategory MyToolBoxCategory
|
||||
{
|
||||
get
|
||||
{
|
||||
return ToolBoxCategory?.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
public ToolBoxCategory SvgToolBoxCategory { get { return ToolBoxCategory[2]; } }
|
||||
public ToolBoxCategory SvgToolBoxCategory
|
||||
{
|
||||
get
|
||||
{
|
||||
return ToolBoxCategory?.FirstOrDefault(p => p.Header == "Svg");
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _deleteCommand;
|
||||
public ICommand DeleteCommand
|
||||
@@ -91,11 +112,17 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
ToolBoxCategory.Add(new MineToolBoxCategory() { Header = "我的形状", ToolBoxItems = new ObservableCollection<ToolBoxData>(), IsExpanded = true });
|
||||
|
||||
List<ToolBoxData> toolBoxItems = new List<ToolBoxData>();
|
||||
toolBoxItems.Add(new ImageToolBoxData("../Images/Setting.png", typeof(SettingsDesignerItemViewModel)));
|
||||
toolBoxItems.Add(new ImageToolBoxData("../Images/Persist.png", typeof(PersistDesignerItemViewModel)));
|
||||
toolBoxItems.Add(new ImageToolBoxData("../Images/Setting.png", typeof(SettingsDesignerItemViewModel), description: "致谢WPF-Diagram-Designer的开源作者,保留开源作品中的两个设计"));
|
||||
toolBoxItems.Add(new ImageToolBoxData("../Images/Persist.png", typeof(PersistDesignerItemViewModel), description: "致谢WPF-Diagram-Designer的开源作者,保留开源作品中的两个设计"));
|
||||
|
||||
ToolBoxCategory.Add(new ToolBoxCategory() { Header = "WPF-Diagram-Designer", ToolBoxItems = new ObservableCollection<ToolBoxData>(toolBoxItems), IsExpanded = true });
|
||||
|
||||
|
||||
List<ToolBoxData> defaultToolBoxItems = new List<ToolBoxData>();
|
||||
defaultToolBoxItems.Add(new TextToolBoxData("", typeof(DefaultDesignerItemViewModel)));
|
||||
|
||||
ToolBoxCategory.Add(new ToolBoxCategory() { Header = "Default", ToolBoxItems = new ObservableCollection<ToolBoxData>(defaultToolBoxItems), IsExpanded = true });
|
||||
|
||||
ToolBoxCategory.Add(new ToolBoxCategory() { Header = "Svg", ToolBoxItems = new ObservableCollection<ToolBoxData>() });
|
||||
|
||||
List<PathToolBoxData> pathToolBoxItems = new List<PathToolBoxData>();
|
||||
@@ -240,7 +267,7 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
{
|
||||
try
|
||||
{
|
||||
var xmlobject = JsonConvert.DeserializeObject<DiagramDocument>(File.ReadAllText(filename));
|
||||
var xmlobject = JsonConvert.DeserializeObject<DiagramDocument>(File.ReadAllText(filename));
|
||||
|
||||
Type type = TypeHelper.GetType(xmlobject.DiagramItems[0].DesignerItems[0].SerializableTypeName);
|
||||
|
||||
@@ -294,7 +321,10 @@ namespace AIStudio.Wpf.DiagramApp.ViewModels
|
||||
|
||||
public class ToolBoxCategory : BindableBase
|
||||
{
|
||||
public string Header { get; set; }
|
||||
public string Header
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
private bool _isExpanded;
|
||||
public bool IsExpanded
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
<DataTemplate DataType="{x:Type model:ImageToolBoxData}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}" ToolTip="{Binding Description}">
|
||||
<Rectangle Name="Border"
|
||||
StrokeThickness="1"
|
||||
StrokeDashArray="2"
|
||||
@@ -41,7 +41,7 @@
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type model:MediaToolBoxData}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}" ToolTip="{Binding Description}">
|
||||
<Rectangle Name="Border"
|
||||
StrokeThickness="1"
|
||||
StrokeDashArray="2"
|
||||
@@ -59,7 +59,7 @@
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type model:TextToolBoxData}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}" ToolTip="{Binding Description}">
|
||||
<Rectangle Name="Border"
|
||||
StrokeThickness="1"
|
||||
StrokeDashArray="2"
|
||||
@@ -75,7 +75,7 @@
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type model:EllipseTextToolBoxData}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}" ToolTip="{Binding Description}">
|
||||
<Ellipse Name="Border"
|
||||
StrokeThickness="1"
|
||||
StrokeDashArray="2"
|
||||
@@ -91,7 +91,7 @@
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type model:PathToolBoxData}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}" ToolTip="{Binding Description}">
|
||||
<Rectangle Name="Border"
|
||||
StrokeThickness="1"
|
||||
StrokeDashArray="2"
|
||||
@@ -106,7 +106,7 @@
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type model:SvgToolBoxData}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}" ToolTip="{Binding Description}">
|
||||
<Rectangle Name="Border"
|
||||
StrokeThickness="1"
|
||||
StrokeDashArray="2"
|
||||
@@ -121,7 +121,7 @@
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type model:DesignerItemToolBoxData}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}" ToolTip="{Binding Description}">
|
||||
<Grid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="删除" Command="{StaticResource DeleteItemCommandReference}" CommandParameter="{Binding .}"/>
|
||||
@@ -162,7 +162,7 @@
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type flowchartmodel:FlowchartToolBoxData}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}">
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}" ToolTip="{Binding Description}">
|
||||
<Rectangle Name="Border"
|
||||
StrokeThickness="1"
|
||||
StrokeDashArray="2"
|
||||
|
||||
@@ -0,0 +1,237 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<AssemblyName>AIStudio.Wpf.DiagramDesigner.Demo</AssemblyName>
|
||||
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
|
||||
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
|
||||
<MSBuildProjectExtensionsPath>F:\aistudio.-wpf.-diagram\AIStudio.Wpf.DiagramDesigner.Demo\obj\</MSBuildProjectExtensionsPath>
|
||||
<_TargetAssemblyProjectName>AIStudio.Wpf.DiagramDesigner.Demo</_TargetAssemblyProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AIStudio.Wpf.DiagramDesigner\AIStudio.Wpf.DiagramDesigner.csproj" />
|
||||
<ProjectReference Include="..\AIStudio.Wpf.Flowchart\AIStudio.Wpf.Flowchart.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Views\Animations\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\Accessibility.dll" />
|
||||
<ReferencePath Include="F:\aistudio.-wpf.-diagram\AIStudio.Wpf.DiagramDesigner\bin\Debug\netcoreapp3.1\AIStudio.Wpf.DiagramDesigner.dll" />
|
||||
<ReferencePath Include="F:\aistudio.-wpf.-diagram\AIStudio.Wpf.Flowchart\bin\Debug\netcoreapp3.1\AIStudio.Wpf.Flowchart.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\Microsoft.CSharp.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\Microsoft.VisualBasic.Core.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\Microsoft.VisualBasic.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\Microsoft.Win32.Primitives.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\Microsoft.Win32.Registry.AccessControl.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\Microsoft.Win32.Registry.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\Microsoft.Win32.SystemEvents.dll" />
|
||||
<ReferencePath Include="C:\Users\Administrator\.nuget\packages\microsoft.xaml.behaviors.wpf\1.1.31\lib\netcoreapp3.1\Microsoft.Xaml.Behaviors.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\mscorlib.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\netstandard.dll" />
|
||||
<ReferencePath Include="C:\Users\Administrator\.nuget\packages\newtonsoft.json\13.0.1\lib\netstandard2.0\Newtonsoft.Json.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\PresentationCore.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\PresentationFramework.Aero.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\PresentationFramework.Aero2.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\PresentationFramework.AeroLite.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\PresentationFramework.Classic.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\PresentationFramework.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\PresentationFramework.Luna.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\PresentationFramework.Royale.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\PresentationUI.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\ReachFramework.dll" />
|
||||
<ReferencePath Include="C:\Users\Administrator\.nuget\packages\svgpathproperties\1.1.2\lib\netstandard2.0\SvgPathProperties.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.AppContext.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Buffers.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.CodeDom.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Collections.Concurrent.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Collections.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Collections.Immutable.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Collections.NonGeneric.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Collections.Specialized.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.ComponentModel.Annotations.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.ComponentModel.DataAnnotations.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.ComponentModel.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.ComponentModel.EventBasedAsync.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.ComponentModel.Primitives.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.ComponentModel.TypeConverter.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Configuration.ConfigurationManager.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Configuration.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Console.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Core.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Data.Common.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Data.DataSetExtensions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Data.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Design.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Diagnostics.Contracts.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Diagnostics.Debug.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Diagnostics.DiagnosticSource.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Diagnostics.EventLog.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Diagnostics.FileVersionInfo.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Diagnostics.PerformanceCounter.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Diagnostics.Process.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Diagnostics.StackTrace.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Diagnostics.TextWriterTraceListener.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Diagnostics.Tools.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Diagnostics.TraceSource.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Diagnostics.Tracing.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.DirectoryServices.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.dll" />
|
||||
<ReferencePath Include="C:\Users\Administrator\.nuget\packages\system.drawing.common\5.0.2\ref\netcoreapp3.0\System.Drawing.Common.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Drawing.Design.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Drawing.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Drawing.Primitives.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Dynamic.Runtime.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Globalization.Calendars.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Globalization.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Globalization.Extensions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.Compression.Brotli.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.Compression.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.Compression.FileSystem.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.Compression.ZipFile.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.FileSystem.AccessControl.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.FileSystem.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.FileSystem.DriveInfo.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.FileSystem.Primitives.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.FileSystem.Watcher.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.IsolatedStorage.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.MemoryMappedFiles.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.Packaging.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.Pipes.AccessControl.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.Pipes.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.IO.UnmanagedMemoryStream.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Linq.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Linq.Expressions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Linq.Parallel.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Linq.Queryable.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Memory.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.Http.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.HttpListener.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.Mail.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.NameResolution.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.NetworkInformation.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.Ping.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.Primitives.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.Requests.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.Security.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.ServicePoint.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.Sockets.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.WebClient.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.WebHeaderCollection.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.WebProxy.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.WebSockets.Client.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Net.WebSockets.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Numerics.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Numerics.Vectors.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.ObjectModel.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Printing.dll" />
|
||||
<ReferencePath Include="C:\Users\Administrator\.nuget\packages\system.reactive\5.0.0\buildTransitive\netcoreapp3.1\..\..\build\netcoreapp3.1\System.Reactive.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Reflection.DispatchProxy.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Reflection.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Reflection.Emit.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Reflection.Emit.ILGeneration.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Reflection.Emit.Lightweight.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Reflection.Extensions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Reflection.Metadata.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Reflection.Primitives.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Reflection.TypeExtensions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Resources.Extensions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Resources.Reader.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Resources.ResourceManager.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Resources.Writer.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.CompilerServices.Unsafe.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.CompilerServices.VisualC.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.Extensions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.Handles.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.InteropServices.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.InteropServices.RuntimeInformation.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.InteropServices.WindowsRuntime.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.Intrinsics.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.Loader.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.Numerics.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.Serialization.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.Serialization.Formatters.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.Serialization.Json.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.Serialization.Primitives.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.Serialization.Xml.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.AccessControl.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Claims.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Cryptography.Algorithms.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Cryptography.Cng.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Cryptography.Csp.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Cryptography.Encoding.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Cryptography.Pkcs.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Cryptography.Primitives.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Cryptography.ProtectedData.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Cryptography.X509Certificates.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Cryptography.Xml.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Permissions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Principal.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.Principal.Windows.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Security.SecureString.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.ServiceModel.Web.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.ServiceProcess.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Text.Encoding.CodePages.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Text.Encoding.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Text.Encoding.Extensions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Text.Encodings.Web.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Text.Json.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Text.RegularExpressions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Threading.AccessControl.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Threading.Channels.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Threading.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Threading.Overlapped.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Threading.Tasks.Dataflow.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Threading.Tasks.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Threading.Tasks.Extensions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Threading.Tasks.Parallel.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Threading.Thread.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Threading.ThreadPool.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Threading.Timer.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Transactions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Transactions.Local.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.ValueTuple.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Web.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Web.HttpUtility.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Windows.Controls.Ribbon.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Windows.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Windows.Extensions.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Windows.Forms.Design.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Windows.Forms.Design.Editors.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Windows.Forms.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Windows.Input.Manipulations.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Windows.Presentation.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\System.Xaml.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Xml.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Xml.Linq.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Xml.ReaderWriter.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Xml.Serialization.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Xml.XDocument.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Xml.XmlDocument.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Xml.XmlSerializer.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Xml.XPath.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Xml.XPath.XDocument.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\UIAutomationClient.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\UIAutomationClientSideProviders.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\UIAutomationProvider.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\UIAutomationTypes.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\WindowsBase.dll" />
|
||||
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.1.0\ref\netcoreapp3.1\WindowsFormsIntegration.dll" />
|
||||
<ReferencePath Include="C:\Users\Administrator\.nuget\packages\wpfanimatedgif\2.0.0\lib\netcoreapp3.0\WpfAnimatedGif.dll" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="F:\aistudio.-wpf.-diagram\AIStudio.Wpf.DiagramDesigner.Demo\obj\Debug\netcoreapp3.1\MainWindow.g.cs" />
|
||||
<Compile Include="F:\aistudio.-wpf.-diagram\AIStudio.Wpf.DiagramDesigner.Demo\obj\Debug\netcoreapp3.1\Views\DragAndDropView.g.cs" />
|
||||
<Compile Include="F:\aistudio.-wpf.-diagram\AIStudio.Wpf.DiagramDesigner.Demo\obj\Debug\netcoreapp3.1\Views\FlowchartEditorView.g.cs" />
|
||||
<Compile Include="F:\aistudio.-wpf.-diagram\AIStudio.Wpf.DiagramDesigner.Demo\obj\Debug\netcoreapp3.1\Views\SimpleView.g.cs" />
|
||||
<Compile Include="F:\aistudio.-wpf.-diagram\AIStudio.Wpf.DiagramDesigner.Demo\obj\Debug\netcoreapp3.1\App.g.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
||||
</Project>
|
||||
@@ -59,14 +59,8 @@
|
||||
<SolidColorBrush x:Key="GrayBrush10" Color="{StaticResource Gray10}" options:Freeze="True" />
|
||||
<SolidColorBrush x:Key="Fluent.Ribbon.Brushes.Button.MouseOver.Background" Color="{StaticResource Fluent.Ribbon.Colors.AccentColor20}" options:Freeze="True" />
|
||||
</ResourceDictionary>
|
||||
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ScrollBar.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/Expander.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/GroupBox.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ToolTip.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ScrollViewer.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ZoomBox.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ComboBox.xaml" />
|
||||
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Themes/Generic.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
|
||||
21
AIStudio.Wpf.DiagramDesigner.Demo/Controls/TitleControl.xaml
Normal file
21
AIStudio.Wpf.DiagramDesigner.Demo/Controls/TitleControl.xaml
Normal file
@@ -0,0 +1,21 @@
|
||||
<UserControl x:Class="AIStudio.Wpf.DiagramDesigner.Demo.Controls.TitleControl"
|
||||
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:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Border MaxWidth="350" Margin="10" HorizontalAlignment="Right" VerticalAlignment="Bottom" BorderBrush="#b8daff" BorderThickness="1" Background="#cce5ff" CornerRadius="3" IsHitTestVisible="False">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock FontSize="18" Text="{Binding Title}" Margin="10" Foreground="#004085"/>
|
||||
<TextBlock Grid.Row="1" Text="{Binding Info}" Margin="10,0,10,10" TextWrapping="WrapWithOverflow" Foreground="#004085" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
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.Demo.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// TitleControl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class TitleControl : UserControl
|
||||
{
|
||||
public TitleControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
Title="AIStudio.Wpf.DiagramDesigner.Demo" Height="450" Width="800">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" MinWidth="100" />
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
|
||||
{
|
||||
class BaseViewModel : BindableBase
|
||||
{
|
||||
protected IDiagramServiceProvider _service
|
||||
{
|
||||
get
|
||||
{
|
||||
return DiagramServicesProvider.Instance.Provider;
|
||||
}
|
||||
}
|
||||
|
||||
public DiagramViewModel DiagramViewModel
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
get;set;
|
||||
}
|
||||
|
||||
public string Info
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:viewmodel="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.ViewModels">
|
||||
|
||||
<dd:ColorBrushConverter x:Key="ColorBrushConverter" />
|
||||
|
||||
<DataTemplate DataType="{x:Type viewmodel:CustomDesignerItemViewModel}">
|
||||
<Grid>
|
||||
<Border BorderThickness="1" Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}" BorderBrush="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}" >
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Text="Bot Answer"/>
|
||||
<TextBox HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1" Style="{StaticResource WaterTextBox}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using AIStudio.Wpf.DiagramDesigner.Models;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
|
||||
{
|
||||
class CustomNodeViewModel : BaseViewModel
|
||||
{
|
||||
public CustomNodeViewModel()
|
||||
{
|
||||
Title = "Custom node";
|
||||
Info = "Creating your own custom design is very easy!";
|
||||
|
||||
//_service.ColorViewModel.FillColor.Color = System.Windows.Media.Colors.Orange;
|
||||
|
||||
DiagramViewModel = new DiagramViewModel();
|
||||
DiagramViewModel.CellHorizontalAlignment = CellHorizontalAlignment.Center;
|
||||
DiagramViewModel.CellVerticalAlignment = CellVerticalAlignment.Center;
|
||||
DiagramViewModel.PageSizeType = PageSizeType.Custom;
|
||||
DiagramViewModel.PageSize = new Size(double.NaN, double.NaN);
|
||||
|
||||
DefaultDesignerItemViewModel node1 = new DefaultDesignerItemViewModel() { Left = 50, Top = 50, Text = "1" };
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(node1);
|
||||
|
||||
CustomDesignerItemViewModel node2 = new CustomDesignerItemViewModel() { Left = 300, Top = 300 };
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(node2);
|
||||
|
||||
CustomDesignerItemViewModel node3 = new CustomDesignerItemViewModel() { Left = 300, Top = 50 };
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(node3);
|
||||
|
||||
ConnectionViewModel connector1 = new ConnectionViewModel(node1.RightConnector, node2.TopConnector, DrawMode.ConnectingLineSmooth, RouterMode.RouterNormal);
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(connector1);
|
||||
|
||||
ConnectionViewModel connector2 = new ConnectionViewModel(node2.BottomConnector, node3.BottomConnector, DrawMode.ConnectingLineStraight, RouterMode.RouterOrthogonal);
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(connector2);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomDesignerItemViewModel : DesignerItemViewModelBase
|
||||
{
|
||||
public CustomDesignerItemViewModel() : base()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public CustomDesignerItemViewModel(IDiagramViewModel root, SelectableItemBase designer) : base(root, designer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public CustomDesignerItemViewModel(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override SelectableItemBase GetSerializableObject()
|
||||
{
|
||||
return new DesignerItemBase(this, Answer);
|
||||
}
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
this.ItemWidth = 150;
|
||||
this.ItemHeight = 80;
|
||||
InitConnector();
|
||||
}
|
||||
|
||||
protected override void InitConnector()
|
||||
{
|
||||
connectors.Add(new FullyCreatedConnectorInfo(this, ConnectorOrientation.Top));
|
||||
connectors.Add(new FullyCreatedConnectorInfo(this, ConnectorOrientation.Bottom));
|
||||
}
|
||||
|
||||
protected override void LoadDesignerItemViewModel(IDiagramViewModel root, SelectableItemBase designerbase)
|
||||
{
|
||||
base.LoadDesignerItemViewModel(root, designerbase);
|
||||
|
||||
if (designerbase is DesignerItemBase designer)
|
||||
{
|
||||
this.Answer = designer.Reserve;
|
||||
}
|
||||
}
|
||||
|
||||
private string _answer;
|
||||
public string Answer
|
||||
{
|
||||
get
|
||||
{
|
||||
return _answer;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref _answer, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,19 +8,31 @@ using AIStudio.Wpf.Flowchart.ViewModels;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
|
||||
{
|
||||
public class DragAndDropViewModel: BindableBase
|
||||
class DragAndDropViewModel: BaseViewModel
|
||||
{
|
||||
public DragAndDropViewModel()
|
||||
{
|
||||
Title = "Drag & Drop";
|
||||
Info = "A very simple drag & drop of flowchart demo.";
|
||||
|
||||
ToolBoxViewModel = new ToolBoxViewModel();
|
||||
DiagramViewModel = new DiagramViewModel();
|
||||
DiagramViewModel.ShowGrid = true;
|
||||
DiagramViewModel.GridCellSize = new Size(100, 100);
|
||||
DiagramViewModel.GridMarginSize = new Size(0, 0);
|
||||
DiagramViewModel.CellHorizontalAlignment = CellHorizontalAlignment.Center;
|
||||
DiagramViewModel.CellVerticalAlignment = CellVerticalAlignment.Center;
|
||||
DiagramViewModel.PageSizeType = PageSizeType.Custom;
|
||||
DiagramViewModel.PageSize = new Size(double.NaN, double.NaN);
|
||||
|
||||
DiagramViewModel.PropertyChanged += DiagramViewModel_PropertyChanged;
|
||||
}
|
||||
|
||||
public ToolBoxViewModel ToolBoxViewModel
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public DiagramViewModel DiagramViewModel
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
|
||||
public SelectableDesignerItemViewModelBase SelectedItem
|
||||
{
|
||||
get
|
||||
@@ -62,22 +74,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
|
||||
{
|
||||
_roles = value;
|
||||
}
|
||||
}
|
||||
|
||||
public DragAndDropViewModel()
|
||||
{
|
||||
ToolBoxViewModel = new ToolBoxViewModel();
|
||||
DiagramViewModel = new DiagramViewModel();
|
||||
DiagramViewModel.ShowGrid = true;
|
||||
DiagramViewModel.GridCellSize = new Size(100, 100);
|
||||
DiagramViewModel.GridMarginSize = new Size(0, 0);
|
||||
DiagramViewModel.CellHorizontalAlignment = CellHorizontalAlignment.Center;
|
||||
DiagramViewModel.CellVerticalAlignment = CellVerticalAlignment.Center;
|
||||
DiagramViewModel.PageSizeType = PageSizeType.Custom;
|
||||
DiagramViewModel.PageSize = new Size(double.NaN, double.NaN);
|
||||
|
||||
DiagramViewModel.PropertyChanged += DiagramViewModel_PropertyChanged;
|
||||
}
|
||||
}
|
||||
|
||||
private void DiagramViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
|
||||
@@ -5,8 +5,17 @@ using AIStudio.Wpf.Flowchart;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
|
||||
{
|
||||
public class FlowchartEditorViewModel : BindableBase
|
||||
class FlowchartEditorViewModel : BaseViewModel
|
||||
{
|
||||
public FlowchartEditorViewModel()
|
||||
{
|
||||
Title = "FlowchartEditor";
|
||||
Info = "Encapsulated flowchart controls";
|
||||
|
||||
GetDataCommand = new SimpleCommand(GetDataExcute);
|
||||
SetDataCommand = new SimpleCommand(SetDataExcute);
|
||||
}
|
||||
|
||||
private List<SelectOption> _users = new List<SelectOption>()
|
||||
{
|
||||
new SelectOption(){ value = "操作员1",text = "操作员1" },
|
||||
@@ -108,12 +117,6 @@ namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public FlowchartEditorViewModel()
|
||||
{
|
||||
GetDataCommand = new SimpleCommand(GetDataExcute);
|
||||
SetDataCommand = new SimpleCommand(SetDataExcute);
|
||||
}
|
||||
|
||||
private void GetDataExcute(object obj)
|
||||
{
|
||||
OutputData = GetDataFunc();
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
|
||||
{
|
||||
class LockedViewModel : BaseViewModel
|
||||
{
|
||||
public LockedViewModel()
|
||||
{
|
||||
Title = "Locked models";
|
||||
Info = "All the nodes and links in this example are locked, they cannot be moved nor deleted." +
|
||||
//"All the TOP ports are locked as well, so you can't create links from/to them, but you can from/to the others." +
|
||||
"Newly created links aren't locked, so they can be deleted.";
|
||||
|
||||
_service.ColorViewModel.FillColor.Color = System.Windows.Media.Colors.Orange;
|
||||
|
||||
DiagramViewModel = new DiagramViewModel();
|
||||
DiagramViewModel.CellHorizontalAlignment = CellHorizontalAlignment.Center;
|
||||
DiagramViewModel.CellVerticalAlignment = CellVerticalAlignment.Center;
|
||||
DiagramViewModel.PageSizeType = PageSizeType.Custom;
|
||||
DiagramViewModel.PageSize = new Size(double.NaN, double.NaN);
|
||||
|
||||
DefaultDesignerItemViewModel node1 = new DefaultDesignerItemViewModel() { Left = 50, Top = 50, Text = "1" };
|
||||
//node1.LockObjectViewModel.LockObject.FirstOrDefault(p => p.LockFlag == LockFlag.All).IsChecked = true;//这个也可以
|
||||
node1.IsReadOnly = true;
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(node1);
|
||||
|
||||
DefaultDesignerItemViewModel node2 = new DefaultDesignerItemViewModel() { Left = 300, Top = 300, Text = "2" };
|
||||
//node2.LockObjectViewModel.LockObject.FirstOrDefault(p => p.LockFlag == LockFlag.All).IsChecked = true;//这个也可以
|
||||
node2.IsReadOnly = true;
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(node2);
|
||||
|
||||
DefaultDesignerItemViewModel node3 = new DefaultDesignerItemViewModel() { Left = 300, Top = 50, Text = "3" };
|
||||
//node3.LockObjectViewModel.LockObject.FirstOrDefault(p => p.LockFlag == LockFlag.All).IsChecked = true;//这个也可以
|
||||
node3.IsReadOnly = true;
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(node3);
|
||||
|
||||
ConnectionViewModel connector1 = new ConnectionViewModel(node1.RightConnector, node2.LeftConnector, DrawMode.ConnectingLineSmooth, RouterMode.RouterNormal);
|
||||
//connector1.LockObjectViewModel.LockObject.FirstOrDefault(p => p.LockFlag == LockFlag.All).IsChecked = true;//这个也可以
|
||||
connector1.IsReadOnly = true;
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(connector1);
|
||||
|
||||
ConnectionViewModel connector2 = new ConnectionViewModel(node2.RightConnector, node3.RightConnector, DrawMode.ConnectingLineStraight, RouterMode.RouterOrthogonal);
|
||||
// connector2.LockObjectViewModel.LockObject.FirstOrDefault(p => p.LockFlag == LockFlag.All).IsChecked = true;//这个也可以
|
||||
connector2.IsReadOnly = true;
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(connector2);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
|
||||
{
|
||||
class PerformanceViewModel : BaseViewModel
|
||||
{
|
||||
public PerformanceViewModel()
|
||||
{
|
||||
Title = "Performance";
|
||||
Info = "This diagram contains 100 nodes and 50 links";
|
||||
|
||||
_service.ColorViewModel.FillColor.Color = System.Windows.Media.Colors.Orange;
|
||||
|
||||
DiagramViewModel = new DiagramViewModel();
|
||||
DiagramViewModel.PageSizeType = PageSizeType.Custom;
|
||||
DiagramViewModel.PageSize = new Size(1000, 1000);
|
||||
|
||||
for (int r = 0; r < 10; r++)
|
||||
{
|
||||
for (int c = 0; c < 10; c += 2)
|
||||
{
|
||||
var node1 = new DefaultDesignerItemViewModel() { Left = 10 + c * 10 + c * 120, Top = 10 + r * 100, Text = $"{r * 10 + c}" };
|
||||
var node2 = new DefaultDesignerItemViewModel { Left = 10 + (c + 1) * 130, Top = 10 + r * 100, Text = $"{r * 10 + c + 1}" };
|
||||
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(new List<SelectableDesignerItemViewModelBase> { node1, node2 });
|
||||
|
||||
ConnectionViewModel connector1 = new ConnectionViewModel(node1.RightConnector, node2.LeftConnector);
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(connector1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
|
||||
{
|
||||
class SimpleViewModel : BindableBase
|
||||
class SimpleViewModel : BaseViewModel
|
||||
{
|
||||
public DiagramViewModel DiagramViewModel
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public SimpleViewModel()
|
||||
{
|
||||
//DesignerItemViewModelBase timer = new TimerDesignerItemViewModel() { Left = 0, Top = 10 };
|
||||
//DiagramViewModel.DirectAddItemCommand.Execute(timer);
|
||||
Title = "Simple";
|
||||
Info = "A simple example of AIStudio.Wpf.DiagramDesigner.";
|
||||
|
||||
_service.ColorViewModel.FillColor.Color = System.Windows.Media.Colors.Orange;
|
||||
|
||||
DiagramViewModel = new DiagramViewModel();
|
||||
DiagramViewModel.PageSizeType = PageSizeType.Custom;
|
||||
DiagramViewModel.PageSize = new Size(double.NaN, double.NaN);
|
||||
|
||||
DefaultDesignerItemViewModel node1 = new DefaultDesignerItemViewModel() { Left = 50, Top = 50, Text = "1" };
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(node1);
|
||||
|
||||
DefaultDesignerItemViewModel node2 = new DefaultDesignerItemViewModel() { Left = 300, Top = 300, Text = "2" };
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(node2);
|
||||
|
||||
DefaultDesignerItemViewModel node3 = new DefaultDesignerItemViewModel() { Left = 300, Top = 50, Text = "3" };
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(node3);
|
||||
|
||||
ConnectionViewModel connector1 = new ConnectionViewModel(node1.RightConnector, node2.LeftConnector, DrawMode.ConnectingLineSmooth, RouterMode.RouterNormal);
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(connector1);
|
||||
|
||||
ConnectionViewModel connector2 = new ConnectionViewModel(node2.RightConnector, node3.RightConnector, DrawMode.ConnectingLineStraight, RouterMode.RouterOrthogonal);
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(connector2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
|
||||
{
|
||||
class SnapToGridViewModel : BaseViewModel
|
||||
{
|
||||
public SnapToGridViewModel()
|
||||
{
|
||||
Title = "Snap to Grid";
|
||||
Info = "This diagram has a grid size of 100, moving nodes will make them automatically snap.";
|
||||
|
||||
_service.ColorViewModel.FillColor.Color = System.Windows.Media.Colors.Orange;
|
||||
|
||||
DiagramViewModel = new DiagramViewModel();
|
||||
DiagramViewModel.CellHorizontalAlignment = CellHorizontalAlignment.Center;
|
||||
DiagramViewModel.CellVerticalAlignment = CellVerticalAlignment.Center;
|
||||
DiagramViewModel.PageSizeType = PageSizeType.Custom;
|
||||
DiagramViewModel.PageSize = new Size(double.NaN, double.NaN);
|
||||
|
||||
DefaultDesignerItemViewModel node1 = new DefaultDesignerItemViewModel() { Left = 50, Top = 50, Text = "1" };
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(node1);
|
||||
|
||||
DefaultDesignerItemViewModel node2 = new DefaultDesignerItemViewModel() { Left = 300, Top = 300, Text = "2" };
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(node2);
|
||||
|
||||
DefaultDesignerItemViewModel node3 = new DefaultDesignerItemViewModel() { Left = 300, Top = 50, Text = "3" };
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(node3);
|
||||
|
||||
ConnectionViewModel connector1 = new ConnectionViewModel(node1.RightConnector, node2.LeftConnector, DrawMode.ConnectingLineSmooth, RouterMode.RouterNormal);
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(connector1);
|
||||
|
||||
ConnectionViewModel connector2 = new ConnectionViewModel(node2.RightConnector, node3.RightConnector, DrawMode.ConnectingLineStraight, RouterMode.RouterOrthogonal);
|
||||
DiagramViewModel.DirectAddItemCommand.Execute(connector2);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
23
AIStudio.Wpf.DiagramDesigner.Demo/Views/CustomNodeView.xaml
Normal file
23
AIStudio.Wpf.DiagramDesigner.Demo/Views/CustomNodeView.xaml
Normal file
@@ -0,0 +1,23 @@
|
||||
<UserControl x:Class="AIStudio.Wpf.DiagramDesigner.Demo.Views.CustomNodeView"
|
||||
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:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner.Demo;component/ViewModels/CustomDesignerItemViewModel.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
<controls:TitleControl/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
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.Demo.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// CustomNodeView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class CustomNodeView : UserControl
|
||||
{
|
||||
public CustomNodeView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:local="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Views"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid x:Name="grid">
|
||||
@@ -25,6 +25,8 @@
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl Grid.Column="1" x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
<controls:TitleControl Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
|
||||
<dd:PropertiesView Grid.Column="2" CustomSetting="True" SelectedObject="{Binding SelectedItem}" Width="200">
|
||||
<dd:PropertiesView.Resources>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:local="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Views"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
@@ -45,5 +45,7 @@
|
||||
Users="{Binding Users}"
|
||||
Roles="{Binding Roles}">
|
||||
</dd:FlowchartEditor>
|
||||
|
||||
<controls:TitleControl Grid.RowSpan="2"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
16
AIStudio.Wpf.DiagramDesigner.Demo/Views/LockedView.xaml
Normal file
16
AIStudio.Wpf.DiagramDesigner.Demo/Views/LockedView.xaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<UserControl x:Class="AIStudio.Wpf.DiagramDesigner.Demo.Views.LockedView"
|
||||
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:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
<controls:TitleControl/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
26
AIStudio.Wpf.DiagramDesigner.Demo/Views/LockedView.xaml.cs
Normal file
26
AIStudio.Wpf.DiagramDesigner.Demo/Views/LockedView.xaml.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
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.Demo.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// LockedView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class LockedView : UserControl
|
||||
{
|
||||
public LockedView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
20
AIStudio.Wpf.DiagramDesigner.Demo/Views/PerformanceView.xaml
Normal file
20
AIStudio.Wpf.DiagramDesigner.Demo/Views/PerformanceView.xaml
Normal file
@@ -0,0 +1,20 @@
|
||||
<UserControl x:Class="AIStudio.Wpf.DiagramDesigner.Demo.Views.PerformanceView"
|
||||
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:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<ScrollViewer x:Name="designerScrollViewer" Background="{DynamicResource GrayBrush8}"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Left"/>
|
||||
</ScrollViewer>
|
||||
|
||||
<controls:TitleControl/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
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.Demo.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// PerformanceView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class PerformanceView : UserControl
|
||||
{
|
||||
public PerformanceView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,13 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:local="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Views"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Grid>
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
<controls:TitleControl/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
16
AIStudio.Wpf.DiagramDesigner.Demo/Views/SnapToGridView.xaml
Normal file
16
AIStudio.Wpf.DiagramDesigner.Demo/Views/SnapToGridView.xaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<UserControl x:Class="AIStudio.Wpf.DiagramDesigner.Demo.Views.SnapToGridView"
|
||||
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:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.DiagramDesigner.Demo.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<!-- Diagram Control -->
|
||||
<dd:DiagramControl x:Name="diagram" DataContext="{Binding DiagramViewModel}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
|
||||
<controls:TitleControl/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
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.Demo.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// SnapToGridView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class SnapToGridView : UserControl
|
||||
{
|
||||
public SnapToGridView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,17 +8,45 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class ToolBoxData
|
||||
{
|
||||
public string Text { get; protected set; }
|
||||
public string Icon { get; protected set; }
|
||||
public Type Type { get; protected set; }
|
||||
public IColorViewModel ColorViewModel { get; set; }
|
||||
public double Width { get; set; }
|
||||
public double Height { get; set; }
|
||||
public Size? DesiredSize{ get; set; }
|
||||
public string Text
|
||||
{
|
||||
get; protected set;
|
||||
}
|
||||
public string Icon
|
||||
{
|
||||
get; protected set;
|
||||
}
|
||||
public Type Type
|
||||
{
|
||||
get; protected set;
|
||||
}
|
||||
public IColorViewModel ColorViewModel
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public double Width
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public double Height
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public Size? DesiredSize
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public string Description
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public object Addition { get; set; }
|
||||
public object Addition
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public ToolBoxData(string text, string icon, Type type, double width, double height, Size? desiredSize = null)
|
||||
public ToolBoxData(string text, string icon, Type type, double width, double height, Size? desiredSize = null, string description = null)
|
||||
{
|
||||
this.Text = text;
|
||||
this.Icon = icon;
|
||||
@@ -27,6 +55,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
this.Height = height;
|
||||
this.DesiredSize = desiredSize;
|
||||
this.ColorViewModel = new ColorViewModel();
|
||||
this.Description = description;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
100
AIStudio.Wpf.DiagramDesigner/Styles/TextBox.xaml
Normal file
100
AIStudio.Wpf.DiagramDesigner/Styles/TextBox.xaml
Normal file
@@ -0,0 +1,100 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:s="clr-namespace:AIStudio.Wpf.DiagramDesigner">
|
||||
<!--TextBox水印样式-->
|
||||
<Style TargetType="{x:Type TextBox}" x:Key="WaterTextBox">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||
<Grid x:Name="PART_Root">
|
||||
<Border x:Name="Bg" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}" />
|
||||
<Grid x:Name="PART_InnerGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--内容区域-->
|
||||
<ScrollViewer x:Name="PART_ContentHost" BorderThickness="0" Grid.Column="1" IsTabStop="False" Margin="2"
|
||||
VerticalAlignment="Stretch" Background="{x:Null}" >
|
||||
</ScrollViewer>
|
||||
<!--水印-->
|
||||
<TextBlock x:Name="Message" Padding="{TemplateBinding Padding}" Visibility="Collapsed"
|
||||
Text="{TemplateBinding s:ControlAttachProperty.Watermark}" Grid.Column="1"
|
||||
Foreground="{TemplateBinding Foreground}" IsHitTestVisible="False" Opacity="0.5"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="5,2,5,2" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<!--显示水印-->
|
||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Text}" Value="">
|
||||
<Setter TargetName="Message" Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--TextBox水印,阴影样式-->
|
||||
<Style TargetType="{x:Type TextBox}" x:Key="WaterTextBoxWithEffect">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||
<Grid x:Name="PART_Root">
|
||||
<Border x:Name="Bg" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}" />
|
||||
<Grid x:Name="PART_InnerGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--内容区域-->
|
||||
<ScrollViewer x:Name="PART_ContentHost" BorderThickness="0" Grid.Column="1" IsTabStop="False" Margin="2"
|
||||
VerticalAlignment="Stretch" Background="{x:Null}" >
|
||||
<ScrollViewer.Effect>
|
||||
<DropShadowEffect x:Name="effect" Color="{Binding FontViewModel.TextEffectColor}" ></DropShadowEffect>
|
||||
</ScrollViewer.Effect>
|
||||
</ScrollViewer>
|
||||
<!--水印-->
|
||||
<TextBlock x:Name="Message" Padding="{TemplateBinding Padding}" Visibility="Collapsed"
|
||||
Text="{TemplateBinding s:ControlAttachProperty.Watermark}" Grid.Column="1"
|
||||
Foreground="{TemplateBinding Foreground}" IsHitTestVisible="False" Opacity="0.5"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="5,2,5,2" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<!--显示水印-->
|
||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Text}" Value="">
|
||||
<Setter TargetName="Message" Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding FontViewModel.TextEffectColor}" Value="Transparent">
|
||||
<Setter TargetName="PART_ContentHost" Property="Effect" Value="{x:Null}"/>
|
||||
</DataTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
@@ -15,6 +15,12 @@
|
||||
<s:LineDashConverter x:Key="LineDashConverter"/>
|
||||
<s:ClipConverter x:Key="ClipConverter"/>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:DefaultDesignerItemViewModel}">
|
||||
<Grid IsHitTestVisible="False">
|
||||
<Rectangle StrokeThickness="1" Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}" Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type s:TextDesignerItemViewModel}">
|
||||
<Grid >
|
||||
<Border Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}" IsHitTestVisible="False"/>
|
||||
|
||||
@@ -9,5 +9,14 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/AIStudio.Wpf.DiagramDesigner;component/Themes/DesignerItem.xaml" />
|
||||
<ResourceDictionary Source="/AIStudio.Wpf.DiagramDesigner;component/Themes/ConnectorItem.xaml" />
|
||||
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ScrollBar.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/Expander.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/GroupBox.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ToolTip.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ScrollViewer.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/TextBox.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ZoomBox.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.DiagramDesigner;component/Styles/ComboBox.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
@@ -316,21 +316,41 @@
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector DataContext="{Binding TopLeftConnector}" Style="{Binding Style, Converter={StaticResource ConectorStyleConverter},ConverterParameter={StaticResource DefaultConnectorStyle}}"
|
||||
Orientation="TopLeft"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Left"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector DataContext="{Binding TopConnector}" Style="{Binding Style, Converter={StaticResource ConectorStyleConverter},ConverterParameter={StaticResource DefaultConnectorStyle}}"
|
||||
Orientation="Top"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Center"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector DataContext="{Binding TopRightConnector}" Style="{Binding Style, Converter={StaticResource ConectorStyleConverter},ConverterParameter={StaticResource DefaultConnectorStyle}}"
|
||||
Orientation="TopRight"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Right"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector DataContext="{Binding RightConnector}" Style="{Binding Style, Converter={StaticResource ConectorStyleConverter},ConverterParameter={StaticResource DefaultConnectorStyle}}"
|
||||
Orientation="Right"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector DataContext="{Binding BottomRightConnector}" Style="{Binding Style, Converter={StaticResource ConectorStyleConverter},ConverterParameter={StaticResource DefaultConnectorStyle}}"
|
||||
Orientation="BottomRight"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Right"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector DataContext="{Binding BottomConnector}" Style="{Binding Style, Converter={StaticResource ConectorStyleConverter},ConverterParameter={StaticResource DefaultConnectorStyle}}"
|
||||
Orientation="Bottom"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Center"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
<s:Connector DataContext="{Binding BottomLeftConnector}" Style="{Binding Style, Converter={StaticResource ConectorStyleConverter},ConverterParameter={StaticResource DefaultConnectorStyle}}"
|
||||
Orientation="BottomLeft"
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Left"
|
||||
Visibility="{Binding Path=ShowConnectors, Converter={x:Static s:BoolToVisibilityConverter.Instance}}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
@@ -523,7 +543,7 @@
|
||||
<ContextMenu>
|
||||
<MenuItem Header="删除" Command="{Binding DeleteConnectionCommand}" CommandParameter="{Binding}"/>
|
||||
<MenuItem Header="添加文本" Command="{Binding AddLabelCommand}" CommandParameter="{Binding}"/>
|
||||
<MenuItem Header="插入点(按住ctrl可一直插入)" IsCheckable="True" IsChecked="{Binding ShouldInsertAnchor}" />
|
||||
<MenuItem Header="插入点(按住ctrl可一直插入)" IsCheckable="True" IsChecked="{Binding ShouldInsertAnchor}" IsEnabled="{Binding IsReadOnly,Converter={s:InvertBoolConverter}}" />
|
||||
</ContextMenu>
|
||||
</Grid.ContextMenu>
|
||||
|
||||
|
||||
@@ -7,59 +7,15 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<s:ColorBrushConverter x:Key="ColorBrushConverter" />
|
||||
<s:TrueToFalseConverter x:Key="TrueToFalseConverter"/>
|
||||
<!--TextBox默认样式-->
|
||||
<Style TargetType="{x:Type TextBox}" x:Key="WaterTextBox">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||
<Grid x:Name="PART_Root">
|
||||
<Border x:Name="Bg" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}" />
|
||||
<Grid x:Name="PART_InnerGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--内容区域-->
|
||||
<ScrollViewer x:Name="PART_ContentHost" BorderThickness="0" Grid.Column="1" IsTabStop="False" Margin="2"
|
||||
VerticalAlignment="Stretch" Background="{x:Null}" >
|
||||
<ScrollViewer.Effect>
|
||||
<DropShadowEffect x:Name="effect" Color="{Binding FontViewModel.TextEffectColor}" ></DropShadowEffect>
|
||||
</ScrollViewer.Effect>
|
||||
</ScrollViewer>
|
||||
<!--水印-->
|
||||
<TextBlock x:Name="Message" Padding="{TemplateBinding Padding}" Visibility="Collapsed"
|
||||
Text="{TemplateBinding s:ControlAttachProperty.Watermark}" Grid.Column="1"
|
||||
Foreground="{TemplateBinding Foreground}" IsHitTestVisible="False" Opacity="0.5"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="5,2,5,2" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<!--显示水印-->
|
||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Text}" Value="">
|
||||
<Setter TargetName="Message" Property="Visibility" Value="Visible" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding FontViewModel.TextEffectColor}" Value="Transparent">
|
||||
<Setter TargetName="PART_ContentHost" Property="Effect" Value="{x:Null}"/>
|
||||
</DataTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/AIStudio.Wpf.DiagramDesigner;component/Styles/TextBox.xaml" />
|
||||
<ResourceDictionary>
|
||||
<s:ColorBrushConverter x:Key="ColorBrushConverter" />
|
||||
<s:TrueToFalseConverter x:Key="TrueToFalseConverter"/>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid IsHitTestVisible="{Binding IsHitTestVisible}">
|
||||
<TextBox x:Name="PART_TextBlock"
|
||||
@@ -76,7 +32,7 @@
|
||||
TextBlock.LineHeight="{Binding FontViewModel.LineHeight}"
|
||||
AcceptsReturn="True"
|
||||
s:ControlAttachProperty.Watermark="{Binding Path=(s:ControlAttachProperty.Watermark),RelativeSource={RelativeSource AncestorType={x:Type s:TextControl}}}"
|
||||
Style="{StaticResource WaterTextBox}" IsReadOnly="True">
|
||||
Style="{StaticResource WaterTextBoxWithEffect}" IsReadOnly="True">
|
||||
|
||||
</TextBox>
|
||||
<TextBox x:Name="PART_ShowText"
|
||||
@@ -94,7 +50,7 @@
|
||||
TextBlock.LineHeight="{Binding FontViewModel.LineHeight}"
|
||||
AcceptsReturn="True"
|
||||
s:ControlAttachProperty.Watermark="{Binding Path=(s:ControlAttachProperty.Watermark),RelativeSource={RelativeSource AncestorType={x:Type s:TextControl}}}"
|
||||
Style="{StaticResource WaterTextBox}" Visibility="Collapsed">
|
||||
Style="{StaticResource WaterTextBoxWithEffect}" Visibility="Collapsed">
|
||||
</TextBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -23,6 +23,11 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
Init(sourceConnectorInfo, sinkConnectorInfo);
|
||||
}
|
||||
|
||||
public ConnectionViewModel(FullyCreatedConnectorInfo sourceConnectorInfo, ConnectorInfoBase sinkConnectorInfo, DrawMode drawMode = DrawMode.ConnectingLineSmooth, RouterMode routerMode = AIStudio.Wpf.DiagramDesigner.RouterMode.RouterNormal) : this(null, sourceConnectorInfo, sinkConnectorInfo, drawMode, routerMode)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ConnectionViewModel(IDiagramViewModel root, FullyCreatedConnectorInfo sourceConnectorInfo, FullyCreatedConnectorInfo sinkConnectorInfo, ConnectionItem designer) : base(root, designer)
|
||||
{
|
||||
PathMode = designer.PathMode;
|
||||
@@ -31,11 +36,6 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
Init(sourceConnectorInfo, sinkConnectorInfo);
|
||||
}
|
||||
|
||||
public ConnectionViewModel(FullyCreatedConnectorInfo sourceConnectorInfo, ConnectorInfoBase sinkConnectorInfo, DrawMode drawMode, RouterMode routerMode) : this(null, sourceConnectorInfo, sinkConnectorInfo, drawMode, routerMode)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override SelectableItemBase GetSerializableObject()
|
||||
{
|
||||
if (IsFullConnection)
|
||||
@@ -56,7 +56,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
if (Root != null && Root.ColorViewModel != null)
|
||||
{
|
||||
this.ColorViewModel = CopyHelper.Mapper(Root.ColorViewModel);
|
||||
this.ColorViewModel = CopyHelper.Mapper(Root.ColorViewModel);
|
||||
}
|
||||
this.ColorViewModel.FillColor.Color = Colors.Red;
|
||||
if (sinkConnectorInfo is FullyCreatedConnectorInfo sink && sink.DataItem.ShowArrow == false)
|
||||
@@ -74,9 +74,9 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
this.SourceConnectorInfo = sourceConnectorInfo;
|
||||
this.SinkConnectorInfo = sinkConnectorInfo;
|
||||
DeleteConnectionCommand = new SimpleCommand(DeleteConnection);
|
||||
AddVertexCommand = new SimpleCommand(AddVertex);
|
||||
AddLabelCommand = new SimpleCommand(AddLabel);
|
||||
DeleteConnectionCommand = new SimpleCommand(Command_Enable, DeleteConnection);
|
||||
AddVertexCommand = new SimpleCommand(Command_Enable, AddVertex);
|
||||
AddLabelCommand = new SimpleCommand(Command_Enable, AddLabel);
|
||||
}
|
||||
|
||||
protected override void LoadDesignerItemViewModel(IDiagramViewModel root, SelectableItemBase designerbase)
|
||||
@@ -88,7 +88,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
Vertices = new ObservableCollection<ConnectorVertexModel>(designer.Vertices.Select(p => new ConnectorVertexModel(this.Root, this, designer)));
|
||||
Labels = new ObservableCollection<ConnectorLabelModel>(designer.Labels.Select(p => new ConnectorLabelModel(this.Root, this, designer)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 属性
|
||||
private string _text;
|
||||
@@ -300,7 +300,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private LineAnimation _lineAnimation = LineAnimation.None;
|
||||
[Browsable(true)]
|
||||
[CanDo]
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
base.Init();
|
||||
|
||||
DeleteLabelCommand = new SimpleCommand(DeleteLabel);
|
||||
DeleteLabelCommand = new SimpleCommand(Command_Enable, DeleteLabel);
|
||||
}
|
||||
|
||||
protected override void LoadDesignerItemViewModel(IDiagramViewModel root, SelectableItemBase designerbase)
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
base.Init();
|
||||
|
||||
DeleteVertexCommand = new SimpleCommand(DeleteVertex);
|
||||
DeleteVertexCommand = new SimpleCommand(Command_Enable, DeleteVertex);
|
||||
}
|
||||
|
||||
protected override void LoadDesignerItemViewModel(IDiagramViewModel root, SelectableItemBase designerbase)
|
||||
|
||||
@@ -50,8 +50,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
base.Init();
|
||||
|
||||
menuOptions = new List<CinchMenuItem>();
|
||||
MenuItemCommand = new SimpleCommand(ExecuteMenuItemCommand);
|
||||
DeleteCommand = new SimpleCommand(ExecuteDeleteCommand);
|
||||
MenuItemCommand = new SimpleCommand(Command_Enable, ExecuteMenuItemCommand);
|
||||
DeleteCommand = new SimpleCommand(Command_Enable, ExecuteDeleteCommand);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -68,22 +68,66 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
#region 属性
|
||||
public FullyCreatedConnectorInfo TopConnector
|
||||
{
|
||||
get { return (connectors != null && connectors.Count >= 1) ? connectors[0] : null; }
|
||||
get
|
||||
{
|
||||
return connectors?.FirstOrDefault(p => p.Orientation == ConnectorOrientation.Top);
|
||||
}
|
||||
}
|
||||
|
||||
public FullyCreatedConnectorInfo BottomConnector
|
||||
{
|
||||
get { return (connectors != null && connectors.Count >= 2) ? connectors[1] : null; }
|
||||
get
|
||||
{
|
||||
return connectors?.FirstOrDefault(p => p.Orientation == ConnectorOrientation.Bottom);
|
||||
}
|
||||
}
|
||||
|
||||
public FullyCreatedConnectorInfo LeftConnector
|
||||
{
|
||||
get { return (connectors != null && connectors.Count >= 3) ? connectors[2] : null; }
|
||||
get
|
||||
{
|
||||
return connectors?.FirstOrDefault(p => p.Orientation == ConnectorOrientation.Left);
|
||||
}
|
||||
}
|
||||
|
||||
public FullyCreatedConnectorInfo RightConnector
|
||||
{
|
||||
get { return (connectors != null && connectors.Count >= 4) ? connectors[3] : null; }
|
||||
get
|
||||
{
|
||||
return connectors?.FirstOrDefault(p => p.Orientation == ConnectorOrientation.Right);
|
||||
}
|
||||
}
|
||||
|
||||
public FullyCreatedConnectorInfo TopLeftConnector
|
||||
{
|
||||
get
|
||||
{
|
||||
return connectors?.FirstOrDefault(p => p.Orientation == ConnectorOrientation.TopLeft);
|
||||
}
|
||||
}
|
||||
|
||||
public FullyCreatedConnectorInfo TopRightConnector
|
||||
{
|
||||
get
|
||||
{
|
||||
return connectors?.FirstOrDefault(p => p.Orientation == ConnectorOrientation.TopRight);
|
||||
}
|
||||
}
|
||||
|
||||
public FullyCreatedConnectorInfo BottomLeftConnector
|
||||
{
|
||||
get
|
||||
{
|
||||
return connectors?.FirstOrDefault(p => p.Orientation == ConnectorOrientation.BottomLeft);
|
||||
}
|
||||
}
|
||||
|
||||
public FullyCreatedConnectorInfo BottomRightConnector
|
||||
{
|
||||
get
|
||||
{
|
||||
return connectors?.FirstOrDefault(p => p.Orientation == ConnectorOrientation.BottomRight);
|
||||
}
|
||||
}
|
||||
|
||||
public Style ConnectorStyle
|
||||
@@ -244,7 +288,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
[CanDo]
|
||||
[CanDo]
|
||||
public PointBase TopLeft
|
||||
{
|
||||
get
|
||||
@@ -317,13 +361,28 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
/// <summary>
|
||||
/// 连接点是否可以按偏移自定义
|
||||
/// </summary>
|
||||
public bool IsInnerConnector { get; set; }
|
||||
public bool IsInnerConnector
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
private ObservableCollection<FullyCreatedConnectorInfo> connectors = new ObservableCollection<FullyCreatedConnectorInfo>();
|
||||
public IEnumerable<FullyCreatedConnectorInfo> Connectors { get { return connectors; } }
|
||||
protected ObservableCollection<FullyCreatedConnectorInfo> connectors = new ObservableCollection<FullyCreatedConnectorInfo>();
|
||||
public IEnumerable<FullyCreatedConnectorInfo> Connectors
|
||||
{
|
||||
get
|
||||
{
|
||||
return connectors;
|
||||
}
|
||||
}
|
||||
|
||||
protected ObservableCollection<CinchMenuItem> menuOptions;
|
||||
public IEnumerable<CinchMenuItem> MenuOptions { get { return menuOptions; } }
|
||||
public IEnumerable<CinchMenuItem> MenuOptions
|
||||
{
|
||||
get
|
||||
{
|
||||
return menuOptions;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShowMenuOptions
|
||||
{
|
||||
@@ -336,7 +395,10 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
public bool BeginDo { get; set; }
|
||||
public bool BeginDo
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public IObservable<NotifyCollectionChangedEventArgs> WhenConnectorsChanged
|
||||
{
|
||||
@@ -415,7 +477,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
this.Top = (int)(this.Top / Root.GridCellSize.Height) * Root.GridCellSize.Height + Root.GridMarginSize.Height + (Root.GridCellSize.Height - this.ItemHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void RaiseTopLeft()
|
||||
@@ -443,7 +505,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
var rightPort = RightConnector;
|
||||
var bottomPort = BottomConnector;
|
||||
|
||||
var left = leftPort == null ? Position.X: Math.Min(Position.X, leftPort.Position.X);
|
||||
var left = leftPort == null ? Position.X : Math.Min(Position.X, leftPort.Position.X);
|
||||
var top = topPort == null ? Position.Y : Math.Min(Position.Y, topPort.Position.Y);
|
||||
var right = rightPort == null ? Position.X + ItemWidth :
|
||||
Math.Max(rightPort.Position.X + rightPort.ConnectorWidth, Position.X + ItemWidth);
|
||||
|
||||
@@ -42,8 +42,13 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
base.Init();
|
||||
|
||||
SelectItemCommand = new SimpleCommand(ExecuteSelectItemCommand);
|
||||
EditCommand = new SimpleCommand(ExecuteEditCommand);
|
||||
SelectItemCommand = new SimpleCommand(Command_Enable, ExecuteSelectItemCommand);
|
||||
EditCommand = new SimpleCommand(Command_Enable, ExecuteEditCommand);
|
||||
}
|
||||
|
||||
protected override void LoadDesignerItemViewModel(IDiagramViewModel root, SelectableItemBase designerbase)
|
||||
{
|
||||
base.LoadDesignerItemViewModel(root, designerbase);
|
||||
}
|
||||
|
||||
public virtual bool InitData()
|
||||
@@ -62,7 +67,29 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
public ICommand EditCommand
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isSelected;
|
||||
[Browsable(false)]
|
||||
public override bool IsSelected
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isSelected;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref _isSelected, value))
|
||||
{
|
||||
//如果没有文字,失去焦点自动清除
|
||||
if (_isSelected == false && string.IsNullOrEmpty(Text))
|
||||
{
|
||||
ShowText = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private string _text;
|
||||
[Browsable(true)]
|
||||
|
||||
@@ -261,6 +261,11 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
}
|
||||
|
||||
protected bool Command_Enable(object para)
|
||||
{
|
||||
return IsReadOnly == false;
|
||||
}
|
||||
|
||||
private void FontViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName == "FontCase")
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using AIStudio.Wpf.DiagramDesigner;
|
||||
using AIStudio.Wpf.DiagramDesigner.Models;
|
||||
using AIStudio.Wpf.DiagramDesigner.Services;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class DefaultDesignerItemViewModel : DesignerItemViewModelBase
|
||||
{
|
||||
public DefaultDesignerItemViewModel() : base()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DefaultDesignerItemViewModel(IDiagramViewModel root, SelectableItemBase designer) : base(root, designer)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DefaultDesignerItemViewModel(IDiagramViewModel root, SerializableItem serializableItem, string serializableType) : base(root, serializableItem, serializableType)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override SelectableItemBase GetSerializableObject()
|
||||
{
|
||||
return new DesignerItemBase(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -43,8 +43,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
AddItemCommand = new SimpleCommand(ExecuteAddItemCommand);
|
||||
ImageSwitchCommand = new SimpleCommand(ExecuteImageSwitchCommand);
|
||||
AddItemCommand = new SimpleCommand(Command_Enable, ExecuteAddItemCommand);
|
||||
ImageSwitchCommand = new SimpleCommand(Command_Enable, ExecuteImageSwitchCommand);
|
||||
|
||||
base.Init();
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._menuItemCommand ?? (this._menuItemCommand = new SimpleCommand(ExecuteMenuItemCommand));
|
||||
return this._menuItemCommand ?? (this._menuItemCommand = new SimpleCommand(Command_Enable, ExecuteMenuItemCommand));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
ShowRotate = false;
|
||||
ShowArrow = false;
|
||||
AddInputCommand = new SimpleCommand(para => ExecuteAddInput(para));
|
||||
AddOutputCommand = new SimpleCommand(para => ExecuteAddOutput(para));
|
||||
AddInputCommand = new SimpleCommand(Command_Enable, para => ExecuteAddInput(para));
|
||||
AddOutputCommand = new SimpleCommand(Command_Enable, para => ExecuteAddOutput(para));
|
||||
|
||||
base.Init();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._menuItemCommand ?? (this._menuItemCommand = new SimpleCommand(ExecuteMenuItemCommand));
|
||||
return this._menuItemCommand ?? (this._menuItemCommand = new SimpleCommand(Command_Enable, ExecuteMenuItemCommand));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
MenuItemCommand = new SimpleCommand(ExecuteMenuItemCommand);
|
||||
MenuItemCommand = new SimpleCommand(Command_Enable, ExecuteMenuItemCommand);
|
||||
base.Init();
|
||||
|
||||
this.ClearConnectors();
|
||||
|
||||
@@ -874,7 +874,7 @@ namespace AIStudio.Wpf.Logical.ViewModels
|
||||
|
||||
protected override void Init()
|
||||
{
|
||||
MenuItemCommand = new SimpleCommand(ExecuteMenuItemCommand);
|
||||
MenuItemCommand = new SimpleCommand(Command_Enable, ExecuteMenuItemCommand);
|
||||
base.Init();
|
||||
|
||||
readDataTimer.Elapsed += timeCycle;
|
||||
|
||||
Reference in New Issue
Block a user