Changeset 2750


Ignore:
Timestamp:
Feb 19, 2011, 10:41:24 PM (11 years ago)
Author:
kopal
Message:

all lists of the model are read only by the environment now

Location:
trunk/WorkspaceManagerModel/Model
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WorkspaceManagerModel/Model/Elements/PluginModel.cs

    r2749 r2750  
    3131using WorkspaceManager.Model.Tools;
    3232using WorkspaceManagerModel.Model.Operations;
     33using System.Collections.ObjectModel;
    3334
    3435namespace WorkspaceManager.Model
     
    7879        /// All ingoing connectors of this PluginModel
    7980        /// </summary>
    80         public List<ConnectorModel> InputConnectors = null;
     81        internal List<ConnectorModel> InputConnectors = null;
     82
     83        /// <summary>
     84        /// Get all ingoing connectors of this PluginModel
     85        /// </summary>
     86        public ReadOnlyCollection<ConnectorModel> GetInputConnectors()
     87        {
     88            return InputConnectors.AsReadOnly();
     89        }
    8190
    8291        /// <summary>
    8392        /// All outgoing connectors of this PluginModel
    8493        /// </summary>
    85         public List<ConnectorModel> OutputConnectors = null;
     94        internal List<ConnectorModel> OutputConnectors = null;
     95
     96        /// <summary>
     97        /// Get all outgoing connectors of this PluginModel
     98        /// </summary>
     99        public ReadOnlyCollection<ConnectorModel> GetOutputConnectors()
     100        {
     101            return OutputConnectors.AsReadOnly();
     102        }
    86103
    87104        /// <summary>
  • trunk/WorkspaceManagerModel/Model/Elements/WorkspaceModel.cs

    r2749 r2750  
    8585        /// All PluginModels of our Workspace Model
    8686        /// </summary>
    87         public List<PluginModel> AllPluginModels;
     87        internal List<PluginModel> AllPluginModels;
     88
     89        /// <summary>
     90        /// Get all PluginModels of our Workspace Model
     91        /// </summary>
     92        public ReadOnlyCollection<PluginModel> GetAllPluginModels()
     93        {
     94            return AllPluginModels.AsReadOnly();
     95        }
    8896
    8997        /// <summary>
    9098        /// All Connector Models of our Workspace Model
    9199        /// </summary>
    92         public List<ConnectorModel> AllConnectorModels;
     100        internal List<ConnectorModel> AllConnectorModels;
     101
     102        /// <summary>
     103        /// Get all Connector Models of our Workspace Model
     104        /// </summary>
     105        public ReadOnlyCollection<ConnectorModel> GetAllConnectorModels()
     106        {
     107            return AllConnectorModels.AsReadOnly();
     108        }
    93109
    94110        /// <summary>
    95111        /// All ConnectionModels of our Workspace Model
    96112        /// </summary>
    97         public List<ConnectionModel> AllConnectionModels;
     113        internal List<ConnectionModel> AllConnectionModels;
     114
     115        /// <summary>
     116        /// Get all ConnectionModels of our Workspace Model
     117        /// </summary>
     118        public ReadOnlyCollection<ConnectionModel> GetAllConnectionModels()
     119        {
     120            return AllConnectionModels.AsReadOnly();
     121        }
    98122
    99123        /// <summary>
    100124        /// All ImageModels of our Workspace Model
    101125        /// </summary>
    102         public List<ImageModel> AllImageModels;
     126        internal List<ImageModel> AllImageModels;
     127
     128        /// <summary>
     129        /// Get all ImageModels of our Workspace Model
     130        /// </summary>
     131        public ReadOnlyCollection<ImageModel> GetAllImageModels()
     132        {
     133            return AllImageModels.AsReadOnly();
     134        }
    103135
    104136        /// <summary>
    105137        /// All TextModels of our Workspace Model
    106138        /// </summary>
    107         public List<TextModel> AllTextModels;
    108        
     139        internal List<TextModel> AllTextModels;
     140
     141        /// <summary>
     142        /// Get all TextModels of our Workspace Model
     143        /// </summary>
     144        public ReadOnlyCollection<TextModel> GetAllTextModels()
     145        {
     146            return AllTextModels.AsReadOnly();
     147        }
     148
    109149        /// <summary>
    110150        /// Creates a new PluginModel belonging to this WorkspaceModel
  • trunk/WorkspaceManagerModel/Model/Tools/UndoRedoManager.cs

    r2749 r2750  
    100100                    op = RedoStack.Pop();                   
    101101                    lastModelModel = op.Model;
    102                     op.Redo();
     102                    op.Execute();
    103103                    UndoStack.Push(op);
    104104                } while (RedoStack.Count > 0 && //(!RedoStack.First().SingleOperation || (RedoStack.First() is MoveModelModelOperation &&
Note: See TracChangeset for help on using the changeset viewer.