mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-05 08:46:34 +08:00
mind
This commit is contained in:
@@ -357,22 +357,22 @@ namespace AIStudio.Wpf.Flowchart
|
||||
switch (status)
|
||||
{
|
||||
case 100:
|
||||
flowNode.Color = Colors.Green.ToString();
|
||||
flowNode.StatusColor = Colors.Green.ToString();
|
||||
break;
|
||||
case 0:
|
||||
flowNode.Color = Colors.Yellow.ToString();
|
||||
flowNode.StatusColor = Colors.Yellow.ToString();
|
||||
break;
|
||||
case 1:
|
||||
flowNode.Color = Colors.Orange.ToString();
|
||||
flowNode.StatusColor = Colors.Orange.ToString();
|
||||
break;
|
||||
case 2:
|
||||
flowNode.Color = Colors.Red.ToString();
|
||||
flowNode.StatusColor = Colors.Red.ToString();
|
||||
break;
|
||||
case 3:
|
||||
flowNode.Color = Colors.Red.ToString();
|
||||
flowNode.StatusColor = Colors.Red.ToString();
|
||||
break;
|
||||
case 4:
|
||||
flowNode.Color = Colors.Red.ToString();
|
||||
flowNode.StatusColor = Colors.Red.ToString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace AIStudio.Wpf.Flowchart.Models
|
||||
RoleIds = middleFlow.RoleIds;
|
||||
ActType = middleFlow.ActType;
|
||||
}
|
||||
Color = item.Color;
|
||||
Color = item.StatusColor;
|
||||
Kind = item.Kind;
|
||||
StateImage = item.StateImage;
|
||||
}
|
||||
|
||||
@@ -58,6 +58,17 @@ namespace AIStudio.Wpf.Flowchart.Models
|
||||
get; set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the color.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The color.
|
||||
/// </value>
|
||||
public string StatusColor
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public override DiagramItemViewModel ToNodel(IDiagramViewModel diagramViewModel)
|
||||
{
|
||||
FlowNode flowNode = null;
|
||||
@@ -108,7 +119,7 @@ namespace AIStudio.Wpf.Flowchart.Models
|
||||
}
|
||||
|
||||
flowNode.Name = Name;
|
||||
flowNode.Color = Color;
|
||||
flowNode.StatusColor = StatusColor;
|
||||
flowNode.Kind = Kind;
|
||||
|
||||
return flowNode;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<Grid>
|
||||
<Border BorderThickness="1" BorderBrush="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}" Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}">
|
||||
<Grid>
|
||||
<Border HorizontalAlignment="Left" Width="3" Background="{Binding Color}"/>
|
||||
<Border HorizontalAlignment="Left" Width="3" Background="{Binding StatusColor}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -19,7 +19,7 @@
|
||||
<Grid>
|
||||
<Border CornerRadius="3" BorderThickness="1" BorderBrush="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}" Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}">
|
||||
<Grid>
|
||||
<Border HorizontalAlignment="Left" CornerRadius="3,0,0,3" Width="3" Background="{Binding Color}"/>
|
||||
<Border HorizontalAlignment="Left" CornerRadius="3,0,0,3" Width="3" Background="{Binding StatusColor}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -29,7 +29,7 @@
|
||||
<Grid>
|
||||
<Border CornerRadius="3" BorderThickness="1" BorderBrush="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}" Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}">
|
||||
<Grid>
|
||||
<Border HorizontalAlignment="Left" CornerRadius="3,0,0,3" Width="3" Background="{Binding Color}"/>
|
||||
<Border HorizontalAlignment="Left" CornerRadius="3,0,0,3" Width="3" Background="{Binding StatusColor}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -39,7 +39,7 @@
|
||||
<Grid>
|
||||
<Border BorderThickness="1" BorderBrush="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}" Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}">
|
||||
<Grid>
|
||||
<Border HorizontalAlignment="Left" Width="3" Background="{Binding Color}"/>
|
||||
<Border HorizontalAlignment="Left" Width="3" Background="{Binding StatusColor}"/>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
@@ -62,7 +62,7 @@
|
||||
<Grid>
|
||||
<Border BorderThickness="1" BorderBrush="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}" Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}">
|
||||
<Grid>
|
||||
<Border HorizontalAlignment="Left" Width="3" Background="{Binding Color}"/>
|
||||
<Border HorizontalAlignment="Left" Width="3" Background="{Binding StatusColor}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -72,7 +72,7 @@
|
||||
<Grid>
|
||||
<Border BorderThickness="1" BorderBrush="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}" Background="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}">
|
||||
<Grid>
|
||||
<Border HorizontalAlignment="Left" Width="3" Background="{Binding Color}"/>
|
||||
<Border HorizontalAlignment="Left" Width="3" Background="{Binding StatusColor}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace AIStudio.Wpf.Flowchart.ViewModels
|
||||
|
||||
if (designerbase is FlowNodeDesignerItem designer)
|
||||
{
|
||||
this.Color = designer.Color;
|
||||
this.StatusColor = designer.Color;
|
||||
this.Kind = designer.Kind;
|
||||
this.StateImage = designer.StateImage;
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace AIStudio.Wpf.Flowchart.ViewModels
|
||||
var flowchartNode = new FlowchartNode();
|
||||
|
||||
flowchartNode.Name = Name;
|
||||
flowchartNode.Color = Color;
|
||||
flowchartNode.StatusColor = StatusColor;
|
||||
flowchartNode.Kind = Kind;
|
||||
if (this is MiddleFlowNode middleflowNode)
|
||||
{
|
||||
@@ -88,7 +88,7 @@ namespace AIStudio.Wpf.Flowchart.ViewModels
|
||||
|
||||
private string _color = "#1890ff";
|
||||
[Browsable(false)]
|
||||
public string Color
|
||||
public string StatusColor
|
||||
{
|
||||
get { return _color; }
|
||||
set
|
||||
|
||||
Reference in New Issue
Block a user