Changeset 1581


Ignore:
Timestamp:
Jun 3, 2010, 4:51:56 PM (12 years ago)
Author:
kopal
Message:
  • added ToolTip to ConnectorModel
  • added Icon to PluginModel
Location:
trunk/CrypPlugins/WorkspaceManager/Model
Files:
3 edited

Legend:

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

    r1570 r1581  
    129129        /// </summary>
    130130        public string PropertyName{get;set;}
    131        
     131
     132        /// <summary>
     133        /// ToolTip of this Connector
     134        /// </summary>
     135        public string ToolTip { get; set; }
     136
    132137        /// <summary>
    133138        /// Plugin informs the Connector that a PropertyChanged
  • trunk/CrypPlugins/WorkspaceManager/Model/PluginModel.cs

    r1570 r1581  
    2222using Cryptool.PluginBase;
    2323using System.Threading;
     24using System.Windows.Controls;
    2425
    2526namespace WorkspaceManager.Model
     
    4041        private PluginModelState executionstate = PluginModelState.Undefined;
    4142
     43        private int imageIndex = 0;
     44       
    4245        /// <summary>
    4346        /// All ingoing connectors of this PluginModel
     
    8184        /// The execution state of the progress of the wrapped plugin
    8285        /// </summary>
    83         public double PercentageFinished { get; set; }
     86        public double PercentageFinished { private get; set; }
    8487
    8588        /// <summary>
     
    118121                        connectorModel.IsMandatory = propertyInfoAttribute.Mandatory;
    119122                        connectorModel.PropertyName = propertyInfoAttribute.PropertyName;
     123                        connectorModel.ToolTip = propertyInfoAttribute.ToolTip;
    120124                        connectorModel.ConnectorOrientation = ConnectorOrientation.West;
    121125                        InputConnectors.Add(connectorModel);
     
    130134                        connectorModel.IsMandatory = propertyInfoAttribute.Mandatory;
    131135                        connectorModel.PropertyName = propertyInfoAttribute.PropertyName;
     136                        connectorModel.ToolTip = propertyInfoAttribute.ToolTip;
    132137                        connectorModel.ConnectorOrientation = ConnectorOrientation.East;
    133138                        connectorModel.Outgoing = true;
     
    141146
    142147        /// <summary>
     148        /// Get the Image of the Plugin
     149        /// </summary>
     150        /// <returns></returns>
     151        public Image getImage()
     152        {
     153            return Plugin.GetImage(imageIndex);
     154        }
     155
     156        /// <summary>
    143157        /// Returns the Presentation of the wrapped IPlugin
    144158        /// </summary>
    145         public System.Windows.Controls.UserControl PluginPresentation
     159        public UserControl PluginPresentation
    146160        {
    147161            get
     
    233247        {
    234248            this.PercentageFinished = args.Value / args.Max;
     249        }
     250
     251        /// <summary>
     252        /// Status of the plugin changed
     253        /// </summary>
     254        /// <param name="sender"></param>
     255        /// <param name="args"></param>
     256        public void PluginStatusChanged(IPlugin sender, StatusEventArgs args)
     257        {
     258            if (args.StatusChangedMode == StatusChangedMode.ImageUpdate)
     259            {
     260                this.imageIndex = args.ImageIndex;
     261            }
    235262        }
    236263    }
  • trunk/CrypPlugins/WorkspaceManager/Model/WorkspaceModel.cs

    r1570 r1581  
    8383            pluginModel.Plugin.OnGuiLogNotificationOccured += this.WorkspaceManagerEditor.GuiLogNotificationOccured;
    8484            pluginModel.Plugin.OnPluginProgressChanged += pluginModel.PluginProgressChanged;
     85            pluginModel.Plugin.OnPluginStatusChanged += pluginModel.PluginStatusChanged;
    8586            this.AllPluginModels.Add(pluginModel);
    8687            return pluginModel;
Note: See TracChangeset for help on using the changeset viewer.