protected virtual void UpdateDescription()
        {
            descriptionTextBox.Text = string.Empty;

            if (typesTreeView.SelectedNode != null)
            {
                IPluginDescription plugin = typesTreeView.SelectedNode.Tag as IPluginDescription;
                if (plugin != null)
                {
                    StringBuilder sb = new StringBuilder();
                    sb.Append("Plugin: ").Append(plugin.Name).Append(Environment.NewLine);
                    sb.Append("Version: ").Append(plugin.Version.ToString()).Append(Environment.NewLine);
                    descriptionTextBox.Text = sb.ToString();
                }
                Type type = typesTreeView.SelectedNode.Tag as Type;
                if (type != null)
                {
                    string description = ItemAttribute.GetDescription(type);
                    if (description != null)
                    {
                        descriptionTextBox.Text = description;
                    }
                }
            }
            else if (typesTreeView.Nodes.Count == 0)
            {
                descriptionTextBox.Text = "No types found";
            }
        }
        protected virtual void UpdateDescription()
        {
            itemDescriptionTextBox.Text   = string.Empty;
            pluginDescriptionTextBox.Text = string.Empty;
            pluginTextBox.Text            = string.Empty;
            versionTextBox.Text           = string.Empty;

            if (typesTreeView.SelectedNode != null)
            {
                var    node     = typesTreeView.SelectedNode;
                string category = node.Tag as string;
                if (category != null)
                {
                    itemDescriptionTextBox.Text = string.Join(" - ", node.Name.Split(new[] { CreatableAttribute.Categories.SplitToken }, StringSplitOptions.RemoveEmptyEntries));
                }
                Type type = node.Tag as Type;
                if (type != null)
                {
                    string description = ItemAttribute.GetDescription(type);
                    var    version     = ItemAttribute.GetVersion(type);
                    var    plugin      = ApplicationManager.Manager.GetDeclaringPlugin(type);
                    if (description != null)
                    {
                        itemDescriptionTextBox.Text = description;
                    }
                    if (plugin != null)
                    {
                        pluginTextBox.Text            = plugin.Name;
                        pluginDescriptionTextBox.Text = plugin.Description;
                    }
                    if (version != null)
                    {
                        versionTextBox.Text = version.ToString();
                    }
                }
            }
            else if (typesTreeView.Nodes.Count == 0)
            {
                itemDescriptionTextBox.Text = "No types found";
            }
        }
 internal GESymbolicExpressionGrammar(IEnumerable <string> variableNames, int nConstants)
     : base(ItemAttribute.GetName(typeof(GESymbolicExpressionGrammar)), ItemAttribute.GetDescription(typeof(GESymbolicExpressionGrammar)))
 {
     // this ctor is called by the problem as only the problem knows the allowed input variables
     Initialize(variableNames, nConstants);
 }
 public GESymbolicExpressionGrammar()
     : base(ItemAttribute.GetName(typeof(GESymbolicExpressionGrammar)), ItemAttribute.GetDescription(typeof(GESymbolicExpressionGrammar)))
 {
     // empty ctor is necessary to allow creation of new GEGrammars from the GUI.
     // the problem creates a new correctly configured grammar when the grammar is set
 }
Exemple #5
0
 public ArithmeticExpressionGrammar()
     : base(ItemAttribute.GetName(typeof(ArithmeticExpressionGrammar)), ItemAttribute.GetDescription(typeof(ArithmeticExpressionGrammar)))
 {
     Initialize();
 }
Exemple #6
0
 public FullFunctionalExpressionGrammar()
     : base(ItemAttribute.GetName(typeof(FullFunctionalExpressionGrammar)), ItemAttribute.GetDescription(typeof(FullFunctionalExpressionGrammar)))
 {
     Initialize();
 }
 public TypeCoherentExpressionGrammar()
     : base(ItemAttribute.GetName(typeof(TypeCoherentExpressionGrammar)), ItemAttribute.GetDescription(typeof(TypeCoherentExpressionGrammar)))
 {
     Initialize();
 }
 public CFGExpressionGrammar()
     : base(ItemAttribute.GetName(typeof(CFGExpressionGrammar)), ItemAttribute.GetDescription(typeof(CFGExpressionGrammar)))
 {
 }