Example #1
0
        static public DialogResult ShowEndTourPopupModal(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;
            }
            Cursor.Show();
            endTour.TourResult = tourResult;
            return(endTour.ShowDialog());
        }
Example #2
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();
            }
        }
 public static void CloseTourPopups()
 {
     if (endTour != null)
     {
         endTour.Close();
         endTour = null;
     }
 }
Example #4
0
 static public void CloseTourPopups()
 {
     if (endTour != null)
     {
         endTour.Close();
         endTour = null;
     }
 }
Example #5
0
        void popup_LaunchTour(object sender, EventArgs e)
        {
            ITourResult result = popup.TourResult;

            popup.Close();
            popup.Dispose();
            popup = null;
            LaunchTour(result);
        }
        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();
            }
        }
 void popup_LaunchTour(object sender, EventArgs e)
 {
     if (popup == null)
     {
         return;
     }
     var result = popup.TourResult;
     popup.Close();
     popup.Dispose();
     popup = null;
     LaunchTour(result);
 }