Changeset 1570


Ignore:
Timestamp:
Jun 2, 2010, 3:09:12 PM (12 years ago)
Author:
kopal
Message:
  • renamed "ConntectorView" to "ConnectorView"
  • bug fix - newConnectionModel now puts the new ConnectionModel into the internal list
  • PluginModels are now executable if
    • all Mandatory Inputs are set + all Outputs are "free"
    • there are no Mandatory Inputs but at least one input is set + all Outputs are "free"
    • there are no Inputs + all Outputs are "free"
  • some small fixes
Location:
trunk/CrypPlugins/WorkspaceManager
Files:
2 added
2 deleted
6 edited

Legend:

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

    r1562 r1570  
    3535        private Mutex mutex = new Mutex();
    3636
     37        [NonSerialized]
    3738        private bool hasData = false;
     39
     40        [NonSerialized]
    3841        private object data;
    3942
  • trunk/CrypPlugins/WorkspaceManager/Model/PluginModel.cs

    r1562 r1570  
    147147            get
    148148            {
    149                 return this.Plugin.Presentation;
     149                if(this.Plugin.Presentation != null){
     150                    return this.Plugin.Presentation;
     151                }else{
     152                    return this.Plugin.QuickWatchPresentation;
     153                }
    150154            }
    151155        }
     
    182186
    183187                mutex.WaitOne();
     188               
     189                bool AtLeastOneInputSet = false;
    184190                //First test if every mandatory Connector has Data
    185191                foreach (ConnectorModel connectorModel in this.InputConnectors)
     
    189195                        mutex.ReleaseMutex();
    190196                        return;
     197                    }
     198                    else if (connectorModel.HasData)
     199                    {
     200                        AtLeastOneInputSet = true;
    191201                    }
    192202
     
    206216                }
    207217
    208                 ExecutionState = PluginModelState.Executable;
     218                if (AtLeastOneInputSet || this.InputConnectors.Count == 0)
     219                {
     220                    ExecutionState = PluginModelState.Executable;
     221                }
    209222                mutex.ReleaseMutex();
    210223            }
  • trunk/CrypPlugins/WorkspaceManager/Model/VisualElementModel.cs

    r1562 r1570  
    3333    {
    3434
    35 
    3635        /// <summary>
    3736        /// I will be deleted
    38         /// </summary>
     37        /// </summary
    3938        public event EventHandler<EventArgs> Delete;
    4039
  • trunk/CrypPlugins/WorkspaceManager/Model/WorkspaceModel.cs

    r1562 r1570  
    115115            to.InputConnection = connectionModel;
    116116            connectionModel.ConnectionType = connectionType;
     117            this.AllConnectionModels.Add(connectionModel);
    117118            return connectionModel;
    118119        }
  • trunk/CrypPlugins/WorkspaceManager/WorkspaceManager.cs

    r1562 r1570  
    2929using WorkspaceManager.View;
    3030using WorkspaceManager.Execution;
    31 using Cryptool.Plugins.CostFunction;
    32 using Cryptool.TextInput;
    3331using WorkspaceManager.View.Container;
    3432using WorkspaceManager.View.Converter;
  • trunk/CrypPlugins/WorkspaceManager/WorkspaceManager.csproj

    r1551 r1570  
    8989      <DependentUpon>Settings.settings</DependentUpon>
    9090    </Compile>
    91     <Compile Include="View\Container\ConntectorView.xaml.cs">
    92       <DependentUpon>ConntectorView.xaml</DependentUpon>
     91    <Compile Include="View\Container\ConnectorView.xaml.cs">
     92      <DependentUpon>ConnectorView.xaml</DependentUpon>
    9393    </Compile>
    9494    <Compile Include="View\Container\PluginContainerView.xaml.cs">
     
    118118      <Name>CrypPluginBase</Name>
    119119    </ProjectReference>
    120     <ProjectReference Include="..\CostFunction\CostFunction.csproj">
    121       <Project>{3C72FF93-48C2-4929-B3B2-83F165AAE636}</Project>
    122       <Name>CostFunction</Name>
    123     </ProjectReference>
    124     <ProjectReference Include="..\TextInput\TextInput.csproj">
    125       <Project>{475E8850-4D82-4C5E-AD19-5FDA82BC7576}</Project>
    126       <Name>TextInput</Name>
    127     </ProjectReference>
    128120  </ItemGroup>
    129121  <ItemGroup>
     
    132124      <SubType>Designer</SubType>
    133125    </Page>
    134     <Page Include="View\Container\ConntectorView.xaml">
     126    <Page Include="View\Container\ConnectorView.xaml">
    135127      <Generator>MSBuild:Compile</Generator>
    136128      <SubType>Designer</SubType>
Note: See TracChangeset for help on using the changeset viewer.