mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
把底层再分割一下
This commit is contained in:
@@ -14,8 +14,8 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
{
|
||||
public class GifImageItemViewModel : DesignerItemViewModelBase
|
||||
{
|
||||
private IDisposable propertyChangedSubscription;
|
||||
private IDisposable connectorsChangedSubscription;
|
||||
//private IDisposable propertyChangedSubscription;
|
||||
//private IDisposable connectorsChangedSubscription;
|
||||
|
||||
|
||||
public SimpleCommand AddItemCommand { get; private set; }
|
||||
@@ -54,7 +54,7 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
|
||||
ClearConnectors();
|
||||
//propertyChangedSubscription = WhenPropertyChanged.Where(o => o.ToString() == "Left" || o.ToString() == "Top" || o.ToString() == "ItemWidth" || o.ToString() == "ItemHeight").Subscribe(ChangeImageElement);
|
||||
connectorsChangedSubscription = WhenConnectorsChanged.Subscribe(OnConnectorsChanged);
|
||||
//connectorsChangedSubscription = WhenConnectorsChanged.Subscribe(OnConnectorsChanged);
|
||||
|
||||
BuildMenuOptions();
|
||||
}
|
||||
@@ -127,33 +127,33 @@ namespace AIStudio.Wpf.DiagramDesigner
|
||||
}
|
||||
}
|
||||
|
||||
private void OnConnectorsChanged(NotifyCollectionChangedEventArgs args)
|
||||
{
|
||||
if (args.Action == NotifyCollectionChangedAction.Add)
|
||||
{
|
||||
if (args.NewItems.Count > 0)
|
||||
{
|
||||
foreach (var item in args.NewItems)
|
||||
{
|
||||
//private void OnConnectorsChanged(NotifyCollectionChangedEventArgs args)
|
||||
//{
|
||||
// if (args.Action == NotifyCollectionChangedAction.Add)
|
||||
// {
|
||||
// if (args.NewItems.Count > 0)
|
||||
// {
|
||||
// foreach (var item in args.NewItems)
|
||||
// {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (args.Action == NotifyCollectionChangedAction.Remove)
|
||||
{
|
||||
if (args.OldItems.Count > 0)
|
||||
{
|
||||
foreach (var item in args.OldItems)
|
||||
{
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else if (args.Action == NotifyCollectionChangedAction.Remove)
|
||||
// {
|
||||
// if (args.OldItems.Count > 0)
|
||||
// {
|
||||
// foreach (var item in args.OldItems)
|
||||
// {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (args.Action == NotifyCollectionChangedAction.Reset)
|
||||
{
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else if (args.Action == NotifyCollectionChangedAction.Reset)
|
||||
// {
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user