mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-20 00:16:36 +08:00
使用PointBase代替Point
This commit is contained in:
@@ -33,7 +33,10 @@ namespace AIStudio.Wpf.Flowchart
|
||||
private static List<SelectOption> _users;
|
||||
public static List<SelectOption> Users
|
||||
{
|
||||
get { return _users; }
|
||||
get
|
||||
{
|
||||
return _users;
|
||||
}
|
||||
set
|
||||
{
|
||||
_users = value;
|
||||
@@ -43,7 +46,10 @@ namespace AIStudio.Wpf.Flowchart
|
||||
private static List<SelectOption> _roles;
|
||||
public static List<SelectOption> Roles
|
||||
{
|
||||
get { return _roles; }
|
||||
get
|
||||
{
|
||||
return _roles;
|
||||
}
|
||||
set
|
||||
{
|
||||
_roles = value;
|
||||
@@ -67,20 +73,22 @@ namespace AIStudio.Wpf.Flowchart
|
||||
{
|
||||
foreach (var edge in connectors)
|
||||
{
|
||||
if (edge.IsFullConnection == false) continue;
|
||||
|
||||
var source = oASteps.FirstOrDefault(p => p.BottomConnector == edge.SourceConnectorInfo || p.LeftConnector == edge.SourceConnectorInfo || p.RightConnector == edge.SourceConnectorInfo);
|
||||
if (source != null)
|
||||
{
|
||||
if (source.Kind == NodeKinds.Decide)
|
||||
{
|
||||
source.SelectNextStep.Add((edge.SinkConnectorInfo as FullyCreatedConnectorInfo).DataItem.Id.ToString(), "data.Flag" + edge.Text);
|
||||
source.SelectNextStep.Add(edge.SinkConnectorInfoFully.DataItem.Id.ToString(), "data.Flag" + edge.Text);
|
||||
}
|
||||
else if (source.Kind == NodeKinds.COBegin)
|
||||
{
|
||||
source.SelectNextStep.Add((edge.SinkConnectorInfo as FullyCreatedConnectorInfo).DataItem.Id.ToString(), "True");
|
||||
source.SelectNextStep.Add(edge.SinkConnectorInfoFully.DataItem.Id.ToString(), "True");
|
||||
}
|
||||
else
|
||||
{
|
||||
source.NextStepId = (edge.SinkConnectorInfo as FullyCreatedConnectorInfo).DataItem.Id.ToString();
|
||||
source.NextStepId = edge.SinkConnectorInfoFully.DataItem.Id.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,7 +134,7 @@ namespace AIStudio.Wpf.Flowchart
|
||||
var nodes = InitStep(oASteps, nextstepid);
|
||||
nodes.Insert(0, oAStartStep);
|
||||
|
||||
FlowNodes.Add(viewModel, nodes);
|
||||
FlowNodes.Add(viewModel, nodes);
|
||||
|
||||
Approve(oAStartStep, 100);
|
||||
}
|
||||
@@ -213,7 +221,7 @@ namespace AIStudio.Wpf.Flowchart
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
SetStatus(flowNode, status, remark);
|
||||
@@ -287,8 +295,8 @@ namespace AIStudio.Wpf.Flowchart
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
}
|
||||
//如果表达式错了,就按第一个处理
|
||||
@@ -372,6 +380,6 @@ namespace AIStudio.Wpf.Flowchart
|
||||
public static void DisposeData(IDiagramViewModel viewModel)
|
||||
{
|
||||
FlowNodes.Remove(viewModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user