Inheritance: System.EventArgs
Exemple #1
0
 void ZoomHelper_ZoomCompleted(object sender, ZoomAnimationEventArgs e)
 {
     Rectangle2D old = ViewBounds;
     if (MapManipulator == MapManipulator.Program)
     {
         this.MapStatus = MapStatus.ZoomCompleted;
     }
     Point2D origin = new Point2D(e.NowCenter.X - currentSize.Width / 2 * targetResolution, e.NowCenter.Y + currentSize.Height / 2 * targetResolution);
     SetOriginAndResolution(targetResolution, origin, true);
     Rectangle2D bounds = ViewBounds;
     this.LoadLayersInView(false, bounds);
     if (this.MapStatus == MapStatus.ZoomCompleted)
     {
         RaiseViewBoundsChanged();
     }
     else
     {
         RaiseViewBoundsChanging(new ViewBoundsEventArgs(old, ViewBounds));
     }
     if (MapManipulator == MapManipulator.Program)
     {
         this.MapStatus = MapStatus.Still;
         this.MapManipulator = MapManipulator.None;
     }
     else if (MapManipulator == MapManipulator.Device && MapStatus == MapStatus.ZoomCompleted)
     {
         MapStatus = MapStatus.Still;
         MapManipulator = MapManipulator.None;
     }
 }
Exemple #2
0
 void ZoomHelper_Zooming(object sender, ZoomAnimationEventArgs e)
 {
     if (MapManipulator == MapManipulator.Program)
     {
         this.MapStatus = MapStatus.Zooming;
     }
     Rectangle2D old = ViewBounds;
     Point2D origin = new Point2D(e.NowCenter.X - currentSize.Width / 2 * e.NowResolution, e.NowCenter.Y + currentSize.Height / 2 * e.NowResolution);
     SetOriginAndResolution(e.NowResolution, origin, false);
     this.LoadLayersInView(false, ViewBounds);
     RaiseViewBoundsChanging(new ViewBoundsEventArgs(old, ViewBounds));
 }