Ignore:
Timestamp:
Jun 24, 2010, 4:32:45 PM (12 years ago)
Author:
kopal
Message:
  • WorkspaceManager now allows multiple Connections on InputConnectors
  • Created own Gears4Net Scheduler which implements flow control in WorkspaceManagers ExecutionEngine to support loops
  • some small bugfixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/Model/WorkspaceModel.cs

    r1684 r1700  
    125125            connectionModel.To = to;
    126126            from.OutputConnections.Add(connectionModel);
    127             to.InputConnection = connectionModel;
     127            to.InputConnections.Add(connectionModel);
    128128            connectionModel.ConnectionType = connectionType;
    129129            this.AllConnectionModels.Add(connectionModel);
     
    173173            if(this.AllConnectorModels.Contains(connectorModel)){
    174174
     175                //remove all input ConnectionModels belonging to this Connector from our WorkspaceModel
     176                foreach (ConnectionModel connectionModel in new List<ConnectionModel>(connectorModel.InputConnections))
     177                {
     178                    deleteConnectionModel(connectionModel);
     179                }
     180
    175181                //remove all output ConnectionModels belonging to this Connector from our WorkspaceModel
    176182                foreach (ConnectionModel outputConnection in new List<ConnectionModel>(connectorModel.OutputConnections))
     
    178184                    deleteConnectionModel(outputConnection);
    179185                }
    180 
    181                 //remove the input ConnectionModel belonging to this Connector from our WorkspaceModel
    182                 if (connectorModel.InputConnection != null)
    183                 {
    184                     deleteConnectionModel(connectorModel.InputConnection);
    185                 }
     186                               
    186187                connectorModel.onDelete();
    187188                this.WorkspaceManagerEditor.HasChanges = true;
     
    201202                return false;
    202203
    203             connectionModel.From.OutputConnections.Remove(connectionModel);
    204             connectionModel.To.InputConnection = null;
     204            connectionModel.To.InputConnections.Remove(connectionModel);
     205            connectionModel.From.OutputConnections.Remove(connectionModel);           
    205206            connectionModel.onDelete();
    206207            this.WorkspaceManagerEditor.HasChanges = true;
     
    238239            if (connectionModel.To != null)
    239240            {
    240                 connectionModel.To.InputConnection = null;
     241                connectionModel.To.InputConnections.Remove(connectionModel);
    241242            }
    242243            connectionModel.To = connectorModel;
    243             connectorModel.InputConnection = connectionModel;
     244            connectorModel.InputConnections.Add(connectionModel);
    244245            this.WorkspaceManagerEditor.HasChanges = true;
    245246            return true;
     
    256257        public static bool compatibleConnectors(ConnectorModel connectorModelA, ConnectorModel connectorModelB)
    257258        {
    258             if (!connectorModelA.Outgoing || connectorModelB.Outgoing || connectorModelB.InputConnection != null)
     259            if (!connectorModelA.Outgoing || connectorModelB.Outgoing)
    259260            {
    260261                return false;
Note: See TracChangeset for help on using the changeset viewer.