mind基本完成,准备写文档

This commit is contained in:
艾竹
2023-03-19 23:26:14 +08:00
parent c2f4d3c706
commit 07ac28965e
28 changed files with 1363 additions and 211 deletions

View File

@@ -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>