/// <summary> /// Alerts listeners when the mouse is double-clicked over the shape. /// </summary> /// <param name="e">The diagram point event arguments.</param> public override void OnDoubleClick(DiagramPointEventArgs e) { // base.OnDoubleClick( e ); ShowAssociationPropertiesCommand cmd = new ShowAssociationPropertiesCommand(ModelElement); cmd.Exec(); }
/// <summary> /// Alerts listeners that a rule has been used. /// </summary> /// <param name="e">An ElementAddedEventArgs that contains the event data.</param> public override void ElementAdded(ElementAddedEventArgs e) { #region Condition // Test the element Association model = e.ModelElement as Association; if (model == null) { return; } // Teste si on est en train de charger le modèle if (model.Store.TransactionManager.CurrentTransaction.TopLevelTransaction.IsSerializing || model.Store.InUndoRedoOrRollback) { return; } // Si on est en train d'importer un schéma, on n'affiche pas la fenetre object obj; if ( model.Store.TransactionManager.CurrentTransaction.Context.ContextInfo.TryGetValue( DatabaseImporter.ImportedRelationInfo, out obj)) { return; } #endregion #region Traitement ShowAssociationPropertiesCommand cmd = new ShowAssociationPropertiesCommand(e.ModelElement); cmd.Exec(); #endregion }