mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-02 15:50:51 +08:00
mind基本完成,准备写文档
This commit is contained in:
@@ -109,6 +109,10 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Costura.Fody" Version="5.7.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Dragablz" Version="0.0.3.223" />
|
||||
<PackageReference Include="Fluent.Ribbon" Version="8.0.3" />
|
||||
<PackageReference Include="gong-wpf-dragdrop" Version="2.3.2" />
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Logical;component/Themes/LogicalGateItemViewModel.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.SFC;component/Themes/SFCNode.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Mind;component/Themes/MindNode.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Mind;component/Themes/Generic.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
|
||||
3
AIStudio.Wpf.DiagramApp/FodyWeavers.xml
Normal file
3
AIStudio.Wpf.DiagramApp/FodyWeavers.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<Costura />
|
||||
</Weavers>
|
||||
141
AIStudio.Wpf.DiagramApp/FodyWeavers.xsd
Normal file
141
AIStudio.Wpf.DiagramApp/FodyWeavers.xsd
Normal file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeRuntimeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="IncludeRuntimeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeRuntimeReferences" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="UseRuntimeReferencePaths" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableCompression" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableCleanup" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="ExcludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="ExcludeRuntimeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeRuntimeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="PreloadOrder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@@ -57,7 +57,6 @@ namespace AIStudio.Wpf.Flowchart
|
||||
|
||||
InitDiagramViewModel();
|
||||
var level1node = MindDiagramViewModel.RootItem;
|
||||
DiagramViewModel.CenterMoveCommand.Execute(level1node);
|
||||
|
||||
MindNode level2node1_1 = new MindNode(DiagramViewModel) { Text = "分支主题1" };
|
||||
MindDiagramViewModel.AddChildCommand.Execute(new MindNode[] { level1node, level2node1_1 });
|
||||
@@ -83,7 +82,10 @@ namespace AIStudio.Wpf.Flowchart
|
||||
|
||||
protected override DiagramViewModel GetDiagramViewModel(string name, DiagramType diagramType)
|
||||
{
|
||||
return new MindDiagramViewModel() { Name = name ?? NewNameHelper.GetNewName(DiagramViewModels.Select(p => p.Name), "页-"), DiagramType = diagramType };
|
||||
var viewmodel = new MindDiagramViewModel() { Name = name ?? NewNameHelper.GetNewName(DiagramViewModels.Select(p => p.Name), "页-"), DiagramType = diagramType };
|
||||
viewmodel.Init();
|
||||
|
||||
return viewmodel;
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
xmlns:drop="urn:gong-wpf-dragdrop"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:converter="clr-namespace:AIStudio.Wpf.DiagramDesigner.Additionals.Converters;assembly=AIStudio.Wpf.DiagramDesigner.Additionals"
|
||||
xmlns:mimd="clr-namespace:AIStudio.Wpf.Mind;assembly=AIStudio.Wpf.Mind"
|
||||
xmlns:viewmodel="clr-namespace:AIStudio.Wpf.DiagramApp.ViewModels"
|
||||
Style="{StaticResource RibbonWindowStyle}"
|
||||
Icon="pack://application:,,,/AIStudio.Wpf.DiagramApp;component/Icons/App.ico"
|
||||
@@ -32,6 +31,7 @@
|
||||
<dd:ArrowSizeConverter x:Key="ArrowSizeConverter"/>
|
||||
<dd:LineDashConverter x:Key="LineDashConverter"/>
|
||||
<dd:DoubleToThickness x:Key="DoubleToThickness"/>
|
||||
<dd:ObjectConverter x:Key="ObjectConverter"/>
|
||||
|
||||
<converter:NumberConverter x:Key="NumberConverter"/>
|
||||
<converter:Boolean2VisibilityReConverter x:Key="Boolean2VisibilityReConverter"/>
|
||||
@@ -1326,12 +1326,7 @@
|
||||
Text="快速样式"
|
||||
Width="190" />
|
||||
</Fluent:RibbonGroupBox.ToolTip>
|
||||
</Fluent:RibbonGroupBox>
|
||||
<Fluent:RibbonGroupBox Header="其它"
|
||||
IsLauncherVisible="True" >
|
||||
<Fluent:Button Size="Small" Icon="{iconPacks:FontAwesome Kind=SearchSolid}">
|
||||
</Fluent:Button>
|
||||
</Fluent:RibbonGroupBox>
|
||||
</Fluent:RibbonGroupBox>
|
||||
</Fluent:RibbonTabItem>
|
||||
<Fluent:RibbonTabItem Header="插入">
|
||||
<Fluent:RibbonGroupBox Header="插入"
|
||||
@@ -1453,6 +1448,46 @@
|
||||
</Fluent:SplitButton.ToolTip>
|
||||
</Fluent:SplitButton>
|
||||
</Fluent:RibbonGroupBox>
|
||||
<Fluent:RibbonGroupBox Header="其它"
|
||||
IsLauncherVisible="True" >
|
||||
<Fluent:Button Header="搜索" Width="50" VerticalAlignment="Top" Command="{Binding SearchDownCommand}">
|
||||
<Fluent:Button.LargeIcon>
|
||||
<iconPacks:PackIconFontAwesome Kind="SearchSolid" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:Button.LargeIcon>
|
||||
</Fluent:Button>
|
||||
<Border BorderBrush="Gray" BorderThickness="1" CornerRadius="3" VerticalAlignment="Top" Margin="0,8,0,0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="24"/>
|
||||
<RowDefinition Height="24"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox x:Name="txtsearch" Text="{Binding PageViewModel.DiagramViewModel.SearchText}" VerticalContentAlignment="Center" BorderThickness="0" Background="Transparent">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding PageViewModel.DiagramViewModel.SearchDownCommand}" CommandParameter="{Binding ElementName=txtsearch,Path=Text}"/>
|
||||
</TextBox.InputBindings>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="LostFocus">
|
||||
<i:InvokeCommandAction Command="{Binding PageViewModel.DiagramViewModel.SearchDownCommand}" CommandParameter="{Binding ElementName=txtsearch,Path=Text}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</TextBox>
|
||||
<Line X1="0" Y1="0" X2="0" Y2="100" Stroke="Gray" StrokeThickness="0.5" HorizontalAlignment="Right"></Line>
|
||||
<Button Grid.Column="1" Padding="6,0" Style="{StaticResource FlatButtonStyle}" Command="{Binding PageViewModel.DiagramViewModel.SearchUpCommand}" CommandParameter="{Binding ElementName=txtsearch,Path=Text}">
|
||||
<Path Width="10" Height="10" Stretch="Uniform" Fill="Black" Data="M17,13.41,12.71,9.17a1,1,0,0,0-1.42,0L7.05,13.41a1,1,0,0,0,0,1.42,1,1,0,0,0,1.41,0L12,11.29l3.54,3.54a1,1,0,0,0,.7.29,1,1,0,0,0,.71-.29A1,1,0,0,0,17,13.41Z"></Path>
|
||||
</Button>
|
||||
<Button Grid.Column="2" Padding="6,0" Style="{StaticResource FlatButtonStyle}" Command="{Binding PageViewModel.DiagramViewModel.SearchDownCommand}" CommandParameter="{Binding ElementName=txtsearch,Path=Text}">
|
||||
<Path Width="10" Height="10" Stretch="Uniform" Fill="Black" Data="M17,9.17a1,1,0,0,0-1.41,0L12,12.71,8.46,9.17a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42l4.24,4.24a1,1,0,0,0,1.42,0L17,10.59A1,1,0,0,0,17,9.17Z"></Path>
|
||||
</Button>
|
||||
<Line X1="0" Y1="0" X2="150" Y2="0" Stroke="Gray" StrokeThickness="0.5" VerticalAlignment="Bottom" Grid.ColumnSpan="3"></Line>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="3" Text="{Binding PageViewModel.DiagramViewModel.SearchInfo}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Fluent:RibbonGroupBox>
|
||||
</Fluent:RibbonTabItem>
|
||||
<Fluent:RibbonTabItem Header="页面布局">
|
||||
<Fluent:RibbonGroupBox Header="页面"
|
||||
@@ -1752,33 +1787,487 @@
|
||||
</Fluent:SplitButton>
|
||||
</Fluent:RibbonGroupBox>
|
||||
</Fluent:RibbonTabItem>
|
||||
<Fluent:RibbonTabItem Header="脑图">
|
||||
<Fluent:RibbonGroupBox Header="外观"
|
||||
IsLauncherVisible="True">
|
||||
|
||||
<Fluent:SplitButton Header="类型" Width="50" VerticalAlignment="Top">
|
||||
<Fluent:RibbonTabItem Header="脑图" Visibility="{Binding PageViewModel.DiagramType,Converter={dd:ConverterValueMapSetToVisibility},ConverterParameter='Mind'}">
|
||||
<Fluent:RibbonGroupBox Header="思路" IsLauncherVisible="True">
|
||||
<Fluent:Button Header="插入下级主题" SizeDefinition="Middle" Width="110" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.AddChildCommand}">
|
||||
<Fluent:Button.Icon>
|
||||
<Path Width="15" Height="15" Stretch="Uniform" Fill="Black" Data="M992.9 500.1H355c-19.3 0-35 15.7-35 35V660H182V340.8h427.8c32 0 58-26 58-58V58c0-32-25.9-58-58-58H58C26 0 0 26 0 58v224.8c0 32 26 58 58 58h54V689c0 13.3 7.4 24.8 18.2 30.7 6.3 6.3 15.1 10.3 24.8 10.3h165v145.9c0 19.3 15.7 35 35 35h226c19.3 0 35-15.7 35-35s-15.7-35-35-35H390V570.1h567.9V611c0 19.3 15.7 35 35 35s35-15.7 35-35v-75.9c0-19.3-15.7-35-35-35zM70 70h527.8v200.8H70V70zM989 830h-89v-89c0-19.3-15.7-35-35-35s-35 15.7-35 35v89h-89c-19.3 0-35 15.7-35 35s15.7 35 35 35h89v89c0 19.3 15.7 35 35 35s35-15.7 35-35v-89h89c19.3 0 35-15.7 35-35s-15.7-35-35-35z"></Path>
|
||||
</Fluent:Button.Icon>
|
||||
</Fluent:Button>
|
||||
<Fluent:Button Header="插入同级主题" SizeDefinition="Middle" Width="110" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.AddPearCommand}">
|
||||
<Fluent:Button.Icon>
|
||||
<Path Width="15" Height="15" Stretch="Uniform" Fill="Black" Data="M651.8 775.5h-20.3v-527h178V305c0 19.3 15.7 35 35 35s35-15.7 35-35v-91.5c0-19.3-15.7-35-35-35h-248c-19.3 0-35 15.7-35 35V477H340.8V236.1c0-32-26-58-58-58H58c-32 0-58 26-58 58v551.8c0 32 26 58 58 58h224.8c32 0 58-26 58-58V547h220.7v263.5c0 19.3 15.7 35 35 35h55.3c19.3 0 35-15.7 35-35s-15.7-35-35-35z m-381 0.4H70V248.1h200.8v527.8zM990 651.5h-89v-89c0-19.3-15.7-35-35-35s-35 15.7-35 35v89h-89c-19.3 0-35 15.7-35 35s15.7 35 35 35h89v89c0 19.3 15.7 35 35 35s35-15.7 35-35v-89h89c19.3 0 35-15.7 35-35s-15.7-35-35-35z"></Path>
|
||||
</Fluent:Button.Icon>
|
||||
</Fluent:Button>
|
||||
<Fluent:Button Header="插入上级主题" SizeDefinition="Middle" Width="110" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.AddParentCommand}">
|
||||
<Fluent:Button.Icon>
|
||||
<Path Width="15" Height="15" Stretch="Uniform" Fill="Black" Data="M992.9 500.1H355c-19.3 0-35 15.7-35 35V660H182V340.8h427.8c32 0 58-26 58-58V58c0-32-25.9-58-58-58H58C26 0 0 26 0 58v224.8c0 32 26 58 58 58h54V689c0 13.3 7.4 24.8 18.2 30.7 6.3 6.3 15.1 10.3 24.8 10.3h165v145.9c0 19.3 15.7 35 35 35h226c19.3 0 35-15.7 35-35s-15.7-35-35-35H390V570.1h567.9V611c0 19.3 15.7 35 35 35s35-15.7 35-35v-75.9c0-19.3-15.7-35-35-35zM70 70h527.8v200.8H70V70zM989 830h-89v-89c0-19.3-15.7-35-35-35s-35 15.7-35 35v89h-89c-19.3 0-35 15.7-35 35s15.7 35 35 35h89v89c0 19.3 15.7 35 35 35s35-15.7 35-35v-89h89c19.3 0 35-15.7 35-35s-15.7-35-35-35z"></Path>
|
||||
</Fluent:Button.Icon>
|
||||
</Fluent:Button>
|
||||
<Fluent:Button Header="上移" SizeDefinition="Middle" Width="60" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.MoveForwardCommand}">
|
||||
<Fluent:Button.Icon>
|
||||
<Path Width="15" Height="15" Stretch="Uniform" Fill="Black" Data="M62.5 500L312.5 500L312.5 937.5L687.5 937.5L687.5 500L937.5 500L500 62.5Z"></Path>
|
||||
</Fluent:Button.Icon>
|
||||
</Fluent:Button>
|
||||
<Fluent:Button Header="下移" SizeDefinition="Middle" Width="60" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.MoveBackCommand}">
|
||||
<Fluent:Button.Icon>
|
||||
<Path Width="15" Height="15" Stretch="Uniform" Fill="Black" Data="M687.5 62.5L312.5 62.5L312.5 500L62.5 500L500 937.5L937.4 500L687.5 500Z"></Path>
|
||||
</Fluent:Button.Icon>
|
||||
</Fluent:Button>
|
||||
<Fluent:Button Header="编辑" SizeDefinition="Middle" Width="60" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.EditCommand}">
|
||||
<Fluent:Button.Icon>
|
||||
<Path Width="15" Height="15" Stretch="Uniform" Fill="Black" Data="M8,12H16V14H8V12M10,20H6V4H13V9H18V12.1L20,10.1V8L14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H10V20M8,18H12.1L13,17.1V16H8V18M20.2,13C20.3,13 20.5,13.1 20.6,13.2L21.9,14.5C22.1,14.7 22.1,15.1 21.9,15.3L20.9,16.3L18.8,14.2L19.8,13.2C19.9,13.1 20,13 20.2,13M20.2,16.9L14.1,23H12V20.9L18.1,14.8L20.2,16.9Z"></Path>
|
||||
</Fluent:Button.Icon>
|
||||
</Fluent:Button>
|
||||
<Fluent:SplitButton Header="链接" GroupName="Link" Width="50" VerticalAlignment="Top">
|
||||
<Fluent:SplitButton.LargeIcon>
|
||||
<Grid>
|
||||
<iconPacks:PackIconMaterial Kind="FileOutline" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<TextBlock Text="S" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="9"/>
|
||||
</Grid>
|
||||
<iconPacks:PackIconModern Kind="Link" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:SplitButton.LargeIcon>
|
||||
<!--<ListBox BorderThickness="0" helper:EnumHelper.Enum="{x:Type mimd:MindType}" SelectedItem="{Binding SelectedItem.MindType}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding .,Converter={StaticResource EnumDescriptionConverter}}" Margin="5"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>-->
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="链接地址:"></TextBlock>
|
||||
<TextBox x:Name="link" Width="300" Height="50" Text="{Binding PageViewModel.DiagramViewModel.SelectedItem.LinkInfo.Link}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="提示文本:"></TextBlock>
|
||||
<TextBox x:Name="linktext" Width="300" Height="50" Text="{Binding PageViewModel.DiagramViewModel.SelectedItem.LinkInfo.Text}"/>
|
||||
</StackPanel>
|
||||
<Fluent:MenuItem Header="插入链接" Command="{Binding PageViewModel.DiagramViewModel.AddLinkCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{StaticResource ObjectConverter}">
|
||||
<Binding ElementName="link" Path="Text"></Binding>
|
||||
<Binding ElementName="linktext" Path="Text"></Binding>
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
</Fluent:MenuItem>
|
||||
<Fluent:MenuItem Header="移除已有链接" Command="{Binding PageViewModel.DiagramViewModel.RemoveLinkCommand}"></Fluent:MenuItem>
|
||||
<Fluent:SplitButton.ToolTip>
|
||||
<Fluent:ScreenTip Title="MindType"
|
||||
Text="类型"
|
||||
<Fluent:ScreenTip Title="Link"
|
||||
Text="添加链接"
|
||||
Width="190" />
|
||||
</Fluent:SplitButton.ToolTip>
|
||||
</Fluent:SplitButton>
|
||||
<Fluent:SplitButton Header="图片" GroupName="Image" Width="50" VerticalAlignment="Top">
|
||||
<Fluent:SplitButton.LargeIcon>
|
||||
<iconPacks:PackIconRemixIcon Kind="Image2Line" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:SplitButton.LargeIcon>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="文件地址:"></TextBlock>
|
||||
<TextBox x:Name="imageurl" Width="300" Height="50" Text="{Binding PageViewModel.DiagramViewModel.SelectedItem.ImageInfo.Url}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="提示文本:"></TextBlock>
|
||||
<TextBox x:Name="imagetext" Width="300" Height="50" Text="{Binding PageViewModel.DiagramViewModel.SelectedItem.ImageInfo.Text}"/>
|
||||
</StackPanel>
|
||||
<Fluent:MenuItem Header="插入图片" Command="{Binding PageViewModel.DiagramViewModel.AddImageCommand}">
|
||||
<MenuItem.CommandParameter>
|
||||
<MultiBinding Converter="{StaticResource ObjectConverter}">
|
||||
<Binding ElementName="imageurl" Path="Text"></Binding>
|
||||
<Binding ElementName="imagetext" Path="Text"></Binding>
|
||||
</MultiBinding>
|
||||
</MenuItem.CommandParameter>
|
||||
</Fluent:MenuItem>
|
||||
<Fluent:MenuItem Header="移除已有图片" Command="{Binding PageViewModel.DiagramViewModel.RemoveImageCommand}"></Fluent:MenuItem>
|
||||
<Fluent:SplitButton.ToolTip>
|
||||
<Fluent:ScreenTip Title="Image"
|
||||
Text="添加图片"
|
||||
Width="190" />
|
||||
</Fluent:SplitButton.ToolTip>
|
||||
</Fluent:SplitButton>
|
||||
<Fluent:SplitButton Header="备注" GroupName="Remark" Width="50" VerticalAlignment="Top">
|
||||
<Fluent:SplitButton.LargeIcon>
|
||||
<iconPacks:PackIconMaterial Kind="TextBoxOutline" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:SplitButton.LargeIcon>
|
||||
<TextBox x:Name="remark" Width="300" Height="50" Text="{Binding PageViewModel.DiagramViewModel.SelectedItem.Remark}"/>
|
||||
<Fluent:MenuItem Header="插入备注" Command="{Binding PageViewModel.DiagramViewModel.AddRemarkCommand}" CommandParameter="{Binding ElementName=remark,Path=Text}"></Fluent:MenuItem>
|
||||
<Fluent:MenuItem Header="移除已有备注" Command="{Binding PageViewModel.DiagramViewModel.RemoveRemarkCommand}"></Fluent:MenuItem>
|
||||
<Fluent:SplitButton.ToolTip>
|
||||
<Fluent:ScreenTip Title="Image"
|
||||
Text="添加备注"
|
||||
Width="190" />
|
||||
</Fluent:SplitButton.ToolTip>
|
||||
</Fluent:SplitButton>
|
||||
<UniformGrid Columns="5" VerticalAlignment="Top" Margin="0,8,0,0" >
|
||||
<Button Style="{StaticResource FlatButtonStyle}"
|
||||
Background="#FFC5BDAE"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddPriorityCommand}"
|
||||
CommandParameter="Null">
|
||||
<Path Stretch="Uniform" Fill="DarkRed" Data="M966.4 761.6l-140.8 140.8-313.6-320-313.6 320-140.8-140.8 320-313.6-320-313.6 140.8-140.8 313.6 320 313.6-320 140.8 140.8-320 313.6z"></Path>
|
||||
</Button>
|
||||
|
||||
<Button Style="{StaticResource FlatButtonStyle}"
|
||||
Background="Red"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddPriorityCommand}"
|
||||
CommandParameter="1">
|
||||
<Path Stretch="Uniform" Fill="White" RenderTransformOrigin="0.5,0.5" Data="M700 1125V100H600V1014.8L375 954.5V1058.05L625 1125z">
|
||||
<Path.RenderTransform>
|
||||
<ScaleTransform ScaleY="-1"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Button>
|
||||
|
||||
<Button Style="{StaticResource FlatButtonStyle}"
|
||||
Background="Blue"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddPriorityCommand}"
|
||||
CommandParameter="2">
|
||||
<Path Stretch="Uniform" Fill="White" RenderTransformOrigin="0.5,0.5" Data="M800 825A200 200 0 1 1 400 825H300A300 300 0 1 0 833.15 636.2L467.15 200.0499999999999L900 200V100H300V156.3499999999999L753.2 696.4499999999999A199.10000000000002 199.10000000000002 0 0 1 800 825z">
|
||||
<Path.RenderTransform>
|
||||
<ScaleTransform ScaleY="-1"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Button>
|
||||
|
||||
<Button Style="{StaticResource FlatButtonStyle}"
|
||||
Background="Green"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddPriorityCommand}"
|
||||
CommandParameter="3">
|
||||
<Path Stretch="Uniform" Fill="White" RenderTransformOrigin="0.5,0.5" Data="M900 1100V1031.9L640.4499999999999 722.5A325.05 325.05 0 1 0 284.65 321.0999999999999L381.65 345.3999999999999A225.1 225.1 0 0 1 825 400A225 225 0 0 1 499.7500000000001 601.5L488.3500000000001 595.4000000000001L453.8500000000001 655.7500000000001L742.75 1000L325 1000V1100H900z">
|
||||
<Path.RenderTransform>
|
||||
<ScaleTransform ScaleY="-1"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Button>
|
||||
|
||||
<Button Style="{StaticResource FlatButtonStyle}"
|
||||
Background="Orange"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddPriorityCommand}"
|
||||
CommandParameter="4">
|
||||
<Path Stretch="Uniform" Fill="White" RenderTransformOrigin="0.5,0.5" Data="M800 1125V400H950V300H800V100H700V300H200V355.1L700 1125H800zM700 400V941.45L348.4 400H700z">
|
||||
<Path.RenderTransform>
|
||||
<ScaleTransform ScaleY="-1"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Button>
|
||||
|
||||
<Button Style="{StaticResource FlatButtonStyle}"
|
||||
Background="Purple"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddPriorityCommand}"
|
||||
CommandParameter="5">
|
||||
<Path Stretch="Uniform" Fill="White" RenderTransformOrigin="0.5,0.5" Data="M900 1100V1000H465.0000000000001L431.1500000000001 677.75A325 325 0 1 0 284.6500000000001 321.1L381.6500000000001 345.4000000000001A225.1 225.1 0 0 1 825 400A225 225 0 0 1 600 625C498.9 625 436.1 593.0500000000001 402 548.5L323.25 607.6L375 1100H900z">
|
||||
<Path.RenderTransform>
|
||||
<ScaleTransform ScaleY="-1"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Button>
|
||||
|
||||
<Button Style="{StaticResource FlatButtonStyle}"
|
||||
Background="Gray"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddPriorityCommand}"
|
||||
CommandParameter="6">
|
||||
<Path Stretch="Uniform" Fill="White" RenderTransformOrigin="0.5,0.5" Data="M744.3 1100L522.4 715.7A325 325 0 1 0 320 565L628.8000000000001 1100H744.3000000000001zM600 625A225 225 0 1 1 600 175A225 225 0 0 1 600 625z">
|
||||
<Path.RenderTransform>
|
||||
<ScaleTransform ScaleY="-1"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatButtonStyle}"
|
||||
Background="Gray"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddPriorityCommand}"
|
||||
CommandParameter="7">
|
||||
<Path Stretch="Uniform" Fill="White" RenderTransformOrigin="0.5,0.5" Data="M950 1100V1025L538.15 100H428.7L829.35 1000H300V1100z">
|
||||
<Path.RenderTransform>
|
||||
<ScaleTransform ScaleY="-1"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatButtonStyle}"
|
||||
Background="Gray"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddPriorityCommand}"
|
||||
CommandParameter="8">
|
||||
<Path Stretch="Uniform" Fill="White" RenderTransformOrigin="0.5,0.5" Data="M600 1125A275 275 0 0 0 767.6 632C861.9999999999999 579.5 925 484 925 375C925 209.3 779.5 75 600 75S275 209.3 275 375C275 484.0500000000001 338.05 579.5 432.35 632.05A275 275 0 0 0 600 1125zM600 575C474 575 375 483.6 375 375C375 266.4 474 175 600 175S825 266.4 825 375C825 483.6 726 575 600 575zM600 1025A175 175 0 1 1 600 675A175 175 0 0 1 600 1025z">
|
||||
<Path.RenderTransform>
|
||||
<ScaleTransform ScaleY="-1"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatButtonStyle}"
|
||||
Background="Gray"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddPriorityCommand}"
|
||||
CommandParameter="9">
|
||||
<Path Stretch="Uniform" Fill="White" RenderTransformOrigin="0.5,0.5" Data="M600 1125A325 325 0 0 0 880.95 636.5L571.15 100.05H455.7L677.6500000000001 484.35A325 325 0 1 0 600 1125zM600 1025A225 225 0 1 1 600 575A225 225 0 0 1 600 1025z">
|
||||
<Path.RenderTransform>
|
||||
<ScaleTransform ScaleY="-1"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
<UniformGrid Columns="5" VerticalAlignment="Top" Margin="0,8,0,0">
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Height="20"
|
||||
Width="20"
|
||||
Background="Yellow"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddRatioCommand}"
|
||||
CommandParameter="Null">
|
||||
<Path Stretch="Uniform" Fill="DarkRed" Data="m 256,76 c 48.1,0 93.3,18.7 127.3,52.7 34,34 52.7,79.2 52.7,127.3 0,48.1 -18.7,93.3 -52.7,127.3 -34,34 -79.2,52.7 -127.3,52.7 -48.1,0 -93.3,-18.7 -127.3,-52.7 C 94.7,349.3 76,304.1 76,256 76,207.9 94.7,162.7 128.7,128.7 162.7,94.7 207.9,76 256,76 m 0,-28 C 141.1,48 48,141.1 48,256 48,370.9 141.1,464 256,464 370.9,464 464,370.9 464,256 464,141.1 370.9,48 256,48 Z m 75.3,260.7 -52.7,-52.7 52.7,-52.7 c 6.2,-6.2 6.2,-16.4 0,-22.6 -6.2,-6.2 -16.4,-6.2 -22.6,0 L 256,233.4 203.3,180.7 c -6.2,-6.2 -15.6,-7.1 -22.6,0 -7.1,7.1 -6,16.6 0,22.6 l 52.7,52.7 -52.7,52.7 c -6.7,6.7 -6.4,16.3 0,22.6 6.4,6.4 16.4,6.2 22.6,0 l 52.7,-52.7 52.7,52.7 c 6.2,6.2 16.4,6.2 22.6,0 6.3,-6.2 6.3,-16.4 0,-22.6 z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Height="20"
|
||||
Width="20"
|
||||
Background="Yellow"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddRatioCommand}"
|
||||
CommandParameter="0">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Height="20"
|
||||
Width="20"
|
||||
Background="Yellow"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddRatioCommand}"
|
||||
CommandParameter="0.125">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C13.93 5 15.68 5.78 16.95 7.05L12 12V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Height="20"
|
||||
Width="20"
|
||||
Background="Yellow"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddRatioCommand}"
|
||||
CommandParameter="0.25">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C15.87 5 19 8.13 19 12H12V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Height="20"
|
||||
Width="20"
|
||||
Background="Yellow"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddRatioCommand}"
|
||||
CommandParameter="0.375">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C15.87 5 19 8.13 19 12C19 13.93 18.22 15.68 16.95 16.95L12 12V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Height="20"
|
||||
Width="20"
|
||||
Background="Yellow"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddRatioCommand}"
|
||||
CommandParameter="0.5">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Height="20"
|
||||
Width="20"
|
||||
Background="Yellow"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddRatioCommand}"
|
||||
CommandParameter="0.625">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19C10.07 19 8.32 18.22 7.05 16.95L12 12V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Height="20"
|
||||
Width="20"
|
||||
Background="Yellow"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddRatioCommand}"
|
||||
CommandParameter="0.75">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19C8.13 19 5 15.87 5 12H12V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Height="20"
|
||||
Width="20"
|
||||
Background="Yellow"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddRatioCommand}"
|
||||
CommandParameter="0.875">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19C8.13 19 5 15.87 5 12C5 10.07 5.78 8.32 7.05 7.05L12 12V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Height="20"
|
||||
Width="20"
|
||||
Background="Yellow"
|
||||
Margin="2"
|
||||
Command="{Binding PageViewModel.DiagramViewModel.AddRatioCommand}"
|
||||
CommandParameter="1">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="m 256,76 c 48.1,0 93.3,18.7 127.3,52.7 34,34 52.7,79.2 52.7,127.3 0,48.1 -18.7,93.3 -52.7,127.3 -34,34 -79.2,52.7 -127.3,52.7 -48.1,0 -93.3,-18.7 -127.3,-52.7 C 94.7,349.3 76,304.1 76,256 76,207.9 94.7,162.7 128.7,128.7 162.7,94.7 207.9,76 256,76 m 0,-28 C 141.1,48 48,141.1 48,256 48,370.9 141.1,464 256,464 370.9,464 464,370.9 464,256 464,141.1 370.9,48 256,48 Z M 362.6,192.9 345,174.8 c -0.7,-0.8 -1.8,-1.2 -2.8,-1.2 -1.1,0 -2.1,0.4 -2.8,1.2 L 217.4,297.7 173,253.3 c -0.8,-0.8 -1.8,-1.2 -2.8,-1.2 -1,0 -2,0.4 -2.8,1.2 l -17.8,17.8 c -1.6,1.6 -1.6,4.1 0,5.7 l 56,56 c 3.6,3.6 8,5.7 11.7,5.7 5.3,0 9.9,-3.9 11.6,-5.5 H 229 L 362.7,198.6 c 1.4,-1.7 1.4,-4.2 -0.1,-5.7 z"></Path>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
<Border BorderBrush="Gray" BorderThickness="1" CornerRadius="3" VerticalAlignment="Top" Margin="0,8,0,0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="24"/>
|
||||
<RowDefinition Height="24"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox x:Name="txtTag" VerticalContentAlignment="Center" BorderThickness="0" Background="Transparent"/>
|
||||
<Line X1="0" Y1="0" X2="0" Y2="100" Stroke="Gray" StrokeThickness="0.5" HorizontalAlignment="Right"></Line>
|
||||
<Button Grid.Column="1" Content="添加" Padding="6,0" Style="{StaticResource FlatButtonStyle}" Command="{Binding PageViewModel.DiagramViewModel.AddTagCommand}" CommandParameter="{Binding ElementName=txtTag,Path=Text}"/>
|
||||
<Line X1="0" Y1="0" X2="150" Y2="0" Stroke="Gray" StrokeThickness="0.5" VerticalAlignment="Bottom" Grid.ColumnSpan="2"></Line>
|
||||
<dd:TagControl Grid.Row="1" Grid.ColumnSpan="2" BorderBrush="Gray" HorizontalAlignment="Left" ItemsSource="{Binding PageViewModel.DiagramViewModel.SelectedItem.Tags}" Width="150">
|
||||
<dd:TagControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal" x:Name="grid">
|
||||
<TextBlock Text="{Binding .}"/>
|
||||
<Button x:Name="clear" Style="{StaticResource FlatButtonStyle}" Padding="0" Content="X" Command="{Binding DataContext.PageViewModel.DiagramViewModel.RemoveTagCommand, RelativeSource={RelativeSource AncestorType={x:Type dd:TagControl}}}" CommandParameter="{Binding .}" Visibility="Collapsed"/>
|
||||
</StackPanel>
|
||||
<DataTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="clear" Property="Visibility" Value="Visible"/>
|
||||
</Trigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</dd:TagControl.ItemTemplate>
|
||||
</dd:TagControl>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Fluent:RibbonGroupBox>
|
||||
<Fluent:RibbonGroupBox Header="外观" IsLauncherVisible="True">
|
||||
<Fluent:SplitButton Header="{Binding PageViewModel.DiagramViewModel.MindType,Converter={StaticResource EnumDescriptionConverter}}" Width="70" VerticalAlignment="Top">
|
||||
<Fluent:SplitButton.LargeIcon>
|
||||
<Grid>
|
||||
<iconPacks:PackIconRemixIcon Kind="MindMap" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Fluent:SplitButton.LargeIcon>
|
||||
<Fluent:MenuItem Header="思维导图" Size="Small" IsCheckable="True" IsChecked="{Binding PageViewModel.DiagramViewModel.MindType,Converter={dd:ConverterValueMapToBool Parameter='Mind'}, ConverterParameter='Mind'}"/>
|
||||
<Fluent:MenuItem Header="目录组织图" Size="Small" IsCheckable="True" IsChecked="{Binding PageViewModel.DiagramViewModel.MindType,Converter={dd:ConverterValueMapToBool Parameter='Directory'}, ConverterParameter='Directory'}"/>
|
||||
<Fluent:MenuItem Header="鱼骨头图" Size="Small" IsCheckable="True" IsChecked="{Binding PageViewModel.DiagramViewModel.MindType,Converter={dd:ConverterValueMapToBool Parameter='FishBone'}, ConverterParameter='FishBone'}"/>
|
||||
<Fluent:MenuItem Header="逻辑结构图" Size="Small" IsCheckable="True" IsChecked="{Binding PageViewModel.DiagramViewModel.MindType,Converter={dd:ConverterValueMapToBool Parameter='Logical'}, ConverterParameter='Logical'}"/>
|
||||
<Fluent:MenuItem Header="组织结构图" Size="Small" IsCheckable="True" IsChecked="{Binding PageViewModel.DiagramViewModel.MindType,Converter={dd:ConverterValueMapToBool Parameter='Organizational'}, ConverterParameter='Organizational'}"/>
|
||||
<Fluent:MenuItem Header="天盘图" Size="Small" IsCheckable="True" IsEnabled="False" ToolTip="暂未完成" IsChecked="{Binding PageViewModel.DiagramViewModel.MindType,Converter={dd:ConverterValueMapToBool Parameter='Celestial'}, ConverterParameter='Celestial'}"/>
|
||||
<Fluent:SplitButton.ToolTip>
|
||||
<Fluent:ScreenTip Title="MindType"
|
||||
Text="脑图类型"
|
||||
Width="190" />
|
||||
</Fluent:SplitButton.ToolTip>
|
||||
</Fluent:SplitButton>
|
||||
<Fluent:SplitButton Header="{Binding PageViewModel.DiagramViewModel.MindThemeModel.Name}" Width="50" VerticalAlignment="Top">
|
||||
<Fluent:SplitButton.LargeIcon>
|
||||
<Grid>
|
||||
<Border Width="18" Height="18" Background="{Binding PageViewModel.DiagramViewModel.MindThemeModel.MindThemeLevel1.FillColor,Converter={StaticResource ColorBrushConverter}}" CornerRadius="3"/>
|
||||
</Grid>
|
||||
</Fluent:SplitButton.LargeIcon>
|
||||
<Fluent:MenuItem Header="天空蓝" Size="Small" Background="#73a1bf" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="SkyBlue"/>
|
||||
<Fluent:MenuItem Header="紧凑蓝" Size="Small" Background="#73a1bf" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="SkyBlueMini"/>
|
||||
<Fluent:MenuItem Header="文艺绿" Size="Small" Background="#73bf76" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="LiteratureGreen"/>
|
||||
<Fluent:MenuItem Header="紧凑绿" Size="Small" Background="#73bf76" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="LiteratureGreenMini"/>
|
||||
<Fluent:MenuItem Header="脑残粉" Size="Small" Background="#bf7394" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="BrainDeadPink"/>
|
||||
<Fluent:MenuItem Header="紧凑粉" Size="Small" Background="#bf7394" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="BrainDeadPinkMini"/>
|
||||
<Fluent:MenuItem Header="浪漫紫" Size="Small" Background="#7b73bf" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="RomanticPurple"/>
|
||||
<Fluent:MenuItem Header="紧凑紫" Size="Small" Background="#7b73bf" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="RomanticPurpleMini"/>
|
||||
<Fluent:MenuItem Header="清新红" Size="Small" Background="#bf7373" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="FreshRed"/>
|
||||
<Fluent:MenuItem Header="紧凑红" Size="Small" Background="#bf7373" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="FreshRedMini"/>
|
||||
<Fluent:MenuItem Header="泥土黄" Size="Small" Background="#bf9373" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="EarthyYellow"/>
|
||||
<Fluent:MenuItem Header="紧凑黄" Size="Small" Background="#bf9373" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="EarthyYellowMini"/>
|
||||
<Fluent:MenuItem Header="冷光黄" Size="Small" Background="#e9df98" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="CoolLightYellow"/>
|
||||
<Fluent:MenuItem Header="紧凑黄" Size="Small" Background="#e9df98" Margin="1.5" Command="{Binding PageViewModel.DiagramViewModel.ChangeMindThemeCommand}" CommandParameter="CoolLightYellowMini"/>
|
||||
<Fluent:SplitButton.ToolTip>
|
||||
<Fluent:ScreenTip Title="Theme"
|
||||
Text="主题"
|
||||
Width="190" />
|
||||
</Fluent:SplitButton.ToolTip>
|
||||
</Fluent:SplitButton>
|
||||
<Fluent:Button Header="整理布局" Width="50" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.ResetLayoutCommand}">
|
||||
<Fluent:Button.LargeIcon>
|
||||
<Path Width="15" Height="15" Stretch="Uniform" Fill="Black" Data="M358.4 0a102.4 102.4 0 0 1 102.4 102.4v819.2a102.4 102.4 0 0 1-102.4 102.4H102.4a102.4 102.4 0 0 1-102.4-102.4V102.4a102.4 102.4 0 0 1 102.4-102.4h256z m0 76.8H102.4a25.6 25.6 0 0 0-25.1904 20.992L76.8 102.4v819.2a25.6 25.6 0 0 0 20.992 25.1904L102.4 947.2h256a25.6 25.6 0 0 0 25.1904-20.992L384 921.6V102.4a25.6 25.6 0 0 0-20.992-25.1904L358.4 76.8z m268.288 547.84a38.4 38.4 0 0 1 50.1248-1.8432l4.1472 3.8912a38.4 38.4 0 0 1 1.8432 50.1248L630.272 742.4h333.7216l4.6592 0.3584c16.7936 2.56 29.696 18.5856 29.696 38.0416 0 21.1968-15.36 38.4-34.3552 38.4h-333.6704l52.4288 65.6384 3.2256 4.6592a38.4 38.4 0 0 1-63.232 43.3152l-102.4-128-3.328-4.9152a38.4 38.4 0 0 1 3.328-43.0592l102.4-128zM921.6 0a102.4 102.4 0 0 1 102.4 102.4v256a102.4 102.4 0 0 1-102.4 102.4h-256a102.4 102.4 0 0 1-102.4-102.4V102.4a102.4 102.4 0 0 1 102.4-102.4h256z m0 76.8h-256a25.6 25.6 0 0 0-25.1904 20.992L640 102.4v256a25.6 25.6 0 0 0 20.992 25.1904L665.6 384h256a25.6 25.6 0 0 0 25.1904-20.992L947.2 358.4V102.4a25.6 25.6 0 0 0-20.992-25.1904L921.6 76.8z"></Path>
|
||||
</Fluent:Button.LargeIcon>
|
||||
</Fluent:Button>
|
||||
<Fluent:Button Header="清除样式" SizeDefinition="Middle" Width="80" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.ClearThemeCommand}">
|
||||
<Fluent:Button.Icon>
|
||||
<Path Width="15" Height="15" Stretch="Uniform" Fill="Black" Data="M719.329882 422.249412l-255.578353 255.578353 234.315295 234.315294 255.518117-255.638588-234.315294-234.255059zM59.151059 315.813647l298.164706-298.164706a60.235294 60.235294 0 0 1 85.172706 0l596.329411 596.329412a60.235294 60.235294 0 0 1 0 85.172706l-298.164706 298.164706a60.235294 60.235294 0 0 1-85.232941 0l-596.329411-596.329412a60.235294 60.235294 0 0 1 0-85.172706z"></Path>
|
||||
</Fluent:Button.Icon>
|
||||
</Fluent:Button>
|
||||
<Fluent:Button Header="复制样式" SizeDefinition="Middle" Width="80" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.CopyThemeCommand}">
|
||||
<Fluent:Button.Icon>
|
||||
<Path Width="15" Height="15" Stretch="Uniform" Fill="Black" Data="M701.248 177.6l175.104-113.024 83.456 114.88-131.136 162.304-127.424-164.16z m-133.376-61.568c51.264 6.976 300.608 346.624 294.272 384.704s-145.536 143.68-145.536 143.68L400.64 238.592s116.032-129.6 167.232-122.56zM370.368 288.448l305.024 396.672-187.136 272L65.664 359.04s83.776-3.84 153.536-24.32c45.632-13.504 151.232-46.272 151.168-46.272z"></Path>
|
||||
</Fluent:Button.Icon>
|
||||
</Fluent:Button>
|
||||
<Fluent:Button Header="粘贴样式" SizeDefinition="Middle" Width="80" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.PasteThemeCommand}">
|
||||
<Fluent:Button.Icon>
|
||||
<Path Width="15" Height="15" Stretch="Uniform" Fill="Black" Data="M411.880727 905.169455v-279.272728h149.876364v279.272728z m54.272-279.645091v-124.881455h412.904728V325.771636h-64.605091v116.363637h-698.181819v-279.272728h698.181819v116.363637h111.104v268.055273h-412.904728v78.289454z"></Path>
|
||||
</Fluent:Button.Icon>
|
||||
</Fluent:Button>
|
||||
</Fluent:RibbonGroupBox>
|
||||
<Fluent:RibbonGroupBox Header="视图" IsLauncherVisible="True">
|
||||
<Fluent:SplitButton Header="展开" GroupName="Expand" Width="50" VerticalAlignment="Top">
|
||||
<Fluent:SplitButton.LargeIcon>
|
||||
<iconPacks:PackIconForkAwesome Kind="PlusSquareOutline" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:SplitButton.LargeIcon>
|
||||
<Fluent:MenuItem Header="展开到一级节点" Command="{Binding PageViewModel.DiagramViewModel.Expand2LevelCommand}" CommandParameter="1"/>
|
||||
<Fluent:MenuItem Header="展开到二级节点" Command="{Binding PageViewModel.DiagramViewModel.Expand2LevelCommand}" CommandParameter="2"/>
|
||||
<Fluent:MenuItem Header="展开到三级节点" Command="{Binding PageViewModel.DiagramViewModel.Expand2LevelCommand}" CommandParameter="3"/>
|
||||
<Fluent:MenuItem Header="展开到四级节点" Command="{Binding PageViewModel.DiagramViewModel.Expand2LevelCommand}" CommandParameter="4"/>
|
||||
<Fluent:MenuItem Header="展开到五级节点" Command="{Binding PageViewModel.DiagramViewModel.Expand2LevelCommand}" CommandParameter="5"/>
|
||||
<Fluent:MenuItem Header="展开到六级节点" Command="{Binding PageViewModel.DiagramViewModel.Expand2LevelCommand}" CommandParameter="6"/>
|
||||
<Fluent:SplitButton.ToolTip>
|
||||
<Fluent:ScreenTip Title="Expand"
|
||||
Text="展开"
|
||||
Width="190" />
|
||||
</Fluent:SplitButton.ToolTip>
|
||||
</Fluent:SplitButton>
|
||||
<Fluent:SplitButton Header="全选" GroupName="Select" Width="50" VerticalAlignment="Top">
|
||||
<Fluent:SplitButton.LargeIcon>
|
||||
<iconPacks:PackIconVaadinIcons Kind="AreaSelect" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:SplitButton.LargeIcon>
|
||||
<Fluent:MenuItem Header="全选" Command="{Binding PageViewModel.DiagramViewModel.SelectAllCommand}" />
|
||||
<Fluent:MenuItem Header="反选" Command="{Binding PageViewModel.DiagramViewModel.SelectInverseCommand}" />
|
||||
<Fluent:MenuItem Header="选择兄弟节点" Command="{Binding PageViewModel.DiagramViewModel.SelectBrotherCommand}" />
|
||||
<Fluent:MenuItem Header="选择同级节点" Command="{Binding PageViewModel.DiagramViewModel.SelectPearCommand}" />
|
||||
<Fluent:MenuItem Header="选择路径" Command="{Binding PageViewModel.DiagramViewModel.SelectRouteCommand}" />
|
||||
<Fluent:MenuItem Header="选择子树" Command="{Binding PageViewModel.DiagramViewModel.SelectChildCommand}" />
|
||||
<Fluent:SplitButton.ToolTip>
|
||||
<Fluent:ScreenTip Title="Select"
|
||||
Text="全选"
|
||||
Width="190" />
|
||||
</Fluent:SplitButton.ToolTip>
|
||||
</Fluent:SplitButton>
|
||||
<Fluent:Button Header="居中" Width="50" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.CenterMoveCommand}">
|
||||
<Fluent:Button.LargeIcon>
|
||||
<iconPacks:PackIconMaterial Kind="ImageFilterCenterFocus" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Fluent:Button.LargeIcon>
|
||||
</Fluent:Button>
|
||||
<Fluent:Button Header="适应窗口大小" Width="90" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.FitAutoCommand}">
|
||||
<Fluent:Button.LargeIcon>
|
||||
<Path Width="18" Height="18" Stretch="Uniform" Fill="Black" RenderTransformOrigin="0.5,0.5" Data="M1023.216289 841.246459v9.61262a268.243293 268.243293 0 0 1-1.9339 51.191468 145.725046 145.725046 0 0 1-48.0631 85.66039 153.233128 153.233128 0 0 1-65.126924 31.681831 126.897961 126.897961 0 0 1-40.441259 2.218297H175.769975a293.611509 293.611509 0 0 1-66.776427-3.640282 142.198522 142.198522 0 0 1-100.221518-91.348331A239.291674 239.291674 0 0 1 0.524516 846.081209V193.560629 132.472144a164.950286 164.950286 0 0 1 16.551908-56.253736A147.886463 147.886463 0 0 1 93.806746 8.930067a155.735822 155.735822 0 0 1 26.505805-6.768649L134.077368 0.739432h734.654446a108.070877 108.070877 0 0 1 34.127646 1.421986 152.607454 152.607454 0 0 1 65.980114 29.122257 146.180081 146.180081 0 0 1 51.191468 84.522802 254.819752 254.819752 0 0 1 2.787091 55.116147V841.417097zM942.618167 129.457535a65.126923 65.126923 0 0 0-22.751764-35.322113 53.011609 53.011609 0 0 0-50.395156-13.025385H138.798359l-5.687941 0.568794-13.821696 3.697162a64.956285 64.956285 0 0 0-31.169917 26.847081 120.29995 120.29995 0 0 0-8.816308 61.657279v661.735044a245.548409 245.548409 0 0 0 1.9339 57.391324 63.648059 63.648059 0 0 0 41.920124 44.934733 172.060212 172.060212 0 0 0 45.844804 2.843971h702.858857a54.149197 54.149197 0 0 0 23.661834-1.421986 73.033161 73.033161 0 0 0 29.520413-16.096872 98.515136 98.515136 0 0 0 19.623396-81.166917V174.16475a199.077931 199.077931 0 0 0-2.047658-44.707215z m-116.090874 694.781981a37.085375 37.085375 0 0 1-19.850914 20.362828h-0.511915a36.232184 36.232184 0 0 1-13.366661 2.730212H597.75831a36.516581 36.516581 0 0 1-31.681831-18.713326 38.052325 38.052325 0 0 1 0-37.369772 36.516581 36.516581 0 0 1 31.681831-18.713325h106.762651l-120.413709-123.030162a37.881686 37.881686 0 0 1-9.953897-36.345942 36.914736 36.914736 0 0 1 26.107649-26.676443 35.890907 35.890907 0 0 1 35.549631 10.181414l120.413708 123.030162v-109.151586a37.54041 37.54041 0 0 1 18.258291-32.364384 36.004666 36.004666 0 0 1 36.57346 0 37.54041 37.54041 0 0 1 18.25829 32.364384v199.419208a37.199133 37.199133 0 0 1-2.559573 13.594179zM402.775696 249.359329H296.297442l120.35683 123.087041a37.938566 37.938566 0 0 1 9.498861 36.118425 36.971616 36.971616 0 0 1-25.880131 26.448925 36.004666 36.004666 0 0 1-35.322113-9.6695L244.59406 302.2003v109.151586a37.654169 37.654169 0 0 1-18.31517 32.421263 36.004666 36.004666 0 0 1-36.57346 0 37.711048 37.711048 0 0 1-18.25829-32.421263V211.989557a36.857857 36.857857 0 0 1 2.616452-13.594178v-0.625674a36.914736 36.914736 0 0 1 19.907794-20.305949h0.568794a34.525801 34.525801 0 0 1 13.309781-2.673332h195.039494a36.459701 36.459701 0 0 1 31.681831 18.656446 38.166083 38.166083 0 0 1 0 37.426651 36.459701 36.459701 0 0 1-31.79559 18.485808z">
|
||||
<Path.RenderTransform>
|
||||
<ScaleTransform ScaleY="-1"/>
|
||||
</Path.RenderTransform>
|
||||
</Path>
|
||||
</Fluent:Button.LargeIcon>
|
||||
</Fluent:Button>
|
||||
<Fluent:Button Header="适应窗口宽度" Width="90" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.FitWidthCommand}">
|
||||
<Fluent:Button.LargeIcon>
|
||||
<Path Width="18" Height="18" Stretch="Uniform" Fill="Black" Data="M113.777 819.198 113.777 204.8c0-50.267 40.75-91.022 91.02-91.022l614.376 0c50.29 0 91.045 40.755 91.045 91.022l0 614.398c0 50.27-40.755 91.02-91.045 91.02L204.797 910.218C154.527 910.218 113.777 869.468 113.777 819.198zM796.438 841.953c25.125 0 45.51-20.385 45.51-45.51L841.948 227.554c0-25.122-20.385-45.51-45.505-45.51L227.552 182.044c-25.125 0-45.535 20.387-45.535 45.51l0 568.889c0 25.125 20.39 45.51 45.535 45.51L796.438 841.953zM623.043 603.269l57.115-57.14L344.357 546.129l55.5 55.505c13.31 13.335 13.335 34.93 0 48.265-13.335 13.33-34.95 13.33-48.29 0l-105.765-105.77c-3.415-1.615-6.78-3.525-9.625-6.37-7.08-7.1-10.1-16.475-9.67-25.76-0.46-9.262 2.59-18.66 9.69-25.76 2.85-2.842 6.15-4.8 9.58-6.348l105.79-105.79c13.34-13.335 34.955-13.335 48.29 0 13.31 13.332 13.335 34.927 0 48.262l-55.5 55.502 335.802 0-57.115-57.117c-13.355-13.335-13.335-34.952 0-48.287s34.93-13.335 48.265 0l115.37 115.395c13.335 13.332 13.36 34.927 0 48.262l-115.37 115.395c-13.335 13.335-34.95 13.335-48.265 0C609.708 638.198 609.708 616.583 623.043 603.269z"></Path>
|
||||
</Fluent:Button.LargeIcon>
|
||||
</Fluent:Button>
|
||||
<Fluent:Button Header="适应窗口高度" Width="90" VerticalAlignment="Top" Command="{Binding PageViewModel.DiagramViewModel.FitHeightCommand}">
|
||||
<Fluent:Button.LargeIcon>
|
||||
<Path Width="18" Height="18" Stretch="Uniform" Fill="Black" Data="M819.198 910.218 204.799 910.218c-50.267 0-91.022-40.75-91.022-91.02L113.777 204.822c0-50.29 40.755-91.045 91.022-91.045l614.398 0c50.27 0 91.02 40.755 91.02 91.045l0 614.376C910.218 869.468 869.468 910.218 819.198 910.218zM841.953 227.554c0-25.122-20.385-45.51-45.51-45.51L227.554 182.044c-25.122 0-45.51 20.387-45.51 45.51l0 568.889c0 25.125 20.387 45.535 45.51 45.535l568.889 0c25.125 0 45.51-20.39 45.51-45.535L841.953 227.554zM603.268 400.952l-57.14-57.115 0 335.802 55.505-55.5c13.335-13.31 34.93-13.335 48.265 0 13.33 13.335 13.33 34.95 0 48.29l-105.77 105.765c-1.615 3.415-3.525 6.78-6.37 9.625-7.1 7.08-16.475 10.1-25.76 9.67-9.262 0.46-18.66-2.59-25.76-9.69-2.842-2.85-4.8-6.15-6.347-9.58l-105.79-105.79c-13.335-13.34-13.335-34.955 0-48.29 13.332-13.31 34.927-13.335 48.262 0l55.502 55.5L477.865 343.837l-57.117 57.115c-13.335 13.357-34.952 13.335-48.287 0s-13.335-34.93 0-48.265l115.395-115.37c13.332-13.335 34.927-13.357 48.262 0l115.395 115.37c13.335 13.335 13.335 34.952 0 48.265C638.198 414.286 616.583 414.286 603.268 400.952z"></Path>
|
||||
</Fluent:Button.LargeIcon>
|
||||
</Fluent:Button>
|
||||
</Fluent:RibbonGroupBox>
|
||||
|
||||
</Fluent:RibbonTabItem>
|
||||
<Fluent:RibbonTabItem Header="帮助">
|
||||
<Fluent:RibbonGroupBox>
|
||||
@@ -1934,6 +2423,7 @@
|
||||
MaximumZoomValue="{Binding MaximumZoomValue,Mode=TwoWay}"
|
||||
MinimumZoomValue="{Binding MinimumZoomValue,Mode=TwoWay}"
|
||||
ZoomValue="{Binding ZoomValue,Mode=TwoWay}"
|
||||
FitViewModel="{Binding FitViewModel}"
|
||||
Margin="20,0,0,20" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AIStudio.Wpf.Controls" Version="1.1.46" />
|
||||
<PackageReference Include="Costura.Fody" Version="5.7.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
3
AIStudio.Wpf.DiagramDesigner.Demo/FodyWeavers.xml
Normal file
3
AIStudio.Wpf.DiagramDesigner.Demo/FodyWeavers.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<Costura />
|
||||
</Weavers>
|
||||
141
AIStudio.Wpf.DiagramDesigner.Demo/FodyWeavers.xsd
Normal file
141
AIStudio.Wpf.DiagramDesigner.Demo/FodyWeavers.xsd
Normal file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeRuntimeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="IncludeRuntimeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeRuntimeReferences" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="UseRuntimeReferencePaths" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableCompression" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableCleanup" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="ExcludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="ExcludeRuntimeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeRuntimeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="PreloadOrder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@@ -32,8 +32,8 @@ namespace AIStudio.Wpf.DiagramDesigner.Demo
|
||||
_viewDic = new Dictionary<string, Type>();
|
||||
_viewModelDic = new Dictionary<string, Type>();
|
||||
var assembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(x => x.FullName.StartsWith("AIStudio.Wpf.DiagramDesigner.Demo"));
|
||||
assembly.GetTypes().Where(x => x.Namespace.StartsWith("AIStudio.Wpf.DiagramDesigner.Demo.Views") && x.IsSubclassOf(typeof(UserControl))).ToList().ForEach(x => _viewDic.Add(x.Name.Remove(x.Name.Length - 4), x));
|
||||
assembly.GetTypes().Where(x => x.Namespace.StartsWith("AIStudio.Wpf.DiagramDesigner.Demo.ViewModels") && x.Name.Contains("ViewModel")).ToList().ForEach(x => _viewModelDic.Add(x.Name.Remove(x.Name.Length - 9), x));
|
||||
assembly.GetTypes().Where(x => x?.Namespace?.StartsWith("AIStudio.Wpf.DiagramDesigner.Demo.Views") == true && x?.IsSubclassOf(typeof(UserControl))== true ).ToList().ForEach(x => _viewDic.Add(x.Name.Remove(x.Name.Length - 4), x));
|
||||
assembly.GetTypes().Where(x => x?.Namespace?.StartsWith("AIStudio.Wpf.DiagramDesigner.Demo.ViewModels") == true && x?.Name.Contains("ViewModel") == true).ToList().ForEach(x => _viewModelDic.Add(x.Name.Remove(x.Name.Length - 9), x));
|
||||
}
|
||||
#endregion
|
||||
List<MenuItemViewModel> _menus;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using AIStudio.Wpf.Flowchart;
|
||||
using AIStudio.Wpf.Mind.Helpers;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
|
||||
{
|
||||
@@ -14,6 +12,8 @@ namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
|
||||
|
||||
GetDataCommand = new SimpleCommand(GetDataExcute);
|
||||
SetDataCommand = new SimpleCommand(SetDataExcute);
|
||||
|
||||
var theme = MindThemeHelper.GetSkyBlueTheme();
|
||||
}
|
||||
|
||||
private Func<string> _getDataFunc;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Flowchart;component/Themes/FlowNode.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Mind;component/Themes/MindNode.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
|
||||
@@ -14,12 +14,20 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
static GlobalType()
|
||||
{
|
||||
string rootPath = System.AppDomain.CurrentDomain.BaseDirectory;
|
||||
AllAssemblies = Directory.GetFiles(rootPath, "*.dll")
|
||||
.Where(x => AssemblyPattern.Any(y => new FileInfo(x).Name.Contains(y)))
|
||||
.Select(x => Assembly.LoadFrom(x))
|
||||
.Where(x => !x.IsDynamic)
|
||||
.ToList();
|
||||
//string rootPath = System.AppDomain.CurrentDomain.BaseDirectory;
|
||||
//AllAssemblies = Directory.GetFiles(rootPath, "*.dll")
|
||||
// .Where(x => AssemblyPattern.Any(y => new FileInfo(x).Name.Contains(y)))
|
||||
// .Select(x => Assembly.LoadFrom(x))
|
||||
// .Where(x => !x.IsDynamic)
|
||||
// .ToList();
|
||||
|
||||
//var refAssembyNames = Assembly.GetEntryAssembly().GetReferencedAssemblies();
|
||||
//foreach (var asslembyNames in refAssembyNames)
|
||||
//{
|
||||
// Assembly.Load(asslembyNames);
|
||||
//}
|
||||
|
||||
AllAssemblies = AppDomain.CurrentDomain.GetReferanceAssemblies().Where(x => x.FullName.StartsWith("AIStudio")).ToList();
|
||||
|
||||
AllAssemblies.ForEach(aAssembly => {
|
||||
try
|
||||
@@ -33,6 +41,29 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
});
|
||||
}
|
||||
|
||||
public static List<Assembly> GetReferanceAssemblies(this AppDomain domain)
|
||||
{
|
||||
var list = new List<Assembly>();
|
||||
domain.GetAssemblies().ToList().ForEach(i =>
|
||||
{
|
||||
GetReferanceAssemblies(i, list);
|
||||
});
|
||||
return list;
|
||||
}
|
||||
static void GetReferanceAssemblies(Assembly assembly, List<Assembly> list)
|
||||
{
|
||||
assembly.GetReferencedAssemblies().ToList().ForEach(i =>
|
||||
{
|
||||
var ass = Assembly.Load(i);
|
||||
if (!list.Contains(ass))
|
||||
{
|
||||
list.Add(ass);
|
||||
GetReferanceAssemblies(ass, list);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 解决方案程序集匹配名
|
||||
/// </summary>
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
if (link.IsFullConnection == false)
|
||||
return Normal(_, link);
|
||||
|
||||
var shapeMargin = 10;
|
||||
var globalBoundsMargin = 50;
|
||||
var shapeMargin = link.OrthogonalShapeMargin;
|
||||
var globalBoundsMargin = link.OrthogonalGlobalBoundsMargin;
|
||||
var spots = new List<PointBase>();
|
||||
var verticals = new List<double>();
|
||||
var horizontals = new List<double>();
|
||||
|
||||
@@ -419,8 +419,9 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
|
||||
public double SmoothMargin { get; set; } = 125;
|
||||
|
||||
public double SmoothAutoSlope { get; set; } = 1;
|
||||
public double OrthogonalShapeMargin { get; set; } = 10;
|
||||
public double OrthogonalGlobalBoundsMargin { get; set; } = 50;
|
||||
|
||||
public bool IsPortless => SourceConnectorInfo.IsPortless || SinkConnectorInfoFully?.IsPortless == true;
|
||||
#endregion
|
||||
@@ -712,6 +713,17 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
SinkConnectorInfo = port;
|
||||
}
|
||||
|
||||
public void UpdateConnectionMode(FullyCreatedConnectorInfo source, FullyCreatedConnectorInfo sink, string pathmode, string routermode)
|
||||
{
|
||||
//先置空,避免更新
|
||||
SourceConnectorInfo = null;
|
||||
SinkConnectorInfo = null;
|
||||
PathMode = pathmode;
|
||||
RouterMode = routermode;
|
||||
SourceConnectorInfo = source;
|
||||
SinkConnectorInfo = sink;
|
||||
}
|
||||
|
||||
public void SetVisible(bool visible)
|
||||
{
|
||||
Visible = visible;
|
||||
|
||||
@@ -574,6 +574,32 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
private string _searchText;
|
||||
public string SearchText
|
||||
{
|
||||
get
|
||||
{
|
||||
return _searchText;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref _searchText, value);
|
||||
}
|
||||
}
|
||||
|
||||
private string _searchInfo;
|
||||
public string SearchInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return _searchText;
|
||||
}
|
||||
set
|
||||
{
|
||||
SetProperty(ref _searchInfo, value);
|
||||
}
|
||||
}
|
||||
|
||||
protected ObservableCollection<CinchMenuItem> menuOptions;
|
||||
public IEnumerable<CinchMenuItem> MenuOptions
|
||||
{
|
||||
@@ -1013,6 +1039,24 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
return this._resetLayoutCommand ?? (this._resetLayoutCommand = new SimpleCommand(ExecuteEnable, this.ExecutedResetLayoutCommand));
|
||||
}
|
||||
}
|
||||
|
||||
private SimpleCommand _searchDownCommand;
|
||||
public SimpleCommand SearchDownCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._searchDownCommand ?? (this._searchDownCommand = new SimpleCommand(ExecuteEnable, this.ExecutedSearchDownCommand));
|
||||
}
|
||||
}
|
||||
|
||||
private SimpleCommand _searchUpCommand;
|
||||
public SimpleCommand SearchUpCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._searchUpCommand ?? (this._searchUpCommand = new SimpleCommand(ExecuteEnable, this.ExecutedSearchUpCommand));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected DoCommandManager DoCommandManager = new DoCommandManager();
|
||||
@@ -1136,7 +1180,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
#endregion
|
||||
protected virtual void ExecutedResetLayoutCommand(object obj)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
}
|
||||
|
||||
private void Items_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
|
||||
@@ -1168,8 +1212,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
RaisePropertyChanged(nameof(SelectedItem));
|
||||
}
|
||||
|
||||
//连续改变,需要特殊处理,不单独触发属性改变ReDo
|
||||
if (sender is DesignerItemViewModelBase designer)
|
||||
//连续改变,需要特殊处理,不单独触发属性改变ReDo
|
||||
if (sender is DesignerItemViewModelBase designer)
|
||||
{
|
||||
if (designer.BeginDo) return;
|
||||
}
|
||||
@@ -1395,7 +1439,17 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
if (parameter is ISelectable selectable)
|
||||
{
|
||||
selectable.IsSelected = true;
|
||||
foreach (var item in this.Items.ToList())
|
||||
{
|
||||
if (object.Equals(selectable, item))
|
||||
{
|
||||
item.IsSelected = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.IsSelected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -2182,29 +2236,6 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
Delete(parameter);
|
||||
}
|
||||
|
||||
protected void ExecuteSelectBrotherCommand(object parameter)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void ExecuteSelectPearCommand(object parameter)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void ExecuteSelectRouteCommand(object parameter)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void ExecuteSelectChildCommand(object parameter)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected virtual bool Delete(object parameter)
|
||||
{
|
||||
List<SelectableDesignerItemViewModelBase> itemsToRemove;
|
||||
@@ -2592,5 +2623,88 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void ExecutedSearchUpCommand(object obj)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
var selecteddesign = SelectedItem as DesignerItemViewModelBase;
|
||||
var searchitems = Items.OfType<DesignerItemViewModelBase>().Where(p => p.Text?.Contains(obj.ToString()) == true).ToList();
|
||||
if (searchitems.Count > 0)
|
||||
{
|
||||
int selectindex = 0;
|
||||
if (selecteddesign != null)
|
||||
{
|
||||
int index = searchitems.IndexOf(selecteddesign);
|
||||
if (index == -1)
|
||||
{
|
||||
selectindex = 0;
|
||||
}
|
||||
else if (index - 1 >= 0)
|
||||
{
|
||||
selectindex = index - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
selectindex = searchitems.Count - 1;
|
||||
}
|
||||
}
|
||||
SelectItemCommand.Execute(searchitems[selectindex]);
|
||||
SearchInfo = $"第{selectindex + 1}条,共{searchitems.Count}条";
|
||||
|
||||
FitViewModel = new FitViewModel() { BoundingRect = DiagramViewModelHelper.GetBoundingRectangle(SelectedItem as DesignerItemViewModelBase) };
|
||||
}
|
||||
else
|
||||
{
|
||||
SearchInfo = "第0条,共0条";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SearchInfo = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void ExecutedSearchDownCommand(object obj)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
var selecteddesign = SelectedItem as DesignerItemViewModelBase;
|
||||
var searchitems = Items.OfType<DesignerItemViewModelBase>().Where(p => p.Text?.Contains(obj.ToString()) == true).ToList();
|
||||
if (searchitems.Count > 0)
|
||||
{
|
||||
int selectindex = 0;
|
||||
if (selecteddesign != null)
|
||||
{
|
||||
int index = searchitems.IndexOf(selecteddesign);
|
||||
if (index == -1)
|
||||
{
|
||||
selectindex = 0;
|
||||
}
|
||||
else if (index + 1 < searchitems.Count)
|
||||
{
|
||||
selectindex = index + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
selectindex = 0;
|
||||
}
|
||||
}
|
||||
SelectItemCommand.Execute(searchitems[selectindex]);
|
||||
SearchInfo = $"第{selectindex + 1}条,共{searchitems.Count}条";
|
||||
|
||||
FitViewModel = new FitViewModel() { BoundingRect = DiagramViewModelHelper.GetBoundingRectangle(SelectedItem as DesignerItemViewModelBase) };
|
||||
}
|
||||
else
|
||||
{
|
||||
SearchInfo = "第0条,共0条";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SearchInfo = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,5 +32,10 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
return new RectangleBase(new PointBase(x1, y1), new PointBase(x2, y2));
|
||||
}
|
||||
|
||||
public static RectangleBase GetBoundingRectangle(DesignerItemViewModelBase item)
|
||||
{
|
||||
return GetBoundingRectangle(new DesignerItemViewModelBase[] { item });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
|
||||
xmlns:controls="clr-namespace:AIStudio.Wpf.Mind.Controls"
|
||||
@@ -21,9 +22,9 @@
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid Height="70">
|
||||
<Grid Height="100">
|
||||
<TabControl>
|
||||
<TabItem Header="思路">
|
||||
<TabItem Header="思路" Height="30" Width="50">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
@@ -103,7 +104,7 @@
|
||||
<TextBlock>编辑</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatButtonStyle}" Command="{Binding DeleteCommand}" Height="22" VerticalAlignment="Bottom">
|
||||
<Button Style="{StaticResource FlatButtonStyle}" Command="{Binding DeleteCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Width="12" Height="12" Stretch="Uniform" Fill="Black" Data="M 25.3333,23.75L 50.6667,23.75C 51.5411,23.75 51.8541,27.3125 51.8541,27.3125L 24.1458,27.3125C 24.1458,27.3125 24.4589,23.75 25.3333,23.75 Z M 35.625,19.7917L 40.375,19.7917C 40.8122,19.7917 41.9583,20.9378 41.9583,21.375C 41.9583,21.8122 40.8122,22.9584 40.375,22.9584L 35.625,22.9584C 35.1878,22.9584 34.0416,21.8122 34.0416,21.375C 34.0416,20.9378 35.1878,19.7917 35.625,19.7917 Z M 27.7083,28.5L 48.2916,28.5C 49.1661,28.5 49.875,29.2089 49.875,30.0834L 48.2916,53.8334C 48.2916,54.7078 47.5828,55.4167 46.7083,55.4167L 29.2917,55.4167C 28.4172,55.4167 27.7083,54.7078 27.7083,53.8334L 26.125,30.0834C 26.125,29.2089 26.8339,28.5 27.7083,28.5 Z M 30.0833,31.6667L 30.4792,52.25L 33.25,52.25L 32.8542,31.6667L 30.0833,31.6667 Z M 36.4167,31.6667L 36.4167,52.25L 39.5833,52.25L 39.5833,31.6667L 36.4167,31.6667 Z M 43.1458,31.6667L 42.75,52.25L 45.5208,52.25L 45.9167,31.6667L 43.1458,31.6667 Z "></Path>
|
||||
<TextBlock>删除</TextBlock>
|
||||
@@ -309,69 +310,80 @@
|
||||
<UniformGrid Columns="5" Grid.Row="0" Grid.Column="12" >
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Background="Yellow"
|
||||
Margin="1"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Command="{Binding AddRatioCommand}"
|
||||
CommandParameter="Null">
|
||||
<Path Stretch="Uniform" Fill="DarkRed" Data="m 256,76 c 48.1,0 93.3,18.7 127.3,52.7 34,34 52.7,79.2 52.7,127.3 0,48.1 -18.7,93.3 -52.7,127.3 -34,34 -79.2,52.7 -127.3,52.7 -48.1,0 -93.3,-18.7 -127.3,-52.7 C 94.7,349.3 76,304.1 76,256 76,207.9 94.7,162.7 128.7,128.7 162.7,94.7 207.9,76 256,76 m 0,-28 C 141.1,48 48,141.1 48,256 48,370.9 141.1,464 256,464 370.9,464 464,370.9 464,256 464,141.1 370.9,48 256,48 Z m 75.3,260.7 -52.7,-52.7 52.7,-52.7 c 6.2,-6.2 6.2,-16.4 0,-22.6 -6.2,-6.2 -16.4,-6.2 -22.6,0 L 256,233.4 203.3,180.7 c -6.2,-6.2 -15.6,-7.1 -22.6,0 -7.1,7.1 -6,16.6 0,22.6 l 52.7,52.7 -52.7,52.7 c -6.7,6.7 -6.4,16.3 0,22.6 6.4,6.4 16.4,6.2 22.6,0 l 52.7,-52.7 52.7,52.7 c 6.2,6.2 16.4,6.2 22.6,0 6.3,-6.2 6.3,-16.4 0,-22.6 z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Background="Yellow"
|
||||
Margin="1"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Command="{Binding AddRatioCommand}"
|
||||
CommandParameter="0">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Background="Yellow"
|
||||
Margin="1"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Command="{Binding AddRatioCommand}"
|
||||
CommandParameter="0.125">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C13.93 5 15.68 5.78 16.95 7.05L12 12V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Background="Yellow"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Command="{Binding AddRatioCommand}"
|
||||
CommandParameter="0.25">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C15.87 5 19 8.13 19 12H12V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Background="Yellow"
|
||||
Margin="1"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Command="{Binding AddRatioCommand}"
|
||||
CommandParameter="0.375">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C15.87 5 19 8.13 19 12C19 13.93 18.22 15.68 16.95 16.95L12 12V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Background="Yellow"
|
||||
Margin="1"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Command="{Binding AddRatioCommand}"
|
||||
CommandParameter="0.5">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Background="Yellow"
|
||||
Margin="1"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Command="{Binding AddRatioCommand}"
|
||||
CommandParameter="0.625">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19C10.07 19 8.32 18.22 7.05 16.95L12 12V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Background="Yellow"
|
||||
Margin="1"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Command="{Binding AddRatioCommand}"
|
||||
CommandParameter="0.75">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19C8.13 19 5 15.87 5 12H12V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Background="Yellow"
|
||||
Margin="1"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Command="{Binding AddRatioCommand}"
|
||||
CommandParameter="0.875">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="M12 2C17.5 2 22 6.5 22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2M12 4C7.58 4 4 7.58 4 12C4 16.42 7.58 20 12 20C16.42 20 20 16.42 20 12C20 7.58 16.42 4 12 4M12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19C8.13 19 5 15.87 5 12C5 10.07 5.78 8.32 7.05 7.05L12 12V5Z"></Path>
|
||||
</Button>
|
||||
<Button Style="{StaticResource FlatCircleButtonStyle}"
|
||||
Background="Yellow"
|
||||
Margin="1"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Command="{Binding AddRatioCommand}"
|
||||
CommandParameter="1">
|
||||
<Path Stretch="Uniform" Fill="Green" Data="m 256,76 c 48.1,0 93.3,18.7 127.3,52.7 34,34 52.7,79.2 52.7,127.3 0,48.1 -18.7,93.3 -52.7,127.3 -34,34 -79.2,52.7 -127.3,52.7 -48.1,0 -93.3,-18.7 -127.3,-52.7 C 94.7,349.3 76,304.1 76,256 76,207.9 94.7,162.7 128.7,128.7 162.7,94.7 207.9,76 256,76 m 0,-28 C 141.1,48 48,141.1 48,256 48,370.9 141.1,464 256,464 370.9,464 464,370.9 464,256 464,141.1 370.9,48 256,48 Z M 362.6,192.9 345,174.8 c -0.7,-0.8 -1.8,-1.2 -2.8,-1.2 -1.1,0 -2.1,0.4 -2.8,1.2 L 217.4,297.7 173,253.3 c -0.8,-0.8 -1.8,-1.2 -2.8,-1.2 -1,0 -2,0.4 -2.8,1.2 l -17.8,17.8 c -1.6,1.6 -1.6,4.1 0,5.7 l 56,56 c 3.6,3.6 8,5.7 11.7,5.7 5.3,0 9.9,-3.9 11.6,-5.5 H 229 L 362.7,198.6 c 1.4,-1.7 1.4,-4.2 -0.1,-5.7 z"></Path>
|
||||
@@ -412,7 +424,7 @@
|
||||
</Grid>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="外观">
|
||||
<TabItem Header="外观" Height="30" Width="50">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
@@ -440,7 +452,7 @@
|
||||
<MenuItem Header="鱼骨头图" IsCheckable="True" IsChecked="{Binding MindType,Converter={dd:ConverterValueMapToBool Parameter='FishBone'}, ConverterParameter='FishBone'}" />
|
||||
<MenuItem Header="逻辑结构图" IsCheckable="True" IsChecked="{Binding MindType,Converter={dd:ConverterValueMapToBool Parameter='Logical'}, ConverterParameter='Logical'}" />
|
||||
<MenuItem Header="组织结构图" IsCheckable="True" IsChecked="{Binding MindType,Converter={dd:ConverterValueMapToBool Parameter='Organizational'}, ConverterParameter='Organizational'}" />
|
||||
<MenuItem Header="天盘图" IsCheckable="True" IsChecked="{Binding MindType,Converter={dd:ConverterValueMapToBool Parameter='Celestial'}, ConverterParameter='Celestial'}" />
|
||||
<MenuItem Header="天盘图" IsCheckable="True" IsEnabled="False" ToolTip="暂未完成" IsChecked="{Binding MindType,Converter={dd:ConverterValueMapToBool Parameter='Celestial'}, ConverterParameter='Celestial'}" />
|
||||
</controls:DropDownButton.Items>
|
||||
</controls:DropDownButton>
|
||||
<Line Grid.Column="1" X1="0" Y1="0" X2="0" Y2="100" StrokeDashArray="1" Stroke="Gray" StrokeThickness="1"></Line>
|
||||
@@ -595,7 +607,7 @@
|
||||
</Grid>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="视图">
|
||||
<TabItem Header="视图" Height="30" Width="50">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
@@ -635,12 +647,12 @@
|
||||
</StackPanel>
|
||||
</controls:DropDownButton.Content>
|
||||
<controls:DropDownButton.Items>
|
||||
<MenuItem Header="全选" IsCheckable="True" Command="{Binding SelectAllCommand}" />
|
||||
<MenuItem Header="反选" IsCheckable="True" Command="{Binding SelectInverseCommand}" />
|
||||
<MenuItem Header="选择兄弟节点" IsCheckable="True" Command="{Binding SelectBrotherCommand}" />
|
||||
<MenuItem Header="选择同级节点" IsCheckable="True" Command="{Binding SelectPearCommand}" />
|
||||
<MenuItem Header="选择路径" IsCheckable="True" Command="{Binding SelectRouteCommand}" />
|
||||
<MenuItem Header="选择子树" IsCheckable="True" Command="{Binding SelectChildCommand}" />
|
||||
<MenuItem Header="全选" Command="{Binding SelectAllCommand}" />
|
||||
<MenuItem Header="反选" Command="{Binding SelectInverseCommand}" />
|
||||
<MenuItem Header="选择兄弟节点" Command="{Binding SelectBrotherCommand}" />
|
||||
<MenuItem Header="选择同级节点" Command="{Binding SelectPearCommand}" />
|
||||
<MenuItem Header="选择路径" Command="{Binding SelectRouteCommand}" />
|
||||
<MenuItem Header="选择子树" Command="{Binding SelectChildCommand}" />
|
||||
</controls:DropDownButton.Items>
|
||||
</controls:DropDownButton>
|
||||
<Line Grid.Column="2" X1="0" Y1="0" X2="0" Y2="100" StrokeDashArray="1" Stroke="Gray" StrokeThickness="1"></Line>
|
||||
@@ -673,15 +685,46 @@
|
||||
<TextBlock>适应窗口高度</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
</StackPanel>
|
||||
<Line Grid.Column="4" X1="0" Y1="0" X2="0" Y2="100" StrokeDashArray="1" Stroke="Gray" StrokeThickness="1"></Line>
|
||||
<Button Style="{StaticResource FlatButtonStyle}" Grid.Column="5" >
|
||||
<Button Style="{StaticResource FlatButtonStyle}" Command="{Binding SearchDownCommand}" CommandParameter="{Binding ElementName=txtsearch,Path=Text}" Grid.Column="5" >
|
||||
<StackPanel>
|
||||
<Path Width="18" Height="18" Stretch="Uniform" Fill="Black" Data="M911.958045 890.721335l-241.415018-246.54112a336.369964 336.369964 0 1 0-58.095828 45.158522l247.029321 252.643623a36.859118 36.859118 0 0 0 51.749225 0 37.103218 37.103218 0 0 0 0.7323-51.261025zM176.240286 404.473897a261.431228 261.431228 0 1 1 261.431228 261.431228A261.675328 261.675328 0 0 1 176.240286 404.473897z"></Path>
|
||||
<TextBlock>搜索</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Border BorderBrush="Gray" Grid.Column="6" BorderThickness="1" CornerRadius="3">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox x:Name="txtsearch" Text="{Binding SearchText}" VerticalContentAlignment="Center" BorderThickness="0" Background="Transparent">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Enter" Command="{Binding SearchDownCommand}" CommandParameter="{Binding ElementName=txtsearch,Path=Text}"/>
|
||||
</TextBox.InputBindings>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="LostFocus">
|
||||
<i:InvokeCommandAction Command="{Binding SearchDownCommand}" CommandParameter="{Binding ElementName=txtsearch,Path=Text}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</TextBox>
|
||||
<Line X1="0" Y1="0" X2="0" Y2="100" Stroke="Gray" StrokeThickness="0.5" HorizontalAlignment="Right"></Line>
|
||||
<Button Grid.Column="1" Padding="6,0" Style="{StaticResource FlatButtonStyle}" Command="{Binding SearchUpCommand}" CommandParameter="{Binding ElementName=txtsearch,Path=Text}">
|
||||
<Path Width="10" Height="10" Stretch="Uniform" Fill="Black" Data="M17,13.41,12.71,9.17a1,1,0,0,0-1.42,0L7.05,13.41a1,1,0,0,0,0,1.42,1,1,0,0,0,1.41,0L12,11.29l3.54,3.54a1,1,0,0,0,.7.29,1,1,0,0,0,.71-.29A1,1,0,0,0,17,13.41Z"></Path>
|
||||
</Button>
|
||||
<Button Grid.Column="2" Padding="6,0" Style="{StaticResource FlatButtonStyle}" Command="{Binding SearchDownCommand}" CommandParameter="{Binding ElementName=txtsearch,Path=Text}">
|
||||
<Path Width="10" Height="10" Stretch="Uniform" Fill="Black" Data="M17,9.17a1,1,0,0,0-1.41,0L12,12.71,8.46,9.17a1,1,0,0,0-1.41,0,1,1,0,0,0,0,1.42l4.24,4.24a1,1,0,0,0,1.42,0L17,10.59A1,1,0,0,0,17,9.17Z"></Path>
|
||||
</Button>
|
||||
<Line X1="0" Y1="0" X2="150" Y2="0" Stroke="Gray" StrokeThickness="0.5" VerticalAlignment="Bottom" Grid.ColumnSpan="3"></Line>
|
||||
<TextBlock Grid.Row="1" Grid.ColumnSpan="3" Text="{Binding SearchInfo}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
@@ -86,14 +86,13 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
}
|
||||
else
|
||||
{
|
||||
connector?.SetSourcePort(source.FirstConnector);
|
||||
connector?.SetSinkPort(sink.FirstConnector);
|
||||
connector.PathMode = DrawMode.ConnectingLineStraight.ToString();
|
||||
connector.RouterMode = RouterMode.RouterOrthogonal.ToString();
|
||||
connector?.UpdateConnectionMode(source.FirstConnector, sink.FirstConnector, DrawMode.ConnectingLineStraight.ToString(), RouterMode.RouterOrthogonal.ToString());
|
||||
}
|
||||
connector.ColorViewModel.LineColor = source.ColorViewModel.LineColor;
|
||||
connector.SmoothMargin = 20;
|
||||
connector.SmoothAutoSlope = 0.2;
|
||||
connector.OrthogonalShapeMargin = 2;
|
||||
connector.OrthogonalGlobalBoundsMargin = 5;
|
||||
connector.ShapeViewModel.SinkMarker.PathStyle = source.ShapeViewModel.SinkMarker.PathStyle;
|
||||
connector.ShapeViewModel.SinkMarker.SizeStyle = source.ShapeViewModel.SinkMarker.SizeStyle;
|
||||
|
||||
|
||||
@@ -112,14 +112,13 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
}
|
||||
else
|
||||
{
|
||||
connector?.SetSourcePort(source.FirstConnector);
|
||||
connector?.SetSinkPort(sink.FirstConnector);
|
||||
connector.PathMode = drawMode.ToString();
|
||||
connector.RouterMode = routerMode.ToString();
|
||||
connector?.UpdateConnectionMode(source.FirstConnector, sink.FirstConnector, drawMode.ToString(), routerMode.ToString());
|
||||
}
|
||||
connector.ColorViewModel.LineColor = source.ColorViewModel.LineColor;
|
||||
connector.SmoothMargin = 20;
|
||||
connector.SmoothAutoSlope = 0.2;
|
||||
connector.OrthogonalShapeMargin = 2;
|
||||
connector.OrthogonalGlobalBoundsMargin = 5;
|
||||
connector.ShapeViewModel.SinkMarker.PathStyle = source.ShapeViewModel.SinkMarker.PathStyle;
|
||||
connector.ShapeViewModel.SinkMarker.SizeStyle = source.ShapeViewModel.SinkMarker.SizeStyle;
|
||||
|
||||
|
||||
@@ -84,14 +84,13 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
}
|
||||
else
|
||||
{
|
||||
connector?.SetSourcePort(source.FirstConnector);
|
||||
connector?.SetSinkPort(sink.FirstConnector);
|
||||
connector.PathMode = DrawMode.ConnectingLineSmooth.ToString();
|
||||
connector.RouterMode = RouterMode.RouterNormal.ToString();
|
||||
connector?.UpdateConnectionMode(source.FirstConnector, sink.FirstConnector, DrawMode.ConnectingLineSmooth.ToString(), RouterMode.RouterNormal.ToString());
|
||||
}
|
||||
connector.ColorViewModel.LineColor = source.ColorViewModel.LineColor;
|
||||
connector.SmoothMargin = 20;
|
||||
connector.SmoothAutoSlope = 0.2;
|
||||
connector.OrthogonalShapeMargin = 2;
|
||||
connector.OrthogonalGlobalBoundsMargin = 5;
|
||||
connector.ShapeViewModel.SinkMarker.PathStyle = source.ShapeViewModel.SinkMarker.PathStyle;
|
||||
connector.ShapeViewModel.SinkMarker.SizeStyle = source.ShapeViewModel.SinkMarker.SizeStyle;
|
||||
|
||||
|
||||
@@ -85,14 +85,14 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
}
|
||||
else
|
||||
{
|
||||
connector?.SetSourcePort(source.FirstConnector);
|
||||
connector?.SetSinkPort(sink.FirstConnector);
|
||||
connector.PathMode = DrawMode.ConnectingLineSmooth.ToString();
|
||||
connector.RouterMode = RouterMode.RouterNormal.ToString();
|
||||
connector?.UpdateConnectionMode(source.FirstConnector, sink.FirstConnector, DrawMode.ConnectingLineSmooth.ToString(), RouterMode.RouterNormal.ToString());
|
||||
}
|
||||
|
||||
connector.ColorViewModel.LineColor = source.ColorViewModel.LineColor;
|
||||
connector.SmoothMargin = 20;
|
||||
connector.SmoothAutoSlope = 0.2;
|
||||
connector.OrthogonalShapeMargin = 2;
|
||||
connector.OrthogonalGlobalBoundsMargin = 5;
|
||||
connector.ShapeViewModel.SinkMarker.PathStyle = source.ShapeViewModel.SinkMarker.PathStyle;
|
||||
connector.ShapeViewModel.SinkMarker.SizeStyle = source.ShapeViewModel.SinkMarker.SizeStyle;
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
LineColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
FontColor = Colors.White,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
@@ -52,8 +53,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Color.FromRgb(0xee, 0xf3, 0xf6),
|
||||
LineColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
},
|
||||
@@ -61,8 +63,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
}
|
||||
@@ -78,27 +81,30 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
LineColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
FontColor = Colors.White,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Color.FromRgb(0xee, 0xf3, 0xf6),
|
||||
LineColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0x73, 0xa1, 0xbf),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -112,6 +118,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
LineColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
FontColor = Colors.White,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
@@ -120,8 +127,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Color.FromRgb(0xee, 0xf6, 0xee),
|
||||
LineColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
},
|
||||
@@ -129,8 +137,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
}
|
||||
@@ -146,27 +155,30 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
LineColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
FontColor = Colors.White,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Color.FromRgb(0xee, 0xf6, 0xee),
|
||||
LineColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0x73, 0xbf, 0x76),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -180,6 +192,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
FontColor = Colors.White,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
@@ -188,8 +201,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Color.FromRgb(0xf6, 0xee, 0xf2),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
},
|
||||
@@ -197,8 +211,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
}
|
||||
@@ -214,27 +229,30 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
FontColor = Colors.White,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Color.FromRgb(0xf6, 0xee, 0xf2),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x94),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -248,6 +266,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
LineColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
FontColor = Colors.White,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
@@ -256,8 +275,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Color.FromRgb(0xef, 0xee, 0xf6),
|
||||
LineColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
},
|
||||
@@ -265,8 +285,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
}
|
||||
@@ -282,27 +303,30 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
LineColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
FontColor = Colors.White,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Color.FromRgb(0xef, 0xee, 0xf6),
|
||||
LineColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0x7b, 0x73, 0xbf),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -316,6 +340,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
FontColor = Colors.White,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
@@ -324,8 +349,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Color.FromRgb(0xf6, 0xee, 0xee),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
},
|
||||
@@ -333,8 +359,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
}
|
||||
@@ -350,27 +377,30 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
FontColor = Colors.White,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Color.FromRgb(0xf6, 0xee, 0xee),
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0xbf, 0x73, 0x73),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -384,6 +414,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
LineColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
FontColor = Colors.White,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
@@ -392,8 +423,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Color.FromRgb(0xf6, 0xf2, 0xee),
|
||||
LineColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
},
|
||||
@@ -401,8 +433,9 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
}
|
||||
@@ -418,27 +451,30 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
LineColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
FontColor = Colors.White,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Color.FromRgb(0xf6, 0xf2, 0xee),
|
||||
LineColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
FontColor = Colors.White,
|
||||
FillColor = Colors.Transparent,
|
||||
LineColor = Color.FromRgb(0xbf, 0x93, 0x73),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -452,6 +488,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xe9, 0xdf, 0x98),
|
||||
LineColor = Color.FromRgb(0xe9, 0xdf, 0x98),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
@@ -460,7 +497,8 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xe9, 0xdf, 0x98),
|
||||
FillColor = Color.FromRgb(0xa4, 0xc5, 0xc0),
|
||||
LineColor = Color.FromRgb(0xa4, 0xc5, 0xc0),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
@@ -469,7 +507,8 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xe9, 0xdf, 0x98),
|
||||
FillColor = Colors.White,
|
||||
LineColor = Colors.White,
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
@@ -486,27 +525,30 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
ItemWidth = 110,
|
||||
ItemHeight = 40,
|
||||
FillColor = Color.FromRgb(0xe9, 0xdf, 0x98),
|
||||
LineColor = Color.FromRgb(0xe9, 0xdf, 0x98),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(50, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel2 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xe9, 0xdf, 0x98),
|
||||
FillColor = Color.FromRgb(0xa4, 0xc5, 0xc0),
|
||||
LineColor = Color.FromRgb(0xa4, 0xc5, 0xc0),
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
},
|
||||
MindThemeLevel3 = new MindTheme()
|
||||
{
|
||||
ItemWidth = 80,
|
||||
ItemHeight = 25,
|
||||
FillColor = Color.FromRgb(0xe9, 0xdf, 0x98),
|
||||
FillColor = Colors.White,
|
||||
LineColor = Colors.White,
|
||||
FontColor = Colors.Black,
|
||||
FontSize = 15,
|
||||
Spacing = new SizeBase(15, 15),
|
||||
Spacing = new SizeBase(10, 10),
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -520,7 +562,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
mindNode.ItemWidth = mindThemeModel.MindThemeLevel1.ItemWidth;
|
||||
mindNode.ItemHeight = mindThemeModel.MindThemeLevel1.ItemHeight;
|
||||
mindNode.ColorViewModel.FillColor.Color = mindThemeModel.MindThemeLevel1.FillColor;
|
||||
mindNode.ColorViewModel.LineColor.Color = mindThemeModel.MindThemeLevel1.FillColor;
|
||||
mindNode.ColorViewModel.LineColor.Color = mindThemeModel.MindThemeLevel1.LineColor;
|
||||
mindNode.FontViewModel.FontColor = mindThemeModel.MindThemeLevel1.FontColor;
|
||||
mindNode.FontViewModel.FontSize = mindThemeModel.MindThemeLevel1.FontSize;
|
||||
mindNode.Spacing = mindThemeModel.MindThemeLevel1.Spacing;
|
||||
@@ -531,7 +573,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
mindNode.ItemWidth = mindThemeModel.MindThemeLevel2.ItemWidth;
|
||||
mindNode.ItemHeight = mindThemeModel.MindThemeLevel2.ItemHeight;
|
||||
mindNode.ColorViewModel.FillColor.Color = mindThemeModel.MindThemeLevel2.FillColor;
|
||||
mindNode.ColorViewModel.LineColor.Color = mindThemeModel.MindThemeLevel2.FillColor;
|
||||
mindNode.ColorViewModel.LineColor.Color = mindThemeModel.MindThemeLevel2.LineColor;
|
||||
mindNode.FontViewModel.FontColor = mindThemeModel.MindThemeLevel2.FontColor;
|
||||
mindNode.FontViewModel.FontSize = mindThemeModel.MindThemeLevel2.FontSize;
|
||||
mindNode.Spacing = mindThemeModel.MindThemeLevel2.Spacing;
|
||||
@@ -542,7 +584,7 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
mindNode.ItemWidth = mindThemeModel.MindThemeLevel3.ItemWidth;
|
||||
mindNode.ItemHeight = mindThemeModel.MindThemeLevel3.ItemHeight;
|
||||
mindNode.ColorViewModel.FillColor.Color = mindThemeModel.MindThemeLevel3.FillColor;
|
||||
mindNode.ColorViewModel.LineColor.Color = mindThemeModel.MindThemeLevel3.FillColor;
|
||||
mindNode.ColorViewModel.LineColor.Color = mindThemeModel.MindThemeLevel3.LineColor;
|
||||
mindNode.FontViewModel.FontColor = mindThemeModel.MindThemeLevel3.FontColor;
|
||||
mindNode.FontViewModel.FontSize = mindThemeModel.MindThemeLevel3.FontSize;
|
||||
mindNode.Spacing = mindThemeModel.MindThemeLevel3.Spacing;
|
||||
@@ -566,6 +608,10 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public Color LineColor
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public Color FontColor
|
||||
{
|
||||
get; set;
|
||||
|
||||
@@ -86,14 +86,13 @@ namespace AIStudio.Wpf.Mind.Helpers
|
||||
}
|
||||
else
|
||||
{
|
||||
connector?.SetSourcePort(source.FirstConnector);
|
||||
connector?.SetSinkPort(sink.FirstConnector);
|
||||
connector.PathMode = DrawMode.ConnectingLineStraight.ToString();
|
||||
connector.RouterMode = RouterMode.RouterOrthogonal.ToString();
|
||||
connector?.UpdateConnectionMode(source.FirstConnector, sink.FirstConnector, DrawMode.ConnectingLineStraight.ToString(), RouterMode.RouterOrthogonal.ToString());
|
||||
}
|
||||
connector.ColorViewModel.LineColor = source.ColorViewModel.LineColor;
|
||||
connector.SmoothMargin = 20;
|
||||
connector.SmoothAutoSlope = 0.2;
|
||||
connector.OrthogonalShapeMargin = 2;
|
||||
connector.OrthogonalGlobalBoundsMargin = 5;
|
||||
connector.ShapeViewModel.SinkMarker.PathStyle = source.ShapeViewModel.SinkMarker.PathStyle;
|
||||
connector.ShapeViewModel.SinkMarker.SizeStyle = sink.ShapeViewModel.SinkMarker.SizeStyle;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<Setter Property="Foreground" Value="Black" />
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Padding" Value="3" />
|
||||
<Setter Property="Padding" Value="5" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
||||
|
||||
@@ -45,6 +45,14 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
return Items.OfType<MindNode>().FirstOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
public MindNode MindSelectedItem
|
||||
{
|
||||
get
|
||||
{
|
||||
return SelectedItem as MindNode;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 命令
|
||||
@@ -280,7 +288,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
{
|
||||
return this._expand2LevelCommand ?? (this._expand2LevelCommand = new SimpleCommand(ExecuteEnable, this.ExecutedExpand2LevelCommand));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public MindDiagramViewModel()
|
||||
@@ -294,7 +302,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
{
|
||||
InitRootItem();
|
||||
}
|
||||
GetChildren(RootItem);
|
||||
ResetChildren(RootItem);
|
||||
RootItem?.LayoutUpdated();
|
||||
base.Init();
|
||||
}
|
||||
@@ -325,7 +333,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
return (SelectedItem as MindNode).NodeLevel != 0;
|
||||
}
|
||||
|
||||
#region 操作
|
||||
#region 添加删除
|
||||
public void ExecuteAddChildCommand(object parameter)
|
||||
{
|
||||
List<MindNode> items = new List<MindNode>();
|
||||
@@ -578,15 +586,9 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
else
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected override void ExecuteCenterMoveCommand(object parameter)
|
||||
{
|
||||
RootItem.Left = (PageSize.Width - RootItem.ItemWidth) / 2;
|
||||
RootItem.Top = (PageSize.Height - RootItem.ItemHeight) / 2;
|
||||
RootItem?.LayoutUpdated();
|
||||
FitViewModel = new FitViewModel() { BoundingRect = RootItem.GetBounds() };
|
||||
}
|
||||
|
||||
#region 附加信息
|
||||
private void ExecuteAddLinkCommand(object obj)
|
||||
{
|
||||
if (obj is object[] array && array.Length == 2)
|
||||
@@ -687,7 +689,9 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
p.Tags.Remove(obj?.ToString());
|
||||
});
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 改变模式,主题
|
||||
private void ExecutedChangeMindTypeCommand(object obj)
|
||||
{
|
||||
if (obj is MindType mindType)
|
||||
@@ -748,7 +752,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private MindNode FormatNode;
|
||||
private MindNode _formatNode;
|
||||
private void ExecutedCopyThemeCommand(object parameter)
|
||||
{
|
||||
if (parameter is MindNode node)
|
||||
@@ -762,13 +766,13 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
|
||||
if (node != null)
|
||||
{
|
||||
FormatNode = node;
|
||||
_formatNode = node;
|
||||
}
|
||||
}
|
||||
|
||||
private void ExecutedPasteThemeCommand(object parameter)
|
||||
{
|
||||
if (FormatNode != null)
|
||||
if (_formatNode != null)
|
||||
{
|
||||
List<MindNode> nodes = new List<MindNode>();
|
||||
if (parameter is MindNode node1)
|
||||
@@ -790,8 +794,8 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
() => {
|
||||
foreach (var node in nodes)
|
||||
{
|
||||
CopyHelper.CopyPropertyValue(FormatNode.ColorViewModel, node.ColorViewModel);
|
||||
CopyHelper.CopyPropertyValue(FormatNode.FontViewModel, node.FontViewModel);
|
||||
CopyHelper.CopyPropertyValue(_formatNode.ColorViewModel, node.ColorViewModel);
|
||||
CopyHelper.CopyPropertyValue(_formatNode.FontViewModel, node.FontViewModel);
|
||||
}
|
||||
RootItem.LayoutUpdated();
|
||||
},
|
||||
@@ -803,6 +807,16 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 操作
|
||||
protected override void ExecuteCenterMoveCommand(object parameter)
|
||||
{
|
||||
RootItem.Left = (PageSize.Width - RootItem.ItemWidth) / 2;
|
||||
RootItem.Top = (PageSize.Height - RootItem.ItemHeight) / 2;
|
||||
RootItem?.LayoutUpdated();
|
||||
FitViewModel = new FitViewModel() { BoundingRect = RootItem.GetBounds() };
|
||||
}
|
||||
|
||||
private void ExecutedExpand2LevelCommand(object obj)
|
||||
{
|
||||
@@ -823,8 +837,84 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
item.IsExpanded = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void ExecuteSelectBrotherCommand(object parameter)
|
||||
{
|
||||
if (parameter is MindNode node)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
node = SelectedItem as MindNode;
|
||||
}
|
||||
|
||||
if (node != null && node.ParentNode != null)
|
||||
{
|
||||
foreach (var child in node.ParentNode.Children)
|
||||
{
|
||||
child.IsSelected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void ExecuteSelectPearCommand(object parameter)
|
||||
{
|
||||
if (parameter is MindNode node)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
node = SelectedItem as MindNode;
|
||||
}
|
||||
|
||||
if (node != null)
|
||||
{
|
||||
foreach (var item in Items.OfType<MindNode>().Where(p => p.NodeLevel == node.NodeLevel))
|
||||
{
|
||||
item.IsSelected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void ExecuteSelectRouteCommand(object parameter)
|
||||
{
|
||||
if (parameter is MindNode node)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
node = SelectedItem as MindNode;
|
||||
}
|
||||
|
||||
if (node != null)
|
||||
{
|
||||
GetParent(node).ForEach(p => p.IsSelected = true);
|
||||
}
|
||||
}
|
||||
|
||||
protected void ExecuteSelectChildCommand(object parameter)
|
||||
{
|
||||
if (parameter is MindNode node)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
node = SelectedItem as MindNode;
|
||||
}
|
||||
|
||||
if (node != null)
|
||||
{
|
||||
GetChildren(node).ForEach(p => p.IsSelected = true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 初始化
|
||||
protected override void ExecutedResetLayoutCommand(object obj)
|
||||
{
|
||||
foreach (var item in Items.OfType<MindNode>())
|
||||
@@ -834,7 +924,7 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
RootItem?.LayoutUpdated();
|
||||
}
|
||||
|
||||
private void GetChildren(MindNode parent)
|
||||
private void ResetChildren(MindNode parent)
|
||||
{
|
||||
if (parent == null)
|
||||
return;
|
||||
@@ -845,9 +935,34 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
item.Parent = parent;
|
||||
item.InitLayout(false);
|
||||
item.InitConnectLayout();
|
||||
GetChildren(item);
|
||||
ResetChildren(item);
|
||||
}
|
||||
}
|
||||
|
||||
private List<MindNode> GetParent(MindNode node)
|
||||
{
|
||||
List<MindNode> mindnode = new List<MindNode>();
|
||||
while (node.ParentNode != null)
|
||||
{
|
||||
mindnode.Add(node.ParentNode);
|
||||
node = node.ParentNode;
|
||||
}
|
||||
return mindnode;
|
||||
}
|
||||
|
||||
private List<MindNode> GetChildren(MindNode parent)
|
||||
{
|
||||
List<MindNode> mindnode = new List<MindNode>();
|
||||
if (parent.Children != null)
|
||||
{
|
||||
foreach (var child in parent.Children)
|
||||
{
|
||||
mindnode.Add(child);
|
||||
mindnode.AddRange(GetChildren(child));
|
||||
}
|
||||
}
|
||||
return mindnode;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,8 @@ namespace AIStudio.Wpf.Mind.ViewModels
|
||||
|
||||
IsInnerConnector = true;
|
||||
MindLayout.Appearance(this, MindThemeModel, initAppearance);
|
||||
|
||||
|
||||
var xx = GlobalType.AllTypes;
|
||||
this.PropertyChanged -= this.Item_PropertyChanged;
|
||||
this.PropertyChanged += this.Item_PropertyChanged;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project>
|
||||
<!-- Project properties -->
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp3.1;net5.0-windows</TargetFrameworks>
|
||||
<TargetFrameworks>net461;netcoreapp3.1;net5.0-windows</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
|
||||
Reference in New Issue
Block a user