Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PixelScrollAxis"/> class.
 /// </summary>
 /// <param name="sb">The scrollbar state.</param>
 /// <param name="scrollLinesHost">The scroll lines host.</param>
 /// <param name="distancesHost">The distances host.</param>
 public PixelScrollAxis(IScrollBar sb, ILineSizeHost scrollLinesHost, IDistancesHost distancesHost)
     : base(sb, scrollLinesHost)
 {
     if (distancesHost != null)
     {
         this.distancesHost = distancesHost;
     }
     else if (scrollLinesHost != null)
     {
         this.distances = new DistanceRangeCounterCollection
         {
             DefaultDistance = scrollLinesHost.GetDefaultLineSize()
         };
         scrollLinesHost.InitializeScrollAxis(this);
     }
     if (Distances == null)
     {
         throw new ArgumentNullException("Distances");
     }
 }