GetComponentTypes() public method

public GetComponentTypes ( ) : Stetic.ComponentType[]
return Stetic.ComponentType[]
示例#1
0
        public ComponentType[] GetComponentTypes()
        {
            if (!disposed)
            {
                ArrayList types = new ArrayList();
                types.AddRange(project.GetComponentTypes());

                // Add actions from the local action groups

                WidgetComponent c = rootWidget as WidgetComponent;
                if (c != null)
                {
                    foreach (ActionGroupComponent grp in c.GetActionGroups())
                    {
                        foreach (ActionComponent ac in grp.GetActions())
                        {
                            types.Add(new ComponentType(app, ac));
                        }
                    }
                }
                return((ComponentType[])types.ToArray(typeof(ComponentType)));
            }
            else
            {
                return(new ComponentType[0]);
            }
        }