Ignore:
Timestamp:
Jun 21, 2010, 11:40:22 PM (12 years ago)
Author:
kopal
Message:
  • error messages or warning messages now lead to coloring of the plugins view (currently color stays then) - plugins with error messages will not be executed again in the current run of the chain
  • a plugin now will be executed if all mandatory connectors are set (regardless if other connectors have data)
  • corrected calls of plugin methods (Execute, PreExecution...) according to state diagram of https://www.cryptool.org/trac/CrypTool2/wiki/IPluginHints
  • bug fix in view: PluginContainerView now does not flash between icon and Presentation if it is resized
File:
1 edited

Legend:

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

    r1681 r1684  
    3535using System.Threading;
    3636using System.Windows.Controls;
     37using System.Windows.Media;
    3738
    3839//Disable warnings for unused or unassigned fields and events:
     
    368369                {
    369370                    ExecutionEngine.GuiUpdateInterval = long.Parse(((WorkspaceManagerSettings)this.Settings).GuiUpdateInterval);
     371                    if (ExecutionEngine.GuiUpdateInterval <= 0)
     372                    {
     373                        GuiLogMessage("GuiUpdateInterval can not be <=0; Use GuiUpdateInterval = 1", NotificationLevel.Warning);
     374                        ExecutionEngine.GuiUpdateInterval = 1;
     375                    }
    370376                }
    371377                catch (Exception ex)
     
    503509        public void GuiLogNotificationOccured(IPlugin sender, GuiLogEventArgs args)
    504510        {
     511            //Check if the logging event is Warning or Error and set the State of the PluginModel to
     512            //the corresponding PluginModelState
     513            if (args.NotificationLevel == NotificationLevel.Warning)
     514            {               
     515                foreach (PluginModel pluginModel in this.WorkspaceModel.AllPluginModels)
     516                {
     517                    if (pluginModel.Plugin == sender)
     518                    {
     519                        pluginModel.State = PluginModelState.Warning;
     520                        pluginModel.GuiNeedsUpdate = true;
     521                    }
     522                }
     523            }
     524
     525            if (args.NotificationLevel == NotificationLevel.Error)
     526            {               
     527                foreach (PluginModel pluginModel in this.WorkspaceModel.AllPluginModels)
     528                {
     529                    if (pluginModel.Plugin == sender)
     530                    {
     531                        pluginModel.State = PluginModelState.Error;
     532                        pluginModel.GuiNeedsUpdate = true;
     533                    }
     534                }
     535            }
     536           
    505537            if (OnGuiLogNotificationOccured != null)
    506538                OnGuiLogNotificationOccured(sender, args);
Note: See TracChangeset for help on using the changeset viewer.