Ignore:
Timestamp:
Jun 10, 2010, 5:52:30 PM (11 years ago)
Author:
kopal
Message:
  • connectors now may only connect from output to InputConnection
  • view is disabled when editor is executing now
  • connector now has "lastData" which stores last used data
  • minwidth, minheight of an VisualElementModel can only be >=50 now
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/View/Container/WorkSpaceEditorView.xaml.cs

    r1617 r1620  
    6868
    6969        void PluginDelete(object sender, PluginContainerViewDeleteViewEventArgs e)
    70         {
    71             /*for(int i = 0; i< e.container.ConnectorViewList.Count; i++)
    72             {
    73                 for(int j = 0; j< e.container.ConnectorViewList[i].Model.OutputConnections.Count; j++)
    74                 {
    75                     Model.deleteConnectionModel(e.container.ConnectorViewList[i].Model.OutputConnections[j]);
    76                     for (int n = 0; n < ConnectionList.Count; n++)
    77                     {
    78                         if (ConnectionList[n].Model == e.container.ConnectorViewList[i].Model.OutputConnections[j] ||
    79                             ConnectionList[n].Model == e.container.ConnectorViewList[i].Model.InputConnection)
    80                             root.Children.Remove(ConnectionList[n]);
    81                     }
    82                 }
    83                 Model.deleteConnectionModel(e.container.ConnectorViewList[i].Model.InputConnection);
    84             }*/
     70        {           
    8571            Model.deletePluginModel(e.container.Model);
    8672            root.Children.Remove(e.container);
     
    127113            if (sender is ConnectionModel)
    128114            {
    129                 if (((ConnectionModel)sender).UpdateableView != null)
    130                 {
     115                if(((ConnectionModel)sender).UpdateableView != null){
    131116                    UIElement uielement = (UIElement)((ConnectionModel)sender).UpdateableView;
    132117                    root.Children.Remove(uielement);
     
    175160        void shape_OnConnectorMouseLeftButtonDown(object sender, ConnectorViewEventArgs e)
    176161        {
    177             if (selectedConnector != null && e.connector.Model.ConnectorType.Name == selectedConnector.Model.ConnectorType.Name)
     162            if (selectedConnector != null && WorkspaceModel.compatibleConnectors(selectedConnector.Model, e.connector.Model))
    178163            {
    179164                this.root.Children.Remove(dummyLine);
     
    184169            }
    185170
    186             if (selectedConnector == null)
     171            if (selectedConnector == null && e.connector.Model.Outgoing)
    187172            {
    188173                this.root.Children.Add(dummyLine);
Note: See TracChangeset for help on using the changeset viewer.