Revert "block 可以拖拽到内部,还有少量问题待解决"

This reverts commit 538898d238.
This commit is contained in:
艾竹
2023-06-11 23:57:59 +08:00
parent 538898d238
commit fcd7beb193
73 changed files with 242 additions and 7132 deletions

View File

@@ -1,68 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:viewmodel="clr-namespace:AIStudio.Wpf.Block.ViewModels"
xmlns:model="clr-namespace:AIStudio.Wpf.Block.Models"
xmlns:controls="clr-namespace:AIStudio.Wpf.Block.Controls"
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Block;component/Themes/Brushes.xaml" />
<ResourceDictionary Source="pack://application:,,,/AIStudio.Wpf.Block;component/Themes/Geometries.xaml" />
</ResourceDictionary.MergedDictionaries>
<dd:BoolVisibilityConverter x:Key="BoolVisibilityConverter"/>
<dd:DoubleToThickness x:Key="DoubleToThickness"/>
<dd:ColorBrushConverter x:Key="ColorBrushConverter"/>
<DataTemplate DataType="{x:Type viewmodel:StartBlockItemViewModel}">
<controls:StartBlockBorder Background="{StaticResource EventModulesBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource EventModulesBorderBrush}" >
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="当" Foreground="{StaticResource EventModulesForgroundBrush}" VerticalAlignment="Center" IsHitTestVisible="False"/>
<Path Width="13" Height="16" Margin="5" Stretch="Fill" Fill="{StaticResource FlagBrush}" Data="{StaticResource FlagGeometry}" VerticalAlignment="Center" IsHitTestVisible="False"/>
<TextBlock Text="被点击" Foreground="{StaticResource EventModulesForgroundBrush}" VerticalAlignment="Center" IsHitTestVisible="False"/>
</StackPanel>
</controls:StartBlockBorder>
</DataTemplate>
<DataTemplate DataType="{x:Type viewmodel:KeyboardPressBlockItemViewModel}">
<controls:StartBlockBorder Background="{StaticResource EventModulesBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource EventModulesBorderBrush}" >
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" IsHitTestVisible="False">
<TextBlock Text="当按下" Foreground="{StaticResource EventModulesForgroundBrush}" VerticalAlignment="Center" IsHitTestVisible="False"/>
<ComboBox ItemsSource="{Binding KeyItemsSource}" SelectedValue="{Binding Key}" Background="Transparent" VerticalAlignment="Center" />
</StackPanel>
</controls:StartBlockBorder>
</DataTemplate>
<DataTemplate DataType="{x:Type viewmodel:WaitTimeBlockItemViewModel}">
<controls:NextBlockBorder Background="{StaticResource ControlModulesBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource ControlModulesBorderBrush}" >
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="等待" Foreground="{StaticResource ControlModulesForgroundBrush}" VerticalAlignment="Center" IsHitTestVisible="False"/>
<controls:VariableBlockBorder Background="{StaticResource ControlModulesForgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource ControlModulesBorderBrush}" Minwidth="28" Minheight="22" Margin="5,0">
<ContentControl Content="{Binding Second}" />
</controls:VariableBlockBorder>
<TextBlock Text="秒" Foreground="{StaticResource ControlModulesForgroundBrush}" VerticalAlignment="Center" IsHitTestVisible="False"/>
</StackPanel>
</controls:NextBlockBorder>
</DataTemplate>
<DataTemplate DataType="{x:Type model:ConstParameter}">
<Border>
<TextBox BorderThickness="0" TextAlignment="Center" VerticalAlignment="Center" Background="Transparent"/>
</Border>
</DataTemplate>
<DataTemplate DataType="{x:Type viewmodel:AddBlockItemViewModel}">
<Grid>
<controls:VariableBlockBorder Background="{StaticResource ArithmeticModulesBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource ArithmeticModulesBorderBrush}" >
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<controls:VariableBlockBorder Background="{StaticResource ArithmeticModulesForgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource ArithmeticModulesBorderBrush}" Minwidth="28" Minheight="22" Margin="5,0">
<ContentControl Content="{Binding Add1}" />
</controls:VariableBlockBorder>
<TextBlock Text="+" Foreground="{StaticResource ControlModulesForgroundBrush}" FontSize="12" VerticalAlignment="Center" IsHitTestVisible="False"/>
<controls:VariableBlockBorder Background="{StaticResource ArithmeticModulesForgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource ArithmeticModulesBorderBrush}" Minwidth="28" Minheight="22" Margin="5,0">
<ContentControl Content="{Binding Add2}" />
</controls:VariableBlockBorder>
</StackPanel>
</controls:VariableBlockBorder>
</Grid>
</DataTemplate>
</ResourceDictionary>

View File

@@ -1,30 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:o="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options">
<Color x:Key="EventModulesBackgroundColor">#ffbf00</Color>
<Color x:Key="EventModulesBorderColor">#cc9900</Color>
<Color x:Key="EventModulesForgroundColor">White</Color>
<Color x:Key="ControlModulesBackgroundColor">#ffab19</Color>
<Color x:Key="ControlModulesBorderColor">#cf8b17</Color>
<Color x:Key="ControlModulesForgroundColor">White</Color>
<Color x:Key="ArithmeticModulesBackgroundColor">#59c059</Color>
<Color x:Key="ArithmeticModulesBorderColor">#389438</Color>
<Color x:Key="ArithmeticModulesForgroundColor">White</Color>
<Color x:Key="FlagColor">#4cbf56</Color>
<SolidColorBrush x:Key="EventModulesBackgroundBrush" Color="{StaticResource EventModulesBackgroundColor}" o:Freeze="True" />
<SolidColorBrush x:Key="EventModulesBorderBrush" Color="{StaticResource EventModulesBorderColor}" o:Freeze="True" />
<SolidColorBrush x:Key="EventModulesForgroundBrush" Color="{StaticResource EventModulesForgroundColor}" o:Freeze="True" />
<SolidColorBrush x:Key="ControlModulesBackgroundBrush" Color="{StaticResource ControlModulesBackgroundColor}" o:Freeze="True" />
<SolidColorBrush x:Key="ControlModulesBorderBrush" Color="{StaticResource ControlModulesBorderColor}" o:Freeze="True" />
<SolidColorBrush x:Key="ControlModulesForgroundBrush" Color="{StaticResource ControlModulesForgroundColor}" o:Freeze="True" />
<SolidColorBrush x:Key="ArithmeticModulesBackgroundBrush" Color="{StaticResource ArithmeticModulesBackgroundColor}" o:Freeze="True" />
<SolidColorBrush x:Key="ArithmeticModulesBorderBrush" Color="{StaticResource ArithmeticModulesBorderColor}" o:Freeze="True" />
<SolidColorBrush x:Key="ArithmeticModulesForgroundBrush" Color="{StaticResource ArithmeticModulesForgroundColor}" o:Freeze="True" />
<SolidColorBrush x:Key="FlagBrush" Color="{StaticResource FlagColor}" o:Freeze="True" />
</ResourceDictionary>

View File

@@ -1,6 +0,0 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:o="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options">
<Geometry o:Freeze="True" x:Key="FlagGeometry">M152.474 62.225c-26.856 0-56.286 21.748-56.286 48.663v802.451c0 26.798 28.773 48.653 55.579 48.653 26.789 0 56.286-21.857 56.286-48.663v-802.434c0-26.914-28.78-48.663-55.579-48.663zM730.146 129.011c-157.836 0-157.836-64.694-315.663-64.694-91.108 0-161.46 42.504-161.46 42.504l-0.658 484.313s71.010-42.446 162.119-42.446c157.827 0 157.827 64.694 315.663 64.694 98.74 0 197.923-51.845 197.923-51.845v-484.264s-99.183 51.737-197.923 51.737z</Geometry>
</ResourceDictionary>