Ejemplo n.º 1
0
        public PluginItem(string name, string text, string tooltip, Type providerType, NavigationNodeItem navigationNode)
        {
            this.name           = name;
            this.text           = text;
            this.tooltip        = tooltip;
            this.providerType   = providerType;
            this.navigationNode = navigationNode;

            this.subItems.ArrayListChanged +=
                new NotifyCollectionChangedEventHandler(delegate(object sender, NotifyCollectionChangedEventArgs e)
            {
                if (e.Action == NotifyCollectionChangedAction.Add)
                {
                    if (e.NewItems != null)
                    {
                        foreach (object newPluginItemObject in e.NewItems)
                        {
                            TPluginItem p = (TPluginItem)newPluginItemObject;

                            p.parent = (TPluginItem)this;
                        }
                    }
                }
            });
        }
Ejemplo n.º 2
0
        public static TPluginItem CreatePluginItem(string name,
                                                   string text,
                                                   string icon,
                                                   string tooltip,
                                                   NavigationNodeItem navigation)
        {
            TPluginItem pluginItem = new TPluginItem();

            pluginItem.Name       = name;
            pluginItem.Text       = text;
            pluginItem.Tooltip    = tooltip;
            pluginItem.Navigation = navigation;

            return(pluginItem);
        }
Ejemplo n.º 3
0
 public PluginItem(string name, string text, string tooltip, NavigationNodeItem navigationNode) :
     this(name, text, tooltip, null, navigationNode)
 {
 }
Ejemplo n.º 4
0
 public PluginItem(string name, string text, NavigationNodeItem navigationNode)
     : this(name, text, string.Empty, navigationNode)
 {
 }