public static IThumbnail GetDataSetsAsFolder()
        {
            ThumbMenuNode parent = new ThumbMenuNode();

            parent.Name = Language.GetLocalizedText(646, "Collections");

            Dictionary <string, DataSet> dataSets = DataSetManager.GetDataSets();

            foreach (DataSet d in dataSets.Values)
            {
                // Todo Change this to exploere earth, moon etc.
                if (d.Sky == true)
                {
                    if (d != null)
                    {
                        Dictionary <string, Places> placesList = d.GetPlaces();
                        foreach (Places places in placesList.Values)
                        {
                            if (places != null && places.Browseable)
                            {
                                parent.AddChild(places);
                            }
                        }
                    }
                }
            }
            return(parent);
        }
示例#2
0
        private void LoadTopLevel()
        {
            BrowseList.Clear();
            exploreText.Text = "Collections";
            topLevel         = true;
            if (!Directory.Exists(Properties.Settings.Default.CahceDirectory + @"thumbnails\"))
            {
                Directory.CreateDirectory(Properties.Settings.Default.CahceDirectory + @"thumbnails\");
            }

            AddCollectionFolders();

            ArrayList dataSets = DataSetManager.GetDataSets();

            foreach (DataSet d in dataSets)
            {
                // Todo Change this to exploere earth, moon etc.
                if (d.Sky == true)
                {
                    if (d != null)
                    {
                        ArrayList placesList = d.GetPlaces();
                        foreach (Places places in placesList)
                        {
                            if (places != null && places.Browseable)
                            {
                                ThumbMenuNode node = new ThumbMenuNode();
                                node.Name   = places.Name;
                                node.Places = places;

                                //string filename = places.ThumbnailUrl.Substring(places.ThumbnailUrl.LastIndexOf("/") + 1);
                                //DataSetManager.DownloadFile(places.ThumbnailUrl, Properties.Settings.Default.CahceDirectory + @"thumbnails\" + filename, true);

                                //node.ThumbNail = UiTools.LoadBitmap(Properties.Settings.Default.CahceDirectory + @"thumbnails\" + filename);
                                node.ThumbNail = UiTools.LoadThumbnailFromWeb(places.ThumbnailUrl);
                                BrowseList.Add(node);
                            }
                        }
                    }
                }
            }
            Refresh();
        }
        public static IThumbnail GetDataSetsAsFolder()
        {
            var parent = new ThumbMenuNode {Name = Language.GetLocalizedText(646, "Collections")};

            var ds = GetDataSets();
            foreach (var d in ds.Values)
            {
                // Todo Change this to exploere earth, moon etc.
                if (d.Sky == true)
                {
                        var placesList = d.GetPlaces();
                        foreach (var places in placesList.Values)
                        {
                            if (places != null && places.Browseable)
                            {
                                parent.AddChild(places);
                            }
                        }
                }
            }
            return parent;
        }
示例#4
0
        private void LoadTopLevel()
        {
            BrowseList.Clear();
            exploreText.Text = "Collections";
            topLevel = true;
            if (!Directory.Exists(Properties.Settings.Default.CahceDirectory + @"thumbnails\"))
            {
                Directory.CreateDirectory(Properties.Settings.Default.CahceDirectory + @"thumbnails\");
            }

            AddCollectionFolders();

            ArrayList dataSets = DataSetManager.GetDataSets();
            foreach (DataSet d in dataSets)
            {
                // Todo Change this to exploere earth, moon etc.
                if (d.Sky == true)
                {
                    if (d != null)
                    {
                        ArrayList placesList = d.GetPlaces();
                        foreach (Places places in placesList)
                        {
                            if (places != null && places.Browseable)
                            {
                                ThumbMenuNode node = new ThumbMenuNode();
                                node.Name = places.Name;
                                node.Places = places;

                                //string filename = places.ThumbnailUrl.Substring(places.ThumbnailUrl.LastIndexOf("/") + 1);
                                //DataSetManager.DownloadFile(places.ThumbnailUrl, Properties.Settings.Default.CahceDirectory + @"thumbnails\" + filename, true);

                                //node.ThumbNail = UiTools.LoadBitmap(Properties.Settings.Default.CahceDirectory + @"thumbnails\" + filename);
                                node.ThumbNail = UiTools.LoadThumbnailFromWeb(places.ThumbnailUrl);
                                BrowseList.Add(node);
                            }
                        }
                    }
                }
            }
            Refresh();
        }
        public static IThumbnail GetDataSetsAsFolder()
        {
            ThumbMenuNode parent = new ThumbMenuNode();

            parent.Name = Language.GetLocalizedText(646, "Collections");

            Dictionary<string, DataSet> dataSets = DataSetManager.GetDataSets();
            foreach (DataSet d in dataSets.Values)
            {
                // Todo Change this to exploere earth, moon etc.
                if (d.Sky == true)
                {
                    if (d != null)
                    {
                        Dictionary<string, Places> placesList = d.GetPlaces();
                        foreach (Places places in placesList.Values)
                        {
                            if (places != null && places.Browseable)
                            {
                                parent.AddChild(places);
                            }
                        }
                    }
                }
            }
            return parent;
        }