Inheritance: System.EventArgs
 protected void OnShapeConfiguring(ModelElementEventArgs e)
 {
     if (this.ShapeConfiguring != null)
     {
         ShapeConfiguring(this, e);
     }
 }
 protected void OnShapeDoubleClick(ModelElementEventArgs e)
 {
     if (this.ShapeDoubleClick != null)
     {
         ShapeDoubleClick(this, e);
     }
 }
        private void diagram_ShapeConfiguring(object sender, nHydrate.Dsl.ModelElementEventArgs e)
        {
            if (this.IsImporting)
            {
                return;
            }

            var diagram = (((Microsoft.VisualStudio.Modeling.Shell.SingleDiagramDocView)(this.DocViews.First())).CurrentDiagram);
            var shape   = e.Shape;

            if (shape is EntityAssociationConnector)
            {
                var F = new nHydrate.DslPackage.Forms.RelationshipDialog(shape.Diagram.ModelElement as nHydrateModel, shape.Store, (shape as EntityAssociationConnector).ModelElement as EntityHasEntities);
                if (F.ShowDialog() != System.Windows.Forms.DialogResult.OK)
                {
                    var relation = shape.ModelElement as EntityHasEntities;
                    relation.ParentEntity.ChildEntities.Remove(relation.ParentEntity.ChildEntities.LastOrDefault());
                }
            }
            else if (shape is EntityViewAssociationConnector)
            {
                var F = new nHydrate.DslPackage.Forms.RelationshipViewDialog(shape.Diagram.ModelElement as nHydrateModel, shape.Store, (shape as EntityViewAssociationConnector).ModelElement as EntityHasViews);
                if (F.ShowDialog() != System.Windows.Forms.DialogResult.OK)
                {
                    var relation = shape.ModelElement as EntityHasViews;
                    relation.ParentEntity.ChildViews.Remove(relation.ParentEntity.ChildViews.LastOrDefault());
                }
            }
        }
Exemple #4
0
        private void diagram_ShapeDoubleClick(object sender, nHydrate.Dsl.ModelElementEventArgs e)
        {
            var diagram = (((Microsoft.VisualStudio.Modeling.Shell.SingleDiagramDocView)(this.DocViews.First())).CurrentDiagram);
            var shape   = e.Shape;

            if (shape is EntityAssociationConnector)
            {
                if (!(shape.Diagram as nHydrateDiagram).IsLoading)
                {
                    var F = new nHydrate.DslPackage.Forms.RelationshipDialog(shape.Diagram.ModelElement as nHydrateModel, shape.Store, (shape as EntityAssociationConnector).ModelElement as EntityHasEntities);
                    F.ShowDialog();
                }
            }
        }
Exemple #5
0
 protected void OnShapeConfiguring(ModelElementEventArgs e)
 {
     if (this.ShapeConfiguring != null)
         ShapeConfiguring(this, e);
 }
Exemple #6
0
 protected void OnShapeDoubleClick(ModelElementEventArgs e)
 {
     if (this.ShapeDoubleClick != null)
         ShapeDoubleClick(this, e);
 }