示例#1
0
 /// <summary>
 /// Called when nodes are added or removed from the model.
 /// </summary>
 /// <param name="sender">Model sending the event</param>
 /// <param name="evtArgs">Event arguments</param>
 protected virtual void OnNodeCollectionChanged(object sender, NodeCollection.EventArgs evtArgs)
 {
     if (this.autoLayoutFlag)
     {
         this.UpdateLayout(null);
     }
 }
示例#2
0
 /// <summary>
 /// Called after a change is made to the collection.
 /// </summary>
 /// <param name="evtArgs">Event arguments</param>
 /// <remarks>
 /// <para>
 /// This method downcasts the CollectionEx.EventArgs parameter to a
 /// <see cref="Syncfusion.Windows.Forms.Diagram.NodeCollection.EventArgs"/>
 /// object. Then it fires the
 /// <see cref="Syncfusion.Windows.Forms.Diagram.NodeCollection.ChangeComplete"/>
 /// event.
 /// </para>
 /// <seealso cref="Syncfusion.Windows.Forms.Diagram.CollectionEx.EventArgs"/>
 /// <seealso cref="Syncfusion.Windows.Forms.Diagram.NodeCollection.EventArgs"/>
 /// </remarks>
 protected override void OnChangeComplete(CollectionEx.EventArgs evtArgs)
 {
     if (this.ChangeComplete != null)
     {
         NodeCollection.EventArgs typedEvtArgs = evtArgs as NodeCollection.EventArgs;
         if (typedEvtArgs != null)
         {
             this.ChangeComplete(this, typedEvtArgs);
         }
     }
 }