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

            myHostWindow.ActiveInPlaceEditWindow = (editor != null) ? editor.EditorControl : null;
        }
Esempio n. 6
0
		private void OnEndInPlaceEdit(object sender, DiagramItemEventArgs e)
		{
			myHostWindow.ActiveInPlaceEditWindow = null;
		}
Esempio 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);
 }