refactoring3

This commit is contained in:
2026-02-26 17:09:39 +09:00
parent 0401be3d23
commit 28cd9b1582
22 changed files with 618 additions and 73 deletions

View File

@@ -74,6 +74,61 @@ namespace Simulator.Data
}
}
public void UnbindStandardComponent(ComponentBase component)
{
switch (component.componentType)
{
case ComponentType.Source:
if (_sourceProperty != null)
component.onComponentClicked -= _sourceProperty.SetPropertyWindow;
if (_progressPopupView != null)
component.onComponentClicked -= _progressPopupView.Show;
break;
case ComponentType.Sink:
if (_sinkProperty != null)
component.onComponentClicked -= _sinkProperty.SetPropertyWindow;
if (_progressPopupView != null)
component.onComponentClicked -= _progressPopupView.Show;
break;
case ComponentType.Processor:
if (_processorProperty != null)
component.onComponentClicked -= _processorProperty.SetPropertyWindow;
if (_progressPopupView != null)
component.onComponentClicked -= _progressPopupView.Show;
break;
case ComponentType.Rack:
if (_rackProperty != null)
component.onComponentClicked -= _rackProperty.SetPropertyWindow;
break;
case ComponentType.Queue:
if (_queueProperty != null)
component.onComponentClicked -= _queueProperty.SetPropertyWindow;
break;
case ComponentType.ASRS:
if (_asrsProperty != null)
component.onComponentClicked -= _asrsProperty.SetPropertyWindow;
break;
case ComponentType.RobotArm:
if (_robotArmProperty != null)
component.onComponentClicked -= _robotArmProperty.SetPropertyWindow;
break;
case ComponentType.Worker:
break;
}
}
public void UnbindConveyor(ConveyorComponent conveyor)
{
if (_conveyorProperty != null)
conveyor.onConveyorClicked -= _conveyorProperty.SetPropertyWindow;
}
public void UnbindNode(NodeComponent node)
{
if (_nodeProperty != null)
node.onConveyorClicked -= _nodeProperty.SetPropertyWindow;
}
public void BindConveyor(ConveyorComponent conveyor)
{
if (_conveyorProperty != null)