예제 #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;
                        }
                    }
                }
            });
        }
예제 #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);
        }
예제 #3
0
 public PluginItem(string name, string text, string tooltip, NavigationNodeItem navigationNode) :
     this(name, text, tooltip, null, navigationNode)
 {
 }
예제 #4
0
 public PluginItem(string name, string text, NavigationNodeItem navigationNode)
     : this(name, text, string.Empty, navigationNode)
 {
 }