Exemplo n.º 1
0
        private void resultsList_ItemHover(object sender, object e)
        {
            if (popup != null)
            {
                if (e != null || !popup.Locked)
                {
                    if (!popup.Bounds.Contains(Cursor.Position))
                    {
                        popup.Close();
                        popup.Dispose();
                        popup = null;
                    }
                }
            }

            //if (e != null && e.GetType() == typeof(TourResult))
            if (e != null && ((IThumbnail)e).IsTour)
            {
                popup             = new TourPopup();
                popup.Owner       = Earth3d.MainWindow;
                popup.TourResult  = (ITourResult)e;
                popup.Left        = popup.TourResult.Bounds.Left;
                popup.Top         = popup.TourResult.Bounds.Bottom - 10;
                popup.LaunchTour += new EventHandler(popup_LaunchTour);
                popup.Show();
            }
        }
Exemplo n.º 2
0
        static public TourPopup ShowEndTourPopup(TourDocument tour)
        {
            CloseTourPopups();
            if (endTour != null)
            {
                endTour.Close();
                endTour = null;
            }

            endTour           = new TourPopup();
            endTour.PopupType = TourPopup.PopupTypes.TourOver;
            Tour tourResult = FolderBrowser.GetRelatedTour(tour.Id);

            if (tourResult == null)
            {
                tourResult = FolderBrowser.GetRelatedTour(tour.TagId);
            }

            if (tourResult == null)
            {
                tourResult                   = new Tour();
                tourResult.Author            = tour.Author;
                tourResult.Id                = tour.Id;
                tourResult.AuthorUrl         = tour.AuthorUrl;
                tourResult.Description       = tour.Description;
                tourResult.AuthorImage       = tour.AuthorImage;
                tourResult.OrgName           = tour.OrgName;
                tourResult.OrganizationUrl   = tour.OrgUrl;
                tourResult.Title             = tour.Title;
                tourResult.AverageUserRating = 3;
            }
            endTour.TourResult = tourResult;
            endTour.Show();
            return(endTour);
        }
        public static TourPopup ShowEndTourPopup(TourDocument tour)
        {
            CloseTourPopups();
            if (endTour != null)
            {
                endTour.Close();
                endTour = null;
            }

            endTour = new TourPopup();
            endTour.PopupType = TourPopup.PopupTypes.TourOver;
            Tour tourResult = FolderBrowser.GetRelatedTour(tour.Id);
            if (tourResult == null)
            {
                tourResult = FolderBrowser.GetRelatedTour(tour.TagId);
            }

            if (tourResult == null)
            {
                tourResult = new Tour();
                tourResult.Author = tour.Author;
                tourResult.Id = tour.Id;
                tourResult.AuthorUrl = tour.AuthorUrl;
                tourResult.Description = tour.Description;
                tourResult.AuthorImage = tour.AuthorImage;
                tourResult.OrgName = tour.OrgName;
                tourResult.OrganizationUrl = tour.OrgUrl;
                tourResult.Title = tour.Title;
                tourResult.AverageUserRating = 3;
            }
            endTour.TourResult = tourResult;
            endTour.Show();
            return endTour;
        }
        private void TourItemHover(object sender, object e)
        {
            if (popup != null)
            {
                if (e != null || !popup.Locked)
                {
                    if (!popup.Bounds.Contains(Cursor.Position))
                    {
                        popup.Close();
                        popup.Dispose();
                        popup = null;
                    }
                }
            }

            //if (e != null && e.GetType() == typeof(TourResult))
            if (e != null && ((IThumbnail)e).IsTour)
            {
                popup = new TourPopup();
                popup.Owner = Earth3d.MainWindow;
                popup.TourResult = (ITourResult)e;
                popup.Left = popup.TourResult.Bounds.Left;
                popup.Top = popup.TourResult.Bounds.Bottom - 10;
                popup.LaunchTour += popup_LaunchTour;
                popup.Show();
            }
        }