Changeset 1681


Ignore:
Timestamp:
Jun 20, 2010, 10:25:18 PM (11 years ago)
Author:
kopal
Message:

some bug fixes

Location:
trunk/CrypPlugins/WorkspaceManager
Files:
5 edited

Legend:

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

    r1680 r1681  
    3636    [Serializable]
    3737    public class PluginModel : VisualElementModel
    38     {       
     38    {
     39        #region privates
    3940        [NonSerialized]
    40         private IPlugin plugin;
    41        
    42         /// <summary>
    43         /// This is the current index of the image which should be shown
    44         /// on the plugins view
    45         /// </summary>
     41        private PluginProtocol pluginProtocol;
     42        [NonSerialized]
     43        private IPlugin plugin;         
    4644        private int imageIndex = 0;
    47        
     45
     46        #endregion privates
     47
    4848        /// <summary>
    4949        /// All ingoing connectors of this PluginModel
     
    114114        /// <summary>
    115115        /// Generates all Connectors of this Plugin.
    116         /// Warning: Before generation all "old" Connectors will be deleted
    117116        /// </summary>
    118117        public void generateConnectors()
     
    235234        }
    236235
    237 
    238236        /// <summary>
    239237        /// Checks wether this PluginModel is executable or not and sets the isExecutable bool
     
    251249            foreach (ConnectorModel connectorModel in this.InputConnectors)
    252250            {
    253                 if (connectorModel.IsMandatory && !connectorModel.HasData)
     251                if ((connectorModel.IsMandatory || connectorModel.InputConnection != null) && !connectorModel.HasData)
    254252                {
    255253                    return;
     
    261259            }
    262260
    263             if (AtLeastOneInputSet || this.InputConnectors.Count == 0)
     261            if (AtLeastOneInputSet)
    264262            {
    265263                MessageExecution msg = new MessageExecution();
     
    319317        /// The pluginProtocol of the current ExecutionEngine run to set/get
    320318        /// </summary>
    321         public PluginProtocol PluginProtocol { get; set; }
     319        public PluginProtocol PluginProtocol {
     320            get { return pluginProtocol; }
     321            set { pluginProtocol = value;}
     322        }
    322323    }
    323324}
  • trunk/CrypPlugins/WorkspaceManager/Model/VisualElementModel.cs

    r1620 r1681  
    4848        }
    4949
     50        /// <summary>
     51        /// Current Position of this VisualElementModel
     52        /// </summary>
    5053        public Point Position { get; set; }
    5154
     
    105108        /// View Element of this VisualElement
    106109        /// </summary>
     110        [NonSerialized]
    107111        public IUpdateableView UpdateableView = null;
    108112    }
  • trunk/CrypPlugins/WorkspaceManager/Model/WorkspaceModel.cs

    r1680 r1681  
    3636        /// <summary>
    3737        /// The surrounding WorkspaceManagerEditor
    38         /// </summary>        
     38        /// </summary>
    3939        public WorkspaceManager WorkspaceManagerEditor {
    4040            get{
     
    4242            }
    4343            set{
    44                 this.workspaceManagerEditor = value;
     44                workspaceManagerEditor = value;
    4545            }
    4646        }
  • trunk/CrypPlugins/WorkspaceManager/View/Container/WorkSpaceEditorView.xaml.cs

    r1640 r1681  
    4646        {
    4747            get { return model; }
    48             private set { model = value; }
     48            set { model = value; }
    4949        }
    5050
  • trunk/CrypPlugins/WorkspaceManager/WorkspaceManager.cs

    r1680 r1681  
    6060        {
    6161            Settings = new WorkspaceManagerSettings();
    62             New();                                 
     62            WorkspaceModel = new WorkspaceModel();
     63            WorkspaceModel.WorkspaceManagerEditor = this;
     64            WorkspaceManagerEditorView = new WorkSpaceEditorView(WorkspaceModel);
     65            ExecutionEngine = new ExecutionEngine(this);
     66            HasChanges = false;                               
    6367        }
    6468
     
    112116        public void New()
    113117        {
    114             WorkspaceModel = new WorkspaceModel();
    115             WorkspaceModel.WorkspaceManagerEditor = this;
    116             WorkspaceManagerEditorView = new WorkSpaceEditorView(WorkspaceModel);
    117             ExecutionEngine = new ExecutionEngine(this);
    118             HasChanges = false;
     118            foreach (PluginModel pluginModel in new List<PluginModel>(WorkspaceModel.AllPluginModels))
     119            {
     120                WorkspaceModel.deletePluginModel(pluginModel);
     121            }
     122            this.HasChanges = false;
    119123        }
    120124
     
    129133                GuiLogMessage("Loading Model: " + fileName, NotificationLevel.Info);
    130134                WorkspaceModel = ModelPersistance.loadModel(fileName);
     135                WorkspaceModel.WorkspaceManagerEditor = this;
     136                WorkspaceManagerEditorView.Model = WorkspaceModel;
    131137                HasChanges = false;
    132138            }
Note: See TracChangeset for help on using the changeset viewer.