控件重名冲突

This commit is contained in:
艾竹
2023-04-18 22:38:20 +08:00
parent 033bebb6bc
commit 451df2d5de
16 changed files with 20 additions and 86 deletions

View File

@@ -31,8 +31,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AIStudio.Wpf.Mind", "Extens
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AIStudio.Wpf.DiagramDesigner.Serializable", "AIStudio.Wpf.DiagramDesigner.Serializable\AIStudio.Wpf.DiagramDesigner.Serializable.csproj", "{439D0631-D9C2-4D36-BFCE-80DFCCABE9E7}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AIStudio.Wpf.DiagramDesigner.Serializable", "AIStudio.Wpf.DiagramDesigner.Serializable\AIStudio.Wpf.DiagramDesigner.Serializable.csproj", "{439D0631-D9C2-4D36-BFCE-80DFCCABE9E7}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AIStudio.Wpf.Script", "Extensions\AIStudio.Wpf.Script\AIStudio.Wpf.Script.csproj", "{63C1101D-7F7C-41B0-AE78-F30DC5CEA810}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -75,10 +73,6 @@ Global
{439D0631-D9C2-4D36-BFCE-80DFCCABE9E7}.Debug|Any CPU.Build.0 = Debug|Any CPU {439D0631-D9C2-4D36-BFCE-80DFCCABE9E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{439D0631-D9C2-4D36-BFCE-80DFCCABE9E7}.Release|Any CPU.ActiveCfg = Release|Any CPU {439D0631-D9C2-4D36-BFCE-80DFCCABE9E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{439D0631-D9C2-4D36-BFCE-80DFCCABE9E7}.Release|Any CPU.Build.0 = Release|Any CPU {439D0631-D9C2-4D36-BFCE-80DFCCABE9E7}.Release|Any CPU.Build.0 = Release|Any CPU
{63C1101D-7F7C-41B0-AE78-F30DC5CEA810}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63C1101D-7F7C-41B0-AE78-F30DC5CEA810}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63C1101D-7F7C-41B0-AE78-F30DC5CEA810}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63C1101D-7F7C-41B0-AE78-F30DC5CEA810}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@@ -88,7 +82,6 @@ Global
{CC68D39D-7935-4079-9CEB-FC2FD498D511} = {4959F170-02FB-4B7F-8F53-93DAF22713F9} {CC68D39D-7935-4079-9CEB-FC2FD498D511} = {4959F170-02FB-4B7F-8F53-93DAF22713F9}
{2AB69067-277E-4EE0-9949-8326A145EEE4} = {4959F170-02FB-4B7F-8F53-93DAF22713F9} {2AB69067-277E-4EE0-9949-8326A145EEE4} = {4959F170-02FB-4B7F-8F53-93DAF22713F9}
{85C437B9-16D2-4076-ABCD-52029AC232FC} = {4959F170-02FB-4B7F-8F53-93DAF22713F9} {85C437B9-16D2-4076-ABCD-52029AC232FC} = {4959F170-02FB-4B7F-8F53-93DAF22713F9}
{63C1101D-7F7C-41B0-AE78-F30DC5CEA810} = {4959F170-02FB-4B7F-8F53-93DAF22713F9}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D30FC641-F06C-4E35-AEA5-48A9B6E59CE0} SolutionGuid = {D30FC641-F06C-4E35-AEA5-48A9B6E59CE0}

View File

@@ -131,7 +131,6 @@
<ProjectReference Include="..\Extensions\AIStudio.Wpf.Flowchart\AIStudio.Wpf.Flowchart.csproj" /> <ProjectReference Include="..\Extensions\AIStudio.Wpf.Flowchart\AIStudio.Wpf.Flowchart.csproj" />
<ProjectReference Include="..\Extensions\AIStudio.Wpf.Logical\AIStudio.Wpf.Logical.csproj" /> <ProjectReference Include="..\Extensions\AIStudio.Wpf.Logical\AIStudio.Wpf.Logical.csproj" />
<ProjectReference Include="..\Extensions\AIStudio.Wpf.Mind\AIStudio.Wpf.Mind.csproj" /> <ProjectReference Include="..\Extensions\AIStudio.Wpf.Mind\AIStudio.Wpf.Mind.csproj" />
<ProjectReference Include="..\Extensions\AIStudio.Wpf.Script\AIStudio.Wpf.Script.csproj" />
<ProjectReference Include="..\Extensions\AIStudio.Wpf.SFC\AIStudio.Wpf.SFC.csproj" /> <ProjectReference Include="..\Extensions\AIStudio.Wpf.SFC\AIStudio.Wpf.SFC.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -15,7 +15,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
Title = "Drag & Drop"; Title = "Drag & Drop";
Info = "A very simple drag & drop of flowchart demo."; Info = "A very simple drag & drop of flowchart demo.";
ToolBoxViewModel = new ToolBoxViewModel(); ToolBoxViewModel = new FlowchartToolBoxViewModel();
DiagramViewModel = new DiagramViewModel(); DiagramViewModel = new DiagramViewModel();
DiagramViewModel.ShowGrid = true; DiagramViewModel.ShowGrid = true;
DiagramViewModel.GridCellSize = new Size(100, 100); DiagramViewModel.GridCellSize = new Size(100, 100);
@@ -28,7 +28,7 @@ namespace AIStudio.Wpf.DiagramDesigner.Demo.ViewModels
DiagramViewModel.PropertyChanged += DiagramViewModel_PropertyChanged; DiagramViewModel.PropertyChanged += DiagramViewModel_PropertyChanged;
} }
public ToolBoxViewModel ToolBoxViewModel public FlowchartToolBoxViewModel ToolBoxViewModel
{ {
get; private set; get; private set;
} }

View File

@@ -14,7 +14,7 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- ToolBox Control --> <!-- ToolBox Control -->
<dd:ToolBoxControl Grid.Column="0" /> <dd:FlowchartToolBoxControl Grid.Column="0" />
<GridSplitter Grid.Column="1" <GridSplitter Grid.Column="1"
HorizontalAlignment="Left" HorizontalAlignment="Left"

View File

@@ -8,7 +8,7 @@
<PackageIcon>A.png</PackageIcon> <PackageIcon>A.png</PackageIcon>
<PackageIconUrl /> <PackageIconUrl />
<NeutralLanguage /> <NeutralLanguage />
<Version>1.0.7</Version> <Version>1.0.8</Version>
<Description>一个Wpf的Diagram控件基础库</Description> <Description>一个Wpf的Diagram控件基础库</Description>
</PropertyGroup> </PropertyGroup>

View File

@@ -36,7 +36,7 @@
<Setter Property="ToolBox"> <Setter Property="ToolBox">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="Control"> <ControlTemplate TargetType="Control">
<controls:ToolBoxControl /> <controls:FlowchartToolBoxControl />
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>

View File

@@ -1,4 +1,4 @@
<UserControl x:Class="AIStudio.Wpf.Flowchart.Controls.ToolBoxControl" <UserControl x:Class="AIStudio.Wpf.Flowchart.Controls.FlowchartToolBoxControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

View File

@@ -16,14 +16,14 @@ using AIStudio.Wpf.Flowchart.ViewModels;
namespace AIStudio.Wpf.Flowchart.Controls namespace AIStudio.Wpf.Flowchart.Controls
{ {
/// <summary> /// <summary>
/// Interaction logic for ToolBoxControl.xaml /// Interaction logic for FlowchartToolBoxControl.xaml
/// </summary> /// </summary>
public partial class ToolBoxControl : UserControl public partial class FlowchartToolBoxControl : UserControl
{ {
public ToolBoxControl() public FlowchartToolBoxControl()
{ {
InitializeComponent(); InitializeComponent();
this.DataContext = new ToolBoxViewModel(); this.DataContext = new FlowchartToolBoxViewModel();
} }
} }
} }

View File

@@ -11,11 +11,11 @@ using AIStudio.Wpf.Flowchart.ViewModels;
namespace AIStudio.Wpf.Flowchart.ViewModels namespace AIStudio.Wpf.Flowchart.ViewModels
{ {
public class ToolBoxViewModel public class FlowchartToolBoxViewModel
{ {
private List<ToolBoxData> toolBoxItems = new List<ToolBoxData>(); private List<ToolBoxData> toolBoxItems = new List<ToolBoxData>();
public ToolBoxViewModel() public FlowchartToolBoxViewModel()
{ {
var screenScale = ScreenHelper.ResetScreenScale(); var screenScale = ScreenHelper.ResetScreenScale();
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Start, typeof(StartFlowNode), 80, 60, new Size(100 / screenScale, 80/ screenScale))); toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Start, typeof(StartFlowNode), 80, 60, new Size(100 / screenScale, 80/ screenScale)));

View File

@@ -176,7 +176,7 @@
<Setter Property="ToolBox"> <Setter Property="ToolBox">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="Control"> <ControlTemplate TargetType="Control">
<controls:ToolBoxControl /> <controls:MindToolBoxControl />
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>

View File

@@ -1,4 +1,4 @@
<UserControl x:Class="AIStudio.Wpf.Mind.Controls.ToolBoxControl" <UserControl x:Class="AIStudio.Wpf.Mind.Controls.MindToolBoxControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

View File

@@ -14,11 +14,11 @@ using System.Windows.Shapes;
namespace AIStudio.Wpf.Mind.Controls namespace AIStudio.Wpf.Mind.Controls
{ {
/// <summary> /// <summary>
/// ToolBoxControl.xaml 的交互逻辑 /// MindToolBoxControl.xaml 的交互逻辑
/// </summary> /// </summary>
public partial class ToolBoxControl : UserControl public partial class MindToolBoxControl : UserControl
{ {
public ToolBoxControl() public MindToolBoxControl()
{ {
InitializeComponent(); InitializeComponent();
} }

View File

@@ -0,0 +1,3 @@
{
"help":"https://go.microsoft.com/fwlink/?linkid=866610"
}

View File

@@ -1,27 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\AIStudio.Wpf.DiagramDesigner\AIStudio.Wpf.DiagramDesigner.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="AvalonEdit">
<Version>6.2.0.78</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0-windows'">
<PackageReference Include="AvalonEdit">
<Version>6.2.0.78</Version>
</PackageReference>
</ItemGroup>
</Project>

View File

@@ -1,18 +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.CSharpScript.ViewModels"
xmlns:dd="https://gitee.com/akwkevin/aistudio.-wpf.-diagram"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors">
<dd:BoolVisibilityConverter x:Key="BoolVisibilityConverter"/>
<dd:DoubleToThickness x:Key="DoubleToThickness"/>
<dd:ColorBrushConverter x:Key="ColorBrushConverter"/>
<DataTemplate DataType="{x:Type viewmodel:CSharpScriptViewModel}">
<Grid IsHitTestVisible="False">
<Rectangle StrokeThickness="1" Fill="{Binding ColorViewModel.FillColor,Converter={StaticResource ColorBrushConverter}}" Stroke="{Binding ColorViewModel.LineColor,Converter={StaticResource ColorBrushConverter}}" />
<TextBlock Text="C#" Foreground="{Binding FontViewModel.FontColor,Converter={StaticResource ColorBrushConverter}}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5"/>
</Grid>
</DataTemplate>
</ResourceDictionary>

View File

@@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AIStudio.Wpf.DiagramDesigner;
namespace AIStudio.Wpf.CSharpScript.ViewModels
{
public class CSharpScriptViewModel : LogicalGateItemViewModelBase
{
public CSharpScriptViewModel(LogicalType logicalType) : base(logicalType)
{
}
}
}