public WidgetList(WidgetList list)
 {
     foreach( DictionaryEntry elem in list )
     {
         this.Add(elem.Key, elem.Value);
     }            
 }
        /*
         * returns all widgets which contain one more of the files
         */
        private WidgetList getWidgetsThatContainFiles(WidgetList luas, ArrayList files)
        {
            WidgetList widgets = new WidgetList();

            IEnumerator ienum = luas.Values.GetEnumerator();
            while( ienum.MoveNext() )
            {
                //iterate widgets
                WidgetInfo curWidget = (WidgetInfo)ienum.Current;

                LinkedList<FileInfo> filesCurWidget = this.getFileListByLuaId(curWidget.id);
                ArrayList mis = this.getMissingFilesForWidget(filesCurWidget, files);

                if (mis.Count < filesCurWidget.Count )
                {
                    //at least one file is included, add the widget
                    widgets.Add(curWidget.id, curWidget);
                }
            }

            return widgets;
        }
        static public WidgetList xml2ModWidgets(XmlDocument doc)
        {
            XmlNode root = doc.DocumentElement;
            IEnumerator ienum = root.GetEnumerator();
            XmlNode widgetXml;

            WidgetList list = new WidgetList();
            while (ienum.MoveNext())
            {
                widgetXml = (XmlNode)ienum.Current;
                WidgetInfo info = WidgetBrowser.xml2ModWidgetInfo(widgetXml);
                list.Add( info.id, info);
            }
            return list;
        }
        /*
         * Merges another list into this list
         */
        public void mergeAnotherList(WidgetList blist)
        {
            IDictionaryEnumerator ienum = blist.GetEnumerator();

            while (ienum.MoveNext())
            {
                int key = (int)ienum.Key;

                WidgetInfo info = (WidgetInfo)ienum.Value;
                if ( !this.ContainsKey(key))
                {
                    this.Add( key, info);
                }
            }
        }