예제 #1
0
		private void OnCloneComplete()
		{
			_textControlGraphic = (CollectionUtils.SelectFirst(base.Graphics,
			                                                   delegate(IGraphic test) { return test.Name == "Text"; }) as IControlGraphic);

			_pointControlGraphic = (CollectionUtils.SelectFirst(base.Graphics,
			                                                    delegate(IGraphic test) { return test.Name == "Point"; }) as IControlGraphic);

			_lineGraphic = CollectionUtils.SelectFirst(base.Graphics,
			                                           delegate(IGraphic test) { return test.Name == "Line"; }) as ArrowGraphic;

			Platform.CheckForNullReference(_lineGraphic, "_lineGraphic");
			Platform.CheckForNullReference(_pointControlGraphic, "_pointControlGraphic");
			Platform.CheckForNullReference(_textControlGraphic, "_textControlGraphic");

			Initialize();
		}
예제 #2
0
파일: ArrowGraphic.cs 프로젝트: nhannd/Xian
		/// <summary>
		/// Cloning constructor.
		/// </summary>
		protected ArrowGraphic(ArrowGraphic source, ICloningContext context)
		{
			context.CloneFields(source, this);
		}
예제 #3
0
		private void Initialize()
		{
			if (_textControlGraphic == null)
			{
				_textControlGraphic = InitializeTextControlGraphic(new InvariantTextPrimitive());
				_textControlGraphic.Name = "Text";
				_textControlGraphic.Color = System.Drawing.Color.Yellow;
				this.Graphics.Add(_textControlGraphic);
			}

			this.TextGraphic.VisualStateChanged += OnTextVisualStateChanged;

			if (_pointControlGraphic == null)
			{
				_pointControlGraphic = InitializePointControlGraphic(new AnchorPointGraphic());
				_pointControlGraphic.Name = "Point";
				this.Graphics.Add(_pointControlGraphic);
			}

			if (_lineGraphic == null)
			{
				_lineGraphic = new ArrowGraphic(false);
				_lineGraphic.Name = "Line";
				_lineGraphic.Color = System.Drawing.Color.Yellow;
				_lineGraphic.LineStyle = LineStyle.Dash;
				this.Graphics.Add(_lineGraphic);
			}
		}
예제 #4
0
 /// <summary>
 /// Cloning constructor.
 /// </summary>
 protected ArrowGraphic(ArrowGraphic source, ICloningContext context)
 {
     context.CloneFields(source, this);
 }