Flowchart

This commit is contained in:
艾竹
2022-12-04 23:07:20 +08:00
parent dc42f75610
commit 0487857d7b
30 changed files with 1621 additions and 383 deletions

View File

@@ -15,9 +15,6 @@ namespace AIStudio.Wpf.Flowchart.ViewModels
{
Kind = kind;
Text = Kind.GetDescription();
ItemWidth = 80;
ItemHeight = 40;
}
public FlowNode(IDiagramViewModel parent, DesignerItemBase designer) : base(parent, designer)
@@ -70,6 +67,9 @@ namespace AIStudio.Wpf.Flowchart.ViewModels
[Browsable(false)]
public string StateImage { get; set; }
[Browsable(true)]
public string Name{ get; set; }
#region 使,
private int _status;
@@ -102,7 +102,8 @@ namespace AIStudio.Wpf.Flowchart.ViewModels
get
{
return new Dictionary<string, string>()
{
{
{ "Name","名称" },
{ "Text","文本" },
};
}

View File

@@ -87,6 +87,7 @@ namespace AIStudio.Wpf.Flowchart.ViewModels
{
return new Dictionary<string, string>()
{
{ "Name","名称" },
{ "Text","文本" },
{"UserIds", "用户" },
{"RoleIds", "角色" },

View File

@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Media;
using AIStudio.Wpf.DiagramDesigner;
using AIStudio.Wpf.DiagramDesigner.Helpers;
using AIStudio.Wpf.Flowchart;
using AIStudio.Wpf.Flowchart.Models;
@@ -15,12 +17,13 @@ namespace AIStudio.Wpf.Flowchart.ViewModels
public ToolBoxViewModel()
{
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Start, typeof(StartFlowNode), 80, 48));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.End, typeof(EndFlowNode), 80, 48));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Middle, typeof(MiddleFlowNode), 80, 48));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Decide, typeof(DecideFlowNode), 80, 48));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.COBegin, typeof(COBeginFlowNode), 80, 48));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.COEnd, typeof(COEndFlowNode), 80, 48));
var screenScale = ScreenHelper.ResetScreenScale();
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Start, typeof(StartFlowNode), 80, 60, new Size(100 / screenScale, 80/ screenScale)));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.End, typeof(EndFlowNode), 80, 60, new Size(100 / screenScale, 80 / screenScale)));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Middle, typeof(MiddleFlowNode), 80, 60, new Size(100 / screenScale, 80 / screenScale)));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Decide, typeof(DecideFlowNode), 80, 60, new Size(100 / screenScale, 80 / screenScale)));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.COBegin, typeof(COBeginFlowNode), 80, 60, new Size(100 / screenScale, 80 / screenScale)));
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.COEnd, typeof(COEndFlowNode), 80, 60, new Size(100 / screenScale, 80 / screenScale)));
}
public List<ToolBoxData> ToolBoxItems