Exemplo n.º 1
0
 public static void ChangeLabelForSlide(SlideModel slide, string text)
 {
     if (dictionary_ == null)
     {
         dictionary_ = new Dictionary <SlideModel, StatusLabel>();
     }
     if (!dictionary_.ContainsKey(slide))
     {
         StatusLabel label = new StatusLabel(slide, text);
         dictionary_[slide] = label;
         using (Synchronizer.Lock(slide.SyncRoot)) {
             slide.AnnotationSheets.Add(label);
         }
     }
     else
     {
         StatusLabel label = dictionary_[slide];
         using (Synchronizer.Lock(label.SyncRoot)) {
             label.Text = text;
         }
     }
 }
Exemplo n.º 2
0
 public static void ChangeLabelForSlide(SlideModel slide, string text)
 {
     if (dictionary_ == null) {
         dictionary_ = new Dictionary<SlideModel, StatusLabel>();
     }
     if (!dictionary_.ContainsKey(slide)) {
         StatusLabel label = new StatusLabel(slide, text);
         dictionary_[slide] = label;
         using (Synchronizer.Lock(slide.SyncRoot)) {
             slide.AnnotationSheets.Add(label);
         }
     }else{
         StatusLabel label = dictionary_[slide];
         using (Synchronizer.Lock(label.SyncRoot)) {
             label.Text = text;
         }
     }
 }