Пример #1
0
 /// <summary>
 /// 绘制对象
 /// </summary>
 /// <param name="msg"></param>
 public sealed override void Redraw(Msger msg)
 {
     if (!MatchUtils.IsEmpty(this.Target) && !MatchUtils.IsEmpty(this.Target.Netmap) && !MatchUtils.IsEmpty(this.Facade) && this.Target.Enable && this.Enable)
     {
         if (MatchUtils.IsEmpty(msg))
         {
             this.Redraw();
         }
         else
         {
             if (!MatchUtils.IsEmpty(this.handle))
             {
                 // Swap Event.
                 if (this.Target.Listen.ZoomEvent.Equals(msg.Chan))
                 {
                     this.Redraw(); return;
                 }
                 // Swap Event.
                 if (this.Target.Listen.SwapEvent.Equals(msg.Chan))
                 {
                     if (!(msg.Info as Geog).Cover)
                     {
                         this.Redraw();
                     }
                 }
             }
         }
     }
 }
Пример #2
0
 public sealed override void Redraw(Msger msg)
 {
     if (!MatchUtils.IsEmpty(this.Target) && this.Target.Enable && this.Enable)
     {
         if (MatchUtils.IsEmpty(msg))
         {
             this.Redraw();
         }
     }
 }
Пример #3
0
 /// <summary>
 /// 控件重绘函数
 /// </summary>
 /// <param name="msg"></param>
 public sealed override void Redraw(Msger msg)
 {
     if (!MatchUtils.IsEmpty(this.Target) && this.Target.Enable && this.Enable)
     {
         if (MatchUtils.IsEmpty(msg))
         {
             this.Redraw();
         }
         else
         {
             if (!MatchUtils.IsEmpty(this.Facade) && !MatchUtils.IsEmpty(this.Handle))
             {
                 if (this.Target.Listen.ZoomEvent.Equals(msg.Chan) || this.Target.Listen.SwapEvent.Equals(msg.Chan))
                 {
                     this.Redraw();
                 }
             }
         }
     }
 }
Пример #4
0
 public sealed override void Redraw(Msger msg)
 {
 }
Пример #5
0
 /// <summary>
 /// 图层重绘函数
 /// </summary>
 /// <param name="msg">重绘消息</param>
 public abstract void Redraw(Msger msg);
Пример #6
0
 /// <summary>
 /// 图层重绘函数
 /// </summary>
 /// <param name="msg">重绘消息</param>
 public sealed override void Redraw(Msger msg)
 {
     if (!MatchUtils.IsEmpty(this.Target) && this.Target.Enable && this.Enable && !MatchUtils.IsEmpty(this.Facade))
     {
         if (MatchUtils.IsEmpty(msg))
         {
             this.Redraw();
         }
         else
         {
             // Drag Event.
             if (this.Target.Listen.DragEvent.Equals(msg.Chan))
             {
                 if (this.Allow && !MatchUtils.IsEmpty(this.Nature))
                 {
                     if (this.Extent.Contain(this.Target, msg.Info as Coord))
                     {
                         this.Build(this.Crd2px(msg.Info as Coord));
                     }
                     else
                     {
                         this.Facade.Dispatcher.BeginInvoke(new Action(() =>
                         {
                             this.Facade.Children.Clear();
                         }));
                     }
                 }
                 return;
             }
             // Zoom Event.
             if (this.Target.Listen.ZoomEvent.Equals(msg.Chan))
             {
                 if (this.Allow)
                 {
                     if ((this.Level = this.Fusion(this.Target)) > -1)
                     {
                         Pixel middle = this.Crd2px(this.Target.Center);
                         if (!MatchUtils.IsEmpty(this.Nature))
                         {
                             // 缩略地图
                             this.Thumb((double)msg.Info, new Pixel(
                                            middle.X / (double)msg.Info - this.Nature.X,
                                            middle.Y / (double)msg.Info - this.Nature.Y
                                            ));
                             // 地图属性
                             this.Grasp(middle, this.Nature);
                         }
                         else
                         {
                             // 地图属性
                             this.Grasp(middle, this.Nature = new Nature());
                         }
                         // 延时重绘
                         if (this.Extent.Contain(this.Target, this.Target.Center))
                         {
                             this.Target.Thread.Attach(new MagicThread(StampUtils.GetSequence(), () =>
                             {
                                 {
                                     Thread.Sleep(700);
                                 }
                                 this.Build(this.Crd2px(this.Target.Center));
                             }));
                         }
                     }
                     else
                     {
                         if (!MatchUtils.IsEmpty(this.Nature))
                         {
                             this.Nature = null;
                             {
                                 this.Facade.Dispatcher.BeginInvoke(new Action(() =>
                                 {
                                     this.Facade.Children.Clear();
                                 }));
                             }
                         }
                     }
                 }
                 return;
             }
             // Swap Event.
             if (this.Target.Listen.SwapEvent.Equals(msg.Chan))
             {
                 Geog geog = msg.Info as Geog;
                 if (!geog.Cover || this.Equals(geog))
                 {
                     this.Redraw();
                 }
             }
         }
     }
 }
Пример #7
0
 public sealed override void Redraw(Msger msg)
 {
     throw new NotImplementedException();
 }