コード例 #1
0
		protected override void OnAnnotationGraphicChanged(AnnotationGraphic oldAnnotationGraphic, AnnotationGraphic annotationGraphic)
		{
			if (oldAnnotationGraphic != null)
			{
				var pointsGraphic = oldAnnotationGraphic.Subject as IPointsGraphic;
				if (pointsGraphic != null)
				{
					pointsGraphic.Points.PointAdded -= OnPolygonGraphicClosed;
					pointsGraphic.Points.PointChanged -= OnPolygonGraphicClosed;
					pointsGraphic.Points.PointRemoved -= OnPolygonGraphicClosed;
					pointsGraphic.Points.PointsCleared -= OnPolygonGraphicClosed;
				}
			}

			base.OnAnnotationGraphicChanged(oldAnnotationGraphic, annotationGraphic);

			if (annotationGraphic != null)
			{
				var pointsGraphic = annotationGraphic.Subject as IPointsGraphic;
				if (pointsGraphic != null)
				{
					pointsGraphic.Points.PointAdded += OnPolygonGraphicClosed;
					pointsGraphic.Points.PointChanged += OnPolygonGraphicClosed;
					pointsGraphic.Points.PointRemoved += OnPolygonGraphicClosed;
					pointsGraphic.Points.PointsCleared += OnPolygonGraphicClosed;
				}
			}
		}
コード例 #2
0
 /// <summary>
 /// Sets the <see cref="AnnotationGraphic"/> that owns this strategy.
 /// </summary>
 public void SetAnnotationGraphic(AnnotationGraphic annotationGraphic)
 {
     if (_annotationGraphic != annotationGraphic)
     {
         var oldAnnotationGraphic = _annotationGraphic;
         _annotationGraphic = annotationGraphic;
         OnAnnotationGraphicChanged(oldAnnotationGraphic, annotationGraphic);
     }
 }
コード例 #3
0
		protected override void OnAnnotationGraphicChanged(AnnotationGraphic oldAnnotationGraphic, AnnotationGraphic annotationGraphic)
		{
			base.OnAnnotationGraphicChanged(oldAnnotationGraphic, annotationGraphic);
			if (_firstCalculation)
				base.Callout.Visible = false;
		}
コード例 #4
0
 /// <summary>
 /// Called when the <see cref="AnnotationGraphic"/> changes.
 /// </summary>
 /// <param name="oldAnnotationGraphic">The former value of <see cref="AnnotationGraphic"/>.</param>
 /// <param name="annotationGraphic">The new value of <see cref="AnnotationGraphic"/>.</param>
 protected virtual void OnAnnotationGraphicChanged(AnnotationGraphic oldAnnotationGraphic, AnnotationGraphic annotationGraphic)
 {
 }
コード例 #5
0
		/// <summary>
		/// Cloning constructor.
		/// </summary>
		protected AnnotationGraphic(AnnotationGraphic source, ICloningContext context)
			: base(source, context)
		{
			context.CloneFields(source, this);
		}
コード例 #6
0
ファイル: AnnotationGraphic.cs プロジェクト: bangush/server-1
 /// <summary>
 /// Cloning constructor.
 /// </summary>
 protected AnnotationGraphic(AnnotationGraphic source, ICloningContext context)
     : base(source, context)
 {
     context.CloneFields(source, this);
 }
コード例 #7
0
		/// <summary>
		/// Sets the <see cref="AnnotationGraphic"/> that owns this strategy.
		/// </summary>
		public void SetAnnotationGraphic(AnnotationGraphic annotationGraphic)
		{
			if (_annotationGraphic != annotationGraphic)
			{
				var oldAnnotationGraphic = _annotationGraphic;
				_annotationGraphic = annotationGraphic;
				OnAnnotationGraphicChanged(oldAnnotationGraphic, annotationGraphic);
			}
		}
コード例 #8
0
		/// <summary>
		/// Called when the <see cref="AnnotationGraphic"/> changes.
		/// </summary>
		/// <param name="oldAnnotationGraphic">The former value of <see cref="AnnotationGraphic"/>.</param>
		/// <param name="annotationGraphic">The new value of <see cref="AnnotationGraphic"/>.</param>
		protected virtual void OnAnnotationGraphicChanged(AnnotationGraphic oldAnnotationGraphic, AnnotationGraphic annotationGraphic) {}