把底层再分割一下

This commit is contained in:
艾竹
2023-01-24 09:02:40 +08:00
parent 2b4662ed37
commit f39a57b3e5
26 changed files with 283 additions and 325 deletions

View File

@@ -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)
// {
}
}
// }
//}
}
}