Ignore:
Timestamp:
Jun 1, 2010, 11:40:31 PM (12 years ago)
Author:
kopal
Message:
  • replaced x,y.coordinates of PluginModel with a Point
  • Fetched OnPluginProgressChanged now by PluginModel and automatically set PercentageFinished
  • some small fixes
File:
1 edited

Legend:

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

    r1556 r1562  
    3838
    3939        [NonSerialized]
    40         private PluginModelState executionstate = PluginModelState.UNDEFINED;
     40        private PluginModelState executionstate = PluginModelState.Undefined;
    4141
    4242        /// <summary>
     
    7272        /// </summary>       
    7373        public Type PluginType = null;
    74 
    75         /// <summary>
    76         /// Stores if this Plugin is executable
    77         /// </summary>
    78         private bool executable = false;
    79 
     74       
    8075        /// <summary>
    8176        /// Is the Plugin actually minimized?
     
    123118                        connectorModel.IsMandatory = propertyInfoAttribute.Mandatory;
    124119                        connectorModel.PropertyName = propertyInfoAttribute.PropertyName;
     120                        connectorModel.ConnectorOrientation = ConnectorOrientation.West;
    125121                        InputConnectors.Add(connectorModel);
    126122                        WorkspaceModel.AllConnectorModels.Add(connectorModel);
     
    134130                        connectorModel.IsMandatory = propertyInfoAttribute.Mandatory;
    135131                        connectorModel.PropertyName = propertyInfoAttribute.PropertyName;
     132                        connectorModel.ConnectorOrientation = ConnectorOrientation.East;
    136133                        connectorModel.Outgoing = true;
    137134                        Plugin.PropertyChanged += connectorModel.PropertyChangedOnPlugin;
     
    182179        public void checkExecutable()
    183180        {
    184             if(ExecutionState == PluginModelState.UNDEFINED){
     181            if(ExecutionState == PluginModelState.Undefined){
    185182
    186183                mutex.WaitOne();
     
    209206                }
    210207
    211                 ExecutionState = PluginModelState.EXECUTABLE;
     208                ExecutionState = PluginModelState.Executable;
    212209                mutex.ReleaseMutex();
    213210            }
    214211            return;
    215212        }
    216        
     213
     214        /// <summary>
     215        /// Progress of the plugin changed
     216        /// </summary>
     217        /// <param name="sender"></param>
     218        /// <param name="args"></param>
     219        public void PluginProgressChanged(IPlugin sender, PluginProgressEventArgs args)
     220        {
     221            this.PercentageFinished = args.Value / args.Max;
     222        }
    217223    }
    218224
     
    222228    public enum PluginModelState
    223229    {
    224         UNDEFINED,
    225         EXECUTABLE,
    226         PRE_EXECUTING,
    227         EXECUTING,
    228         POST_EXECUTING,
    229         TERMINATED,
    230         ERROR
     230        Undefined,
     231        Executable,
     232        PreExecuting,
     233        Executing,
     234        PostExecuting,
     235        Terminated,
     236        Error
    231237    }
    232238}
Note: See TracChangeset for help on using the changeset viewer.