Exemple #1
0
 private void ClearChildren()
 {
     folders.Clear();
     tours.Clear();
     places.Clear();
     Imagesets.Clear();
 }
Exemple #2
0
        //public static Folder LoadFromXML(XmlNode node)
        //{
        //    Folder temp = new Folder();

        //    temp.ParseXML(node);

        //    return temp;
        //}

        private void ParseXML(XmlNode node)
        {
            if (node.Attributes.GetNamedItem("Name") != null)
            {
                nameField = node.Attributes.GetNamedItem("Name").Value;
            }
            else
            {
                nameField = "";
            }
            if (node.Attributes.GetNamedItem("Url") != null)
            {
                urlField = node.Attributes.GetNamedItem("Url").Value;
            }

            if (node.Attributes.GetNamedItem("Thumbnail") != null)
            {
                thumbnailUrlField = node.Attributes.GetNamedItem("Thumbnail").Value;
            }

            // load Children

            foreach (XmlNode child in node.ChildNodes)
            {
                switch (child.Name)
                {
                case "Folder":
                    Folder temp = new Folder();
                    temp.Parent = this;
                    //if (Parent != null && IsProxy)
                    //{
                    //    temp.Parent = Parent.Parent;
                    //}
                    temp.ParseXML(child);
                    folders.Add(temp);
                    break;

                case "Place":
                    places.Add(Place.FromXml(child));
                    break;

                case "ImageSet":
                    Imagesets.Add(Imageset.FromXMLNode(child));
                    break;

                case "Tour":
                    Tours.Add(Tour.FromXml(child));
                    break;
                }
            }


            //bool Browseable { get; set; }
            //System.Collections.Generic.List<Folder> Folders { get; set; }
            //FolderGroup Group { get; set; }
            //System.Collections.Generic.List<Imageset> Imagesets { get; set; }
            //long MSRCommunityId { get; set; }
            //long MSRComponentId { get; set; }
            //string Name { get; set; }
            //long Permission { get; set; }
            //System.Collections.Generic.List<Place> Places { get; set; }
            //bool ReadOnly { get; set; }
            //string RefreshInterval { get; set; }
            //FolderRefreshType RefreshType { get; set; }
            //bool RefreshTypeSpecified { get; set; }
            //bool Searchable { get; set; }
            //string SubType { get; set; }
            //string ThumbnailUrl { get; set; }
            //System.Collections.Generic.List<Tour> Tours { get; set; }
            //FolderType Type { get; set; }
            //string Url { get; set; }
        }