Beispiel #1
0
        public static Image GetImage(Annotation a)
        {
            int imageIndex = LabyrinthData.GetImageIndex(a);

            if (imageIndex != -1)
            {
                return(LabyrinthData.ElementImages.Images[imageIndex]);
            }
            return((Image)null);
        }
Beispiel #2
0
 public static int GetImageIndex(object obj)
 {
     if (obj is ElementPage)
     {
         return(LabyrinthData.GetImageIndex((obj as ElementPage).Element.Type));
     }
     if (obj is Element)
     {
         return(LabyrinthData.GetImageIndex((obj as Element).Type));
     }
     if (obj is AnnotationPage)
     {
         return(14);
     }
     if (obj is Annotation)
     {
         return(LabyrinthData.GetImageIndex(obj as Annotation));
     }
     if (obj is Labyrinth.Plot.Link)
     {
         return(17);
     }
     if (obj is Structure || obj is StructurePage)
     {
         return(18);
     }
     if (obj is Timeline || obj is TimelinePage)
     {
         return(19);
     }
     if (obj is SearchPage)
     {
         return(20);
     }
     if (obj is TaskPage)
     {
         return(21);
     }
     if (obj is Task)
     {
         return(LabyrinthData.GetImageIndex(obj as Task));
     }
     if (obj is CalendarPage)
     {
         return(24);
     }
     if (obj is Note || obj is NotePage)
     {
         return(25);
     }
     return(obj is IPage ? 26 : 0);
 }