Exemple #1
0
 public SegmentMouseAction(UserRegionViewController controller, int originalVertexIndex, Point clickedPoint)
 {
     this.controller          = controller;
     this.originalVertexIndex = originalVertexIndex;
     menuIncarnationCounter++;
     menuIncarnation   = menuIncarnationCounter;
     this.clickedPoint = clickedPoint;
 }
Exemple #2
0
 public void SetBaseLayer(IDisplayableSource tileSource)
 {
     this.baseLayer = new DisplayableSourceCache(tileSource);
     this.SetCreditString(tileSource.GetRendererCredit());
     this.latentRegionHolder       = null;
     this.userRegionViewController = null;
     this.InvalidateView();
 }
			public SegmentMouseAction(UserRegionViewController controller, int originalVertexIndex, Point clickedPoint)
			{
				this.controller = controller;
				this.originalVertexIndex = originalVertexIndex;
				UserRegionViewController.SegmentMouseAction.menuIncarnationCounter++;
				this.menuIncarnation = UserRegionViewController.SegmentMouseAction.menuIncarnationCounter;
				this.clickedPoint = clickedPoint;
			}
Exemple #4
0
 private void UpdateUserRegion()
 {
     if (this.userRegionViewController == null && this.latentRegionHolder != null)
     {
         this.userRegionViewController = new UserRegionViewController(this.GetCoordinateSystem(), this, this.latentRegionHolder, this.baseLayer);
         this.InvalidateView();
     }
 }
Exemple #5
0
 private void UpdateUserRegion()
 {
     if (userRegionViewController == null && latentRegionHolder != null)
     {
         userRegionViewController = new UserRegionViewController(GetCoordinateSystem(),
                                                                 this,
                                                                 latentRegionHolder,
                                                                 baseLayer);
         InvalidateView();
     }
 }
Exemple #6
0
 public VertexMouseAction(UserRegionViewController controller, int draggedVertexIndex)
 {
     this.controller         = controller;
     this.draggedVertexIndex = draggedVertexIndex;
 }
Exemple #7
0
 public void SetLatentRegionHolder(LatentRegionHolder latentRegionHolder)
 {
     this.latentRegionHolder       = latentRegionHolder;
     this.userRegionViewController = null;
     this.InvalidateView();
 }
 public VertexMouseAction(UserRegionViewController controller, int draggedVertexIndex)
 {
     this.controller = controller;
     this.draggedVertexIndex = draggedVertexIndex;
 }
 public State(UserRegionViewController.State state)
 {
     this.center = state.center;
     this.size = new Size(state.size.Width, state.size.Height);
     this.valid = state.valid;
 }
 private void UpdateState(UserRegionViewController.State state)
 {
     if (state.Equals(this.lastState))
     {
         return;
     }
     TracedScreenPoint[] path = this.GetUserRegion().GetPath(CoordinateSystemUtilities.GetBounds(this.csi, state.center, state.size), state.center.zoom, this.csi);
     List<TracedScreenPoint> list = new List<TracedScreenPoint>();
     int length = path.GetLength(0);
     for (int i = 0; i < length; i++)
     {
         D.Assert(path[i].originalIndex >= 0);
         int num = (i + length - 1) % length;
         if (!(path[num].pointf == path[i].pointf))
         {
             list.Add(path[i]);
         }
     }
     list.ToArray();
     int count = list.Count;
     List<UserRegionViewController.ClickableThing> list2 = new List<UserRegionViewController.ClickableThing>();
     List<UserRegionViewController.ClickableThing> list3 = new List<UserRegionViewController.ClickableThing>();
     for (int j = 0; j < count; j++)
     {
         UserRegionViewController.ClickableThing clickableThing = new UserRegionViewController.ClickableThing();
         list2.Add(clickableThing);
         clickableThing.vertexLocation = list[j];
         clickableThing.path = new GraphicsPath();
         clickableThing.path.AddEllipse(list[j].pointf.X - 4f, list[j].pointf.Y - 4f, 8f, 8f);
         clickableThing.clickedWhich = UserRegionViewController.ClickableThing.ClickedWhich.Vertex;
         clickableThing.pointIndex = j;
         UserRegionViewController.ClickableThing clickableThing2 = new UserRegionViewController.ClickableThing();
         list3.Add(clickableThing2);
         clickableThing2.vertexLocation = list[j];
         clickableThing2.path = new GraphicsPath();
         clickableThing2.path.AddLine(list[j].pointf, list[(j + 1) % count].pointf);
         clickableThing2.path.Widen(new Pen(Color.Black, 4f));
         clickableThing2.clickedWhich = UserRegionViewController.ClickableThing.ClickedWhich.Segment;
         clickableThing2.pointIndex = j;
     }
     list2.AddRange(list3);
     this.clickableThings = list2.ToArray();
     this.lastState = new UserRegionViewController.State(state);
 }
Exemple #11
0
 public void SetLatentRegionHolder(LatentRegionHolder latentRegionHolder)
 {
     this.latentRegionHolder = latentRegionHolder;
     this.userRegionViewController = null;
     this.InvalidateView();
 }
Exemple #12
0
 public void SetBaseLayer(IDisplayableSource tileSource)
 {
     this.baseLayer = new DisplayableSourceCache(tileSource);
     this.SetCreditString(tileSource.GetRendererCredit());
     this.latentRegionHolder = null;
     this.userRegionViewController = null;
     this.InvalidateView();
 }
Exemple #13
0
 private void UpdateUserRegion()
 {
     if (this.userRegionViewController == null && this.latentRegionHolder != null)
     {
         this.userRegionViewController = new UserRegionViewController(this.GetCoordinateSystem(), this, this.latentRegionHolder, this.baseLayer);
         this.InvalidateView();
     }
 }