mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
block
This commit is contained in:
@@ -40,7 +40,6 @@
|
||||
</ControlTemplate>
|
||||
</ResourceDictionary>
|
||||
</ItemsControl.Resources>
|
||||
|
||||
<ItemsControl.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Template">
|
||||
|
||||
@@ -277,9 +277,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
protected void DesignerCanvas_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Mediator.Instance.Register(this);
|
||||
//Mediator.Instance.Register(this);
|
||||
this.Focus();
|
||||
int xx = this.GetHashCode();
|
||||
_service.PropertyChanged += _service_PropertyChanged;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ using System.Windows;
|
||||
|
||||
namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class ToolBoxData
|
||||
public class ToolBoxData : BindableBase
|
||||
{
|
||||
public string Text
|
||||
public virtual string Text
|
||||
{
|
||||
get; protected set;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,10 @@ namespace AIStudio.Wpf.DiagramDesigner.Services
|
||||
/// </summary>
|
||||
public interface IServiceProvider
|
||||
{
|
||||
IUIVisualizerService VisualizerService { get; }
|
||||
IUIVisualizerService VisualizerService
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
IMessageBoxService MessageBoxService { get; }
|
||||
//IDatabaseAccessService DatabaseAccessService { get; }
|
||||
}
|
||||
@@ -25,6 +28,10 @@ namespace AIStudio.Wpf.DiagramDesigner.Services
|
||||
public IUIVisualizerService VisualizerService
|
||||
{
|
||||
get { return visualizerService; }
|
||||
set
|
||||
{
|
||||
visualizerService = value;
|
||||
}
|
||||
}
|
||||
|
||||
public IMessageBoxService MessageBoxService
|
||||
|
||||
@@ -502,6 +502,9 @@
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter TargetName="PART_ResizeDecorator" Property="Visibility" Value="Visible"/>
|
||||
</MultiDataTrigger>
|
||||
<DataTrigger Binding="{Binding ShowResize}" Value="false">
|
||||
<Setter TargetName="PART_ResizeDecorator" Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Connectors.Count}" Value="0">
|
||||
<Setter TargetName="PART_ConnectorDecorator" Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
|
||||
@@ -330,11 +330,6 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
public bool ShowArrow { get; set; } = true;
|
||||
|
||||
public bool ShowResized
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
private bool alwayForResized;
|
||||
public bool AlwayForResized
|
||||
{
|
||||
|
||||
@@ -63,10 +63,17 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
if (oldnext != null && first == true)
|
||||
{
|
||||
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
|
||||
await Task.Delay(10);
|
||||
GetLast().AddNext(oldnext, false);
|
||||
}));
|
||||
//if (this.GetItemHeight() > 0)
|
||||
//{
|
||||
// GetLast().AddNext(oldnext, false);
|
||||
//}
|
||||
//else
|
||||
{
|
||||
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
|
||||
await Task.Delay(10);
|
||||
GetLast().AddNext(oldnext, false);
|
||||
}));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -162,10 +169,17 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
child.RemoveFromSelection();
|
||||
this.GetRootContainItem.AddToSelection(true, true);
|
||||
|
||||
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
|
||||
await Task.Delay(10);
|
||||
AlignNext(this.Next);
|
||||
}));
|
||||
//if (this.GetItemHeight() > 0)
|
||||
//{
|
||||
// AlignNext(this.Next);
|
||||
//}
|
||||
//else
|
||||
{
|
||||
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
|
||||
await Task.Delay(10);
|
||||
AlignNext(this.Next);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void RemoveChild(BlockDesignerItemViewModel child, BlockItemsContainerInfo container)
|
||||
@@ -180,10 +194,17 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
this.RemoveFromSelection();
|
||||
child.AddToSelection(true, true);
|
||||
|
||||
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
|
||||
await Task.Delay(10);
|
||||
AlignNext(this.Next);
|
||||
}));
|
||||
//if (this.GetItemHeight() > 0)
|
||||
//{
|
||||
// AlignNext(this.Next);
|
||||
//}
|
||||
//else
|
||||
{
|
||||
System.Windows.Application.Current?.Dispatcher.BeginInvoke(new Action(async () => {
|
||||
await Task.Delay(10);
|
||||
AlignNext(this.Next);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
public string Flag
|
||||
|
||||
Reference in New Issue
Block a user