Ejemplo n.º 1
0
 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();
         }
     }
 }
Ejemplo n.º 2
0
        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);
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 3
0
 public override void OnBeginEdit(DiagramItemEventArgs e)
 {
     base.OnBeginEdit(e);
 }
Ejemplo n.º 4
0
 private void OnEndInPlaceEdit(object sender, DiagramItemEventArgs e)
 {
     myHostWindow.ActiveInPlaceEditWindow = null;
 }
Ejemplo n.º 5
0
        private void OnBeginInPlaceEdit(object sender, DiagramItemEventArgs e)
        {
            InPlaceTextEditor editor = sender as InPlaceTextEditor;

            myHostWindow.ActiveInPlaceEditWindow = (editor != null) ? editor.EditorControl : null;
        }
Ejemplo n.º 6
0
		private void OnEndInPlaceEdit(object sender, DiagramItemEventArgs e)
		{
			myHostWindow.ActiveInPlaceEditWindow = null;
		}
Ejemplo n.º 7
0
		private void OnBeginInPlaceEdit(object sender, DiagramItemEventArgs e)
		{
			InPlaceTextEditor editor = sender as InPlaceTextEditor;
			myHostWindow.ActiveInPlaceEditWindow = (editor != null) ? editor.EditorControl : null;
		}
 public override void OnBeginEdit(DiagramItemEventArgs e)
 {
     base.OnBeginEdit(e);
 }