mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-05-04 06:51:28 +08:00
工具栏整理
This commit is contained in:
@@ -7,6 +7,7 @@ using AIStudio.Wpf.DiagramDesigner;
|
||||
using AIStudio.Wpf.DiagramDesigner.Algorithms;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
using AIStudio.Wpf.DiagramDesigner.Helpers;
|
||||
using AIStudio.Wpf.Mind.Models;
|
||||
using AIStudio.Wpf.Mind.ViewModels;
|
||||
|
||||
namespace AIStudio.Wpf.Mind.Helpers
|
||||
@@ -15,10 +16,10 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
public void Appearance(MindNode mindNode)
|
||||
{
|
||||
Appearance(mindNode, null, false);
|
||||
Appearance(mindNode, MindTheme.SkyBlue, false);
|
||||
}
|
||||
|
||||
public void Appearance(MindNode mindNode, MindThemeModel mindThemeModel, bool initAppearance)
|
||||
public void Appearance(MindNode mindNode, MindTheme mindTheme, bool initAppearance)
|
||||
{
|
||||
switch (mindNode.NodeLevel)
|
||||
{
|
||||
@@ -26,7 +27,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Bottom, true) { XRatio = 0.5, YRatio = 1 };
|
||||
@@ -42,7 +43,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Top, true) { XRatio = 0.5, YRatio = 0 };
|
||||
@@ -59,7 +60,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Left, true) { XRatio = 0, YRatio = 0.5 };
|
||||
|
||||
@@ -7,6 +7,7 @@ using AIStudio.Wpf.DiagramDesigner;
|
||||
using AIStudio.Wpf.DiagramDesigner.Algorithms;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
using AIStudio.Wpf.DiagramDesigner.Helpers;
|
||||
using AIStudio.Wpf.Mind.Models;
|
||||
using AIStudio.Wpf.Mind.ViewModels;
|
||||
|
||||
namespace AIStudio.Wpf.Mind.Helpers
|
||||
@@ -15,10 +16,10 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
public void Appearance(MindNode mindNode)
|
||||
{
|
||||
Appearance(mindNode, null, false);
|
||||
Appearance(mindNode, MindTheme.SkyBlue, false);
|
||||
}
|
||||
|
||||
public void Appearance(MindNode mindNode, MindThemeModel mindThemeModel, bool initAppearance)
|
||||
public void Appearance(MindNode mindNode, MindTheme mindTheme, bool initAppearance)
|
||||
{
|
||||
if (mindNode == null) return;
|
||||
|
||||
@@ -30,7 +31,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Right, true) { XRatio = 1, YRatio = 0.5 };
|
||||
@@ -45,7 +46,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.BottomLeft, true) { XRatio = 0, YRatio = 1 };
|
||||
@@ -62,8 +63,8 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
default:
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Left, true) { XRatio = 0, YRatio = 0.5 };
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Media;
|
||||
using AIStudio.Wpf.DiagramDesigner;
|
||||
using AIStudio.Wpf.Mind.Models;
|
||||
using AIStudio.Wpf.Mind.ViewModels;
|
||||
|
||||
namespace AIStudio.Wpf.Mind.Helpers
|
||||
@@ -10,7 +11,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
public interface IMindLayout
|
||||
{
|
||||
void Appearance(MindNode mindNode);
|
||||
void Appearance(MindNode mindNode, MindThemeModel mindThemeModel, bool initAppearance);
|
||||
void Appearance(MindNode mindNode, MindTheme mindTheme, bool initAppearance);
|
||||
ConnectionViewModel GetOrSetConnectionViewModel(MindNode source, MindNode sink, ConnectionViewModel connector = null);
|
||||
void LayoutUpdated(MindNode mindNode);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ using AIStudio.Wpf.DiagramDesigner;
|
||||
using AIStudio.Wpf.DiagramDesigner.Algorithms;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
using AIStudio.Wpf.DiagramDesigner.Helpers;
|
||||
using AIStudio.Wpf.Mind.Models;
|
||||
using AIStudio.Wpf.Mind.ViewModels;
|
||||
|
||||
namespace AIStudio.Wpf.Mind.Helpers
|
||||
@@ -15,10 +16,10 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
public void Appearance(MindNode mindNode)
|
||||
{
|
||||
Appearance(mindNode, null, false);
|
||||
Appearance(mindNode, MindTheme.SkyBlue, false);
|
||||
}
|
||||
|
||||
public void Appearance(MindNode mindNode, MindThemeModel mindThemeModel, bool initAppearance)
|
||||
public void Appearance(MindNode mindNode, MindTheme mindTheme, bool initAppearance)
|
||||
{
|
||||
switch (mindNode.NodeLevel)
|
||||
{
|
||||
@@ -26,7 +27,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.None, true) { XRatio = 0.5, YRatio = 0.5 };
|
||||
@@ -41,7 +42,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Left, true) { XRatio = 0, YRatio = 0.5 };
|
||||
@@ -58,7 +59,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Left, true) { XRatio = 0, YRatio = 1 };
|
||||
|
||||
@@ -7,6 +7,7 @@ using AIStudio.Wpf.DiagramDesigner;
|
||||
using AIStudio.Wpf.DiagramDesigner.Algorithms;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
using AIStudio.Wpf.DiagramDesigner.Helpers;
|
||||
using AIStudio.Wpf.Mind.Models;
|
||||
using AIStudio.Wpf.Mind.ViewModels;
|
||||
|
||||
namespace AIStudio.Wpf.Mind.Helpers
|
||||
@@ -15,10 +16,10 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
public void Appearance(MindNode mindNode)
|
||||
{
|
||||
Appearance(mindNode, null, false);
|
||||
Appearance(mindNode, MindTheme.SkyBlue, false);
|
||||
}
|
||||
|
||||
public void Appearance(MindNode mindNode, MindThemeModel mindThemeModel, bool initAppearance)
|
||||
public void Appearance(MindNode mindNode, MindTheme mindTheme, bool initAppearance)
|
||||
{
|
||||
switch (mindNode.NodeLevel)
|
||||
{
|
||||
@@ -26,7 +27,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.None, true) { XRatio = 0.5, YRatio = 0.5 };
|
||||
@@ -41,7 +42,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Left, true) { XRatio = 0, YRatio = 0.5 };
|
||||
@@ -58,7 +59,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Left, true) { XRatio = 0, YRatio = 1 };
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,7 @@ using AIStudio.Wpf.DiagramDesigner;
|
||||
using AIStudio.Wpf.DiagramDesigner.Algorithms;
|
||||
using AIStudio.Wpf.DiagramDesigner.Geometrys;
|
||||
using AIStudio.Wpf.DiagramDesigner.Helpers;
|
||||
using AIStudio.Wpf.Mind.Models;
|
||||
using AIStudio.Wpf.Mind.ViewModels;
|
||||
|
||||
namespace AIStudio.Wpf.Mind.Helpers
|
||||
@@ -15,10 +16,10 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
public void Appearance(MindNode mindNode)
|
||||
{
|
||||
Appearance(mindNode, null, false);
|
||||
Appearance(mindNode, MindTheme.SkyBlue, false);
|
||||
}
|
||||
|
||||
public void Appearance(MindNode mindNode, MindThemeModel mindThemeModel, bool initAppearance)
|
||||
public void Appearance(MindNode mindNode, MindTheme mindTheme, bool initAppearance)
|
||||
{
|
||||
switch (mindNode.NodeLevel)
|
||||
{
|
||||
@@ -26,7 +27,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Bottom, true) { XRatio = 0.5, YRatio = 1 };
|
||||
@@ -41,7 +42,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Top, true) { XRatio = 0.5, YRatio = 0 };
|
||||
@@ -59,7 +60,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
if (initAppearance)
|
||||
{
|
||||
MindThemeHelper.ThemeChange(mindNode, mindThemeModel, initAppearance);
|
||||
MindThemeHelper.ThemeChange(mindNode, mindTheme, initAppearance);
|
||||
|
||||
mindNode.ClearConnectors();
|
||||
var port1 = new FullyCreatedConnectorInfo(mindNode.Root, mindNode, ConnectorOrientation.Top, true) { XRatio = 0.5, YRatio = 0 };
|
||||
|
||||
Reference in New Issue
Block a user