Пример #1
0
 public int FindOverlay(SlideOverlay slideOverlay)
 {
     lock (this) {
         if (overlaysRev.ContainsKey(slideOverlay))
         {
             return(overlaysRev[slideOverlay]);
         }
         return(-1);
     }
 }
Пример #2
0
 private void SetOverlay(int index, SlideOverlay overlay)
 {
     if (overlays.ContainsKey(index))
     {
         if (overlaysRev.ContainsKey(overlays[index]))
         {
             overlaysRev.Remove(overlays[index]);
         }
         overlays.Remove(index);
     }
     overlays.Add(index, overlay);
     overlaysRev.Add(overlays[index], index);
     if (!slides.ContainsKey(index))
     {
         slides.Add(index, slidesByAccess.AddFirst(new Slide()));
         slidesRev.Add(slides[index].Value, index);
     }
 }