当前位置: 首页>>代码示例>>C#>>正文


C# Shape.Invalidate方法代码示例

本文整理汇总了C#中Shape.Invalidate方法的典型用法代码示例。如果您正苦于以下问题:C# Shape.Invalidate方法的具体用法?C# Shape.Invalidate怎么用?C# Shape.Invalidate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shape的用法示例。


在下文中一共展示了Shape.Invalidate方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DoInvalidateShape

		private void DoInvalidateShape(IDiagramPresenter diagramPresenter, Shape shape, bool invalidateGrips)
		{
			if (shape.Parent != null)
				DoInvalidateShape(diagramPresenter, shape.Parent, false);
			else {
				shape.Invalidate();
				if (invalidateGrips)
					diagramPresenter.InvalidateGrips(shape, ControlPointCapabilities.All);
			}
		}
开发者ID:stewmc,项目名称:vixen,代码行数:10,代码来源:ConfigFiltersAndPatching-Tools.cs

示例2: SetTemplateShape

		/// <summary>
		/// Set the given shape as the template's shape.
		/// </summary>
		public void SetTemplateShape(Shape newShape)
		{
			if (newShape == null) throw new ArgumentNullException("newShape");
			// buffer the current template shape
			Shape oldShape = workTemplate.Shape;
			if (oldShape != null)
				oldShape.Invalidate();

			// set the new template shape
			newShape.DisplayService = this;
			newShape.Invalidate();
			workTemplate.Shape = newShape;

			TemplateWasChanged = true;
			if (TemplateShapeChanged != null) {
				shapeReplacedEventArgs.Template = workTemplate;
				shapeReplacedEventArgs.OldTemplateShape = oldShape;
				shapeReplacedEventArgs.NewTemplateShape = newShape;
				TemplateShapeChanged(this, shapeReplacedEventArgs);
			}
		}
开发者ID:stewmc,项目名称:vixen,代码行数:24,代码来源:TemplateController.cs

示例3: AddShapeToLayers

 /// <summary>
 /// Associates the given <see cref="T:Dataweb.NShape.Advanced.Shape" /> to all specified layers.
 /// </summary>
 public void AddShapeToLayers(Shape shape, LayerIds layerIds)
 {
     if (shape == null) throw new ArgumentNullException("shape");
     shape.Layers |= layerIds;
     shape.Invalidate();
 }
开发者ID:LudovicT,项目名称:NShape,代码行数:9,代码来源:Diagram.cs

示例4: RemoveShapeFromLayers

 /// <summary>
 /// Disociates the given <see cref="T:Dataweb.NShape.Advanced.Shape" /> to all specified layers.
 /// </summary>
 public void RemoveShapeFromLayers(Shape shape, LayerIds layerIds)
 {
     if (shape == null) throw new ArgumentNullException("shape");
     if (layerIds == LayerIds.None) return;
     if (layerIds == LayerIds.All)
         shape.Layers = LayerIds.None;
     else shape.Layers ^= (shape.Layers & layerIds);
     shape.Invalidate();
 }
开发者ID:LudovicT,项目名称:NShape,代码行数:12,代码来源:Diagram.cs

示例5: ReplaceCore

        /// <override></override>
        protected override void ReplaceCore(Shape oldShape, Shape newShape)
        {
            base.ReplaceCore(oldShape, newShape);
            oldShape.Diagram = null;
            oldShape.Invalidate();
            oldShape.DisplayService = null;
            newShape.Diagram = owner;
            newShape.DisplayService = owner.DisplayService;
            newShape.Invalidate();

            CheckOwnerboundsUpdateNeeded(oldShape);
            CheckOwnerboundsUpdateNeeded(newShape);
            if (shapeCounter > 0) --shapeCounter;
            if (shapeCounter == 0) DoUpdateOwnerBounds();
        }
开发者ID:LudovicT,项目名称:NShape,代码行数:16,代码来源:Diagram.cs

示例6: RemoveCore

        /// <override></override>
        protected override bool RemoveCore(Shape shape)
        {
            bool result = base.RemoveCore(shape);
            shape.Invalidate();
            shape.DisplayService = null;
            shape.Diagram = null;

            CheckOwnerboundsUpdateNeeded(shape);
            if (shapeCounter > 0) --shapeCounter;
            if (shapeCounter == 0) DoUpdateOwnerBounds();

            return result;
        }
开发者ID:LudovicT,项目名称:NShape,代码行数:14,代码来源:Diagram.cs

示例7: InsertCore

        /// <override></override>
        protected override int InsertCore(int index, Shape shape)
        {
            int result = base.InsertCore(index, shape);
            shape.Diagram = owner;
            shape.DisplayService = owner.DisplayService;
            shape.Invalidate();

            CheckOwnerboundsUpdateNeeded(shape);
            if (shapeCounter > 0) --shapeCounter;
            if (shapeCounter == 0) DoUpdateOwnerBounds();

            return result;
        }
开发者ID:LudovicT,项目名称:NShape,代码行数:14,代码来源:Diagram.cs

示例8: DeletePreviewShape

		/// <summary>
		/// Disconnect, disposes and deletes the given preview <see cref="T:Dataweb.NShape.Advanced.Shape" />.
		/// </summary>
		/// <param name="shape"></param>
		protected void DeletePreviewShape(ref Shape shape) {
			if (shape != null) {
				// Disconnect all existing connections (disconnects model, too)
				foreach (ControlPointId pointId in shape.GetControlPointIds(ControlPointCapabilities.Connect | ControlPointCapabilities.Glue)) {
					ControlPointId otherPointId = shape.IsConnected(pointId, null);
					if (otherPointId != ControlPointId.None) shape.Disconnect(pointId);
				}
				// Delete model obejct
				if (shape.ModelObject != null)
					shape.ModelObject = null;
				// Delete shape
				shape.Invalidate();
				shape.Dispose();
				shape = null;
			}
		}
开发者ID:jestonitiro,项目名称:nshape,代码行数:20,代码来源:Tool.cs

示例9: RemovePreview

		private void RemovePreview(Shape previewShape) {
			Shape origShape = null;
			if (!originalShapes.TryGetValue(previewShape, out origShape))
				throw new NShapeInternalException("This preview shape has no associated original shape in this tool.");
			else {
				// Invalidate Preview Shape
				previewShape.Invalidate();
				// Remove both, original- and preview shape from the appropriate dictionaries
				previewShapes.Remove(origShape);
				originalShapes.Remove(previewShape);
			}
		}
开发者ID:jestonitiro,项目名称:nshape,代码行数:12,代码来源:Tool.cs


注:本文中的Shape.Invalidate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。