public ArrayList Bitmaps()
        {
            ArrayList list = new ArrayList();

            Dictionary <string, Assembly> .Enumerator lpAssembly = mapModule.GetEnumerator();

            while (lpAssembly.MoveNext())
            {
                KeyValuePair <string, Assembly> item = lpAssembly.Current;

                Assembly assembly = item.Value;
                foreach (Type type in assembly.GetTypes())
                {
                    if (type.IsClass == true)
                    {
                        if (type.Name.IndexOf("Activity") > 0)
                        {
                            // create an instance of the object
                            IActivity s = Activator.CreateInstance(type) as IActivity;
                            if (s.ExistToolBox)
                            {
                                ActivityIcon i = new ActivityIcon();
                                i.icon    = s.Icon;
                                i.strName = s.ActivityName;
                                list.Add(i);
                                break;
                            }
                        }
                    }
                }
            }

            return(list);
        }
Beispiel #2
0
        void ReleaseDesignerOutlets()
        {
            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (DateLabel != null)
            {
                DateLabel.Dispose();
                DateLabel = null;
            }

            if (FileSizeLabel != null)
            {
                FileSizeLabel.Dispose();
                FileSizeLabel = null;
            }

            if (ActivityIcon != null)
            {
                ActivityIcon.Dispose();
                ActivityIcon = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (ActivityIcon != null)
            {
                ActivityIcon.Dispose();
                ActivityIcon = null;
            }

            if (DescriptionLabel != null)
            {
                DescriptionLabel.Dispose();
                DescriptionLabel = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }
        }