mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-13 20:56:35 +08:00
可以切换主题
This commit is contained in:
@@ -13,7 +13,12 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
public class DirectoryLayout : 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)
|
||||
{
|
||||
switch (mindNode.NodeLevel)
|
||||
{
|
||||
@@ -21,18 +26,13 @@ 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.Bottom, true) { XRatio = 0.5, YRatio = 1 };
|
||||
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.ShapeViewModel.SinkMarker.PathStyle = ArrowPathStyle.None;
|
||||
mindNode.ShapeViewModel.SinkMarker.SizeStyle = ArrowSizeStyle.VerySmall;
|
||||
mindNode.ConnectorOrientation = ConnectorOrientation.None;
|
||||
@@ -42,15 +42,13 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
mindNode.ItemWidth = 80;
|
||||
mindNode.ItemHeight = 25;
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Top, true) { XRatio = 0.5, YRatio = 0 };
|
||||
mindNode.AddConnector(port1);
|
||||
var port2 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Bottom, true) { XRatio = 0.25, YRatio = 1 };
|
||||
mindNode.AddConnector(port2);
|
||||
|
||||
mindNode.ColorViewModel.LineColor.Color = Color.FromRgb(0x73, 0xa1, 0xbf);
|
||||
}
|
||||
mindNode.ShapeViewModel.SinkMarker.PathStyle = ArrowPathStyle.None;
|
||||
mindNode.ShapeViewModel.SinkMarker.SizeStyle = ArrowSizeStyle.VerySmall;
|
||||
@@ -61,10 +59,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 };
|
||||
@@ -72,8 +69,6 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
|
||||
mindNode.CornerRadius = new System.Windows.CornerRadius(0);
|
||||
mindNode.BorderThickness = new System.Windows.Thickness(0, 0, 0, 0);
|
||||
|
||||
mindNode.ColorViewModel.LineColor.Color = Color.FromRgb(0x73, 0xa1, 0xbf);
|
||||
}
|
||||
mindNode.ShapeViewModel.SinkMarker.PathStyle = ArrowPathStyle.None;
|
||||
mindNode.ShapeViewModel.SinkMarker.SizeStyle = ArrowSizeStyle.VerySmall;
|
||||
@@ -81,7 +76,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ConnectionViewModel GetOrSetConnectionViewModel(MindNode source, MindNode sink, ConnectionViewModel connector = null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user