mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-29 20:53:24 +08:00
可以切换主题
This commit is contained in:
@@ -13,7 +13,12 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
public class FishBoneLayout : IMindLayout
|
||||
{
|
||||
public void Appearance(MindNode mindNode, bool initAppearance)
|
||||
public void Appearance(MindNode mindNode)
|
||||
{
|
||||
Appearance(mindNode, null, false);
|
||||
}
|
||||
|
||||
public void Appearance(MindNode mindNode, MindThemeModel mindThemeModel, bool initAppearance)
|
||||
{
|
||||
if (mindNode == null) return;
|
||||
|
||||
@@ -25,18 +30,11 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
mindNode.ItemWidth = 110;
|
||||
mindNode.ItemHeight = 40;
|
||||
mindNode.ClearConnectors();
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Right, true) { XRatio = 1, YRatio = 0.5 };
|
||||
mindNode.AddConnector(port);
|
||||
|
||||
mindNode.ColorViewModel.FillColor.Color = Color.FromRgb(0x73, 0xa1, 0xbf);
|
||||
mindNode.ColorViewModel.LineColor.Color = Color.FromRgb(0x73, 0xa1, 0xbf);
|
||||
mindNode.FontViewModel.FontColor = Colors.White;
|
||||
mindNode.FontViewModel.FontSize = 15;
|
||||
mindNode.Spacing = new SizeBase(50, 15);
|
||||
}
|
||||
mindNode.ShapeViewModel.SinkMarker.PathStyle = ArrowPathStyle.None;
|
||||
mindNode.ShapeViewModel.SinkMarker.SizeStyle = ArrowSizeStyle.VerySmall;
|
||||
@@ -47,17 +45,13 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
mindNode.ItemWidth = 80;
|
||||
mindNode.ItemHeight = 25;
|
||||
mindNode.ClearConnectors();
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.BottomLeft, true) { XRatio = 0, YRatio = 1 };
|
||||
mindNode.AddConnector(port1);
|
||||
|
||||
var port2 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.TopLeft, true) { XRatio = 0, YRatio = 0 };
|
||||
mindNode.AddConnector(port2);
|
||||
|
||||
mindNode.ColorViewModel.LineColor.Color = Color.FromRgb(0x73, 0xa1, 0xbf);
|
||||
}
|
||||
|
||||
mindNode.ShapeViewModel.SinkMarker.PathStyle = ArrowPathStyle.None;
|
||||
@@ -69,10 +63,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
mindNode.ItemWidth = 80;
|
||||
mindNode.ItemHeight = 25;
|
||||
mindNode.ClearConnectors();
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Left, true) { XRatio = 0, YRatio = 0.5 };
|
||||
mindNode.AddConnector(port1);
|
||||
var port2 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Bottom, true) { XRatio = 0.25, YRatio = 1 };
|
||||
@@ -81,10 +74,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
mindNode.AddConnector(port3);
|
||||
|
||||
mindNode.CornerRadius = new System.Windows.CornerRadius(0);
|
||||
mindNode.BorderThickness = new System.Windows.Thickness(0, 0, 0, 0);
|
||||
|
||||
mindNode.ColorViewModel.FillColor.Color = Colors.Transparent;
|
||||
mindNode.ColorViewModel.LineColor.Color = Color.FromRgb(0x73, 0xa1, 0xbf);
|
||||
mindNode.BorderThickness = new System.Windows.Thickness(0, 0, 0, 0);
|
||||
}
|
||||
mindNode.ShapeViewModel.SinkMarker.PathStyle = ArrowPathStyle.None;
|
||||
mindNode.ShapeViewModel.SinkMarker.SizeStyle = ArrowSizeStyle.VerySmall;
|
||||
|
||||
Reference in New Issue
Block a user