Beispiel #1
0
 /// <summary>
 /// Data is guaranteed to be non-null and to be the data which is being
 /// detached. However, its fields may have changed since it was attached.
 /// </summary>
 private void DetachData()
 {
     this.Data.Changed -= new EventHandler(this.HandleDataChanged);
     if (myOverlay != null)
     {
         myOverlay.MylarSizeChanged -= new EventHandler(this.HandleMylarSizeChanged);
         myOverlay.Scrolled         -= new EventHandler(this.HandleMylarScrollValueChanged);
         myOverlay = null;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Data is guaranteed to be non-null and to be the data which is being
 /// attached.
 /// </summary>
 private void AttachData()
 {
     this.Data.Changed += new EventHandler(this.HandleDataChanged);
     if (this.Data.Overlay != null)
     {
         myOverlay = this.Data.Overlay;
         myOverlay.MylarSizeChanged += new EventHandler(this.HandleMylarSizeChanged);
         myOverlay.Scrolled         += new EventHandler(this.HandleMylarScrollValueChanged);
         this.AlignScrollBar();
     }
 }