/// <summary> /// An IMS event to track the shape element added to the associated /// diagram during this connect action. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ModelNoteShapeAddedEvent(object sender, ElementAddedEventArgs e) { if (myAddedNoteShape == null) { ModelNoteShape candidate = e.ModelElement as ModelNoteShape; // Make sure the shape was added to the diagram associated with this // connect action if (candidate != null && candidate.Diagram == Diagram) { myAddedNoteShape = candidate; } } }
/// <summary> /// Central function to return member variables to a clean state. /// Called by the constructor and the deactivation sequence. /// </summary> private void Reset() { myAddedNoteShape = null; }