public override void OnEndEdit(DiagramItemEventArgs e) { base.OnEndEdit(e); if (e != null && e.DiagramClientView != null && e.DiagramItem.Field != null && e.DiagramItem.Field is CodeSnippetTextField) { using (Transaction t = this.Store.TransactionManager.BeginTransaction("Adjust bounds of codesnippet children shapes")) { this.relayoutChildren = true; t.Commit(); } } }
public override void OnEndEdit(DiagramItemEventArgs e) { base.OnEndEdit(e); Debug.Assert(ParentShape != null, "ElementListCompartment should be contained in another shape."); if (ParentShape != null) { var ets = ParentShape as EntityTypeShape; Debug.Assert( ets != null, "Expected ElementListCompartment's parent type: EntityTypeShape, Actual: " + ParentShape.GetType().Name); if (ets != null && ets.Diagram != null) { var modelDiagram = ets.Diagram.ModelElement.ModelXRef.GetExisting(ets.Diagram) as Diagram; var diagrams = modelDiagram.Parent as Diagrams; if (diagrams != null) { var diagramArtifact = diagrams.Artifact as DiagramArtifact; if (diagramArtifact != null && e.DiagramItem.RepresentedElements != null && e.DiagramItem.RepresentedElements.Count == 1) { var representedItems = e.DiagramItem.RepresentedElements.GetEnumerator(); if (representedItems.MoveNext()) { var scalarProperty = representedItems.Current as ScalarProperty; if (scalarProperty != null) { diagramArtifact.RaisePropertyNameCommitted(ets.Name, scalarProperty.Name); } } } } } } }
public override void OnBeginEdit(DiagramItemEventArgs e) { base.OnBeginEdit(e); }
private void OnEndInPlaceEdit(object sender, DiagramItemEventArgs e) { myHostWindow.ActiveInPlaceEditWindow = null; }
private void OnBeginInPlaceEdit(object sender, DiagramItemEventArgs e) { InPlaceTextEditor editor = sender as InPlaceTextEditor; myHostWindow.ActiveInPlaceEditWindow = (editor != null) ? editor.EditorControl : null; }