本文整理汇总了C#中IGroup.Invalidate方法的典型用法代码示例。如果您正苦于以下问题:C# IGroup.Invalidate方法的具体用法?C# IGroup.Invalidate怎么用?C# IGroup.Invalidate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IGroup
的用法示例。
在下文中一共展示了IGroup.Invalidate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Redo
/// <summary>
/// Perform redo of this command.
/// </summary>
public override void Redo() {
//create a new group; use the standard GroupShape or the CollapsibleGroupShape for a painted group with collapse/expand features.
//GroupShape group = new GroupShape(this.Controller.Model);
//CollapsibleGroupShape group = new CollapsibleGroupShape(this.controller.Model);
GroupShape group = new GroupShape(this.controller.Model);
//asign the entities to the group
group.Entities.Clear();
foreach (IDiagramEntity entity in bundle.Entities) {
//this will be recursive if an entity is itself an IGroup
entity.Group = group;
group.Entities.Add(entity);
}
//add the new group to the layer
this.Controller.Model.AddEntity(group);
mGroup = group;
//select the newly created group
CollectionBase<IDiagramEntity> col = new CollectionBase<IDiagramEntity>();
col.Add(mGroup);
this.Controller.Model.Selection.SelectedItems = col;
mGroup.Invalidate();
}
示例2: Redo
public override void Redo()
{
//create a new group
GroupShape group = new GroupShape(this.Controller.Model);
//asign the entities to the group
group.Entities.Clear();
foreach (IDiagramEntity entity in bundle.Entities)
{
//this will be recursive if an entity is itself an IGroup
entity.Group = group;
group.Entities.Add(entity);
}
//add the new group to the layer
this.Controller.Model.DefaultPage.DefaultLayer.Entities.Add(group);
mGroup = group;
//select the newly created group
CollectionBase<IDiagramEntity> col = new CollectionBase<IDiagramEntity>();
col.Add(mGroup);
Selection.SelectedItems = col;
mGroup.Invalidate();
}