mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-17 15:06:36 +08:00
Flowchart
This commit is contained in:
@@ -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","文本" },
|
||||
};
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ namespace AIStudio.Wpf.Flowchart.ViewModels
|
||||
{
|
||||
return new Dictionary<string, string>()
|
||||
{
|
||||
{ "Name","名称" },
|
||||
{ "Text","文本" },
|
||||
{"UserIds", "用户" },
|
||||
{"RoleIds", "角色" },
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user