mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-31 09:43:46 +00:00
Added missing methods from earlier commit
This commit is contained in:
parent
e3a0323383
commit
d27ce2bdf9
@ -75,6 +75,15 @@ namespace Artemis.VisualScripting.Model
|
|||||||
{
|
{
|
||||||
InputPin<T> pin = new(this, name);
|
InputPin<T> pin = new(this, name);
|
||||||
_pins.Add(pin);
|
_pins.Add(pin);
|
||||||
|
OnPropertyChanged(nameof(Pins));
|
||||||
|
return pin;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected InputPin CreateInputPin(Type type, string name = "")
|
||||||
|
{
|
||||||
|
InputPin pin = new(this, type, name);
|
||||||
|
_pins.Add(pin);
|
||||||
|
OnPropertyChanged(nameof(Pins));
|
||||||
return pin;
|
return pin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,13 +91,34 @@ namespace Artemis.VisualScripting.Model
|
|||||||
{
|
{
|
||||||
OutputPin<T> pin = new(this, name);
|
OutputPin<T> pin = new(this, name);
|
||||||
_pins.Add(pin);
|
_pins.Add(pin);
|
||||||
|
OnPropertyChanged(nameof(Pins));
|
||||||
return pin;
|
return pin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected OutputPin CreateOutputPin(Type type, string name = "")
|
||||||
|
{
|
||||||
|
OutputPin pin = new(this, type, name);
|
||||||
|
_pins.Add(pin);
|
||||||
|
OnPropertyChanged(nameof(Pins));
|
||||||
|
return pin;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected bool RemovePin(Pin pin)
|
||||||
|
{
|
||||||
|
bool isRemoved = _pins.Remove(pin);
|
||||||
|
if (isRemoved)
|
||||||
|
{
|
||||||
|
pin.DisconnectAll();
|
||||||
|
OnPropertyChanged(nameof(Pins));
|
||||||
|
}
|
||||||
|
return isRemoved;
|
||||||
|
}
|
||||||
|
|
||||||
protected InputPinCollection<T> CreateInputPinCollection<T>(string name = "", int initialCount = 1)
|
protected InputPinCollection<T> CreateInputPinCollection<T>(string name = "", int initialCount = 1)
|
||||||
{
|
{
|
||||||
InputPinCollection<T> pin = new(this, name, initialCount);
|
InputPinCollection<T> pin = new(this, name, initialCount);
|
||||||
_pinCollections.Add(pin);
|
_pinCollections.Add(pin);
|
||||||
|
OnPropertyChanged(nameof(PinCollections));
|
||||||
return pin;
|
return pin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,6 +126,7 @@ namespace Artemis.VisualScripting.Model
|
|||||||
{
|
{
|
||||||
OutputPinCollection<T> pin = new(this, name, initialCount);
|
OutputPinCollection<T> pin = new(this, name, initialCount);
|
||||||
_pinCollections.Add(pin);
|
_pinCollections.Add(pin);
|
||||||
|
OnPropertyChanged(nameof(PinCollections));
|
||||||
return pin;
|
return pin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user