mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-05 16:56:34 +08:00
控件重名冲突
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
<Setter Property="ToolBox">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Control">
|
||||
<controls:ToolBoxControl />
|
||||
<controls:FlowchartToolBoxControl />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
@@ -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:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
@@ -16,14 +16,14 @@ using AIStudio.Wpf.Flowchart.ViewModels;
|
||||
namespace AIStudio.Wpf.Flowchart.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ToolBoxControl.xaml
|
||||
/// Interaction logic for FlowchartToolBoxControl.xaml
|
||||
/// </summary>
|
||||
public partial class ToolBoxControl : UserControl
|
||||
public partial class FlowchartToolBoxControl : UserControl
|
||||
{
|
||||
public ToolBoxControl()
|
||||
public FlowchartToolBoxControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = new ToolBoxViewModel();
|
||||
this.DataContext = new FlowchartToolBoxViewModel();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,11 +11,11 @@ using AIStudio.Wpf.Flowchart.ViewModels;
|
||||
|
||||
namespace AIStudio.Wpf.Flowchart.ViewModels
|
||||
{
|
||||
public class ToolBoxViewModel
|
||||
public class FlowchartToolBoxViewModel
|
||||
{
|
||||
private List<ToolBoxData> toolBoxItems = new List<ToolBoxData>();
|
||||
|
||||
public ToolBoxViewModel()
|
||||
public FlowchartToolBoxViewModel()
|
||||
{
|
||||
var screenScale = ScreenHelper.ResetScreenScale();
|
||||
toolBoxItems.Add(new FlowchartToolBoxData(NodeKinds.Start, typeof(StartFlowNode), 80, 60, new Size(100 / screenScale, 80/ screenScale)));
|
||||
@@ -176,7 +176,7 @@
|
||||
<Setter Property="ToolBox">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Control">
|
||||
<controls:ToolBoxControl />
|
||||
<controls:MindToolBoxControl />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
@@ -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:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
@@ -14,11 +14,11 @@ using System.Windows.Shapes;
|
||||
namespace AIStudio.Wpf.Mind.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// ToolBoxControl.xaml 的交互逻辑
|
||||
/// MindToolBoxControl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ToolBoxControl : UserControl
|
||||
public partial class MindToolBoxControl : UserControl
|
||||
{
|
||||
public ToolBoxControl()
|
||||
public MindToolBoxControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
3
Extensions/AIStudio.Wpf.SFC/.filenesting.json
Normal file
3
Extensions/AIStudio.Wpf.SFC/.filenesting.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"help":"https://go.microsoft.com/fwlink/?linkid=866610"
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user