private void OnChildMoved(object sender, ConfigurationNodeMovedEventArgs e)
 {
     TreeNode node = Nodes[e.OldIndex];
     Nodes.RemoveAt(e.OldIndex);
     Nodes.Insert(e.NewIndex, node);
     node.TreeView.SelectedNode = node;
 }
示例#2
0
		/// <summary>
		/// <para>Raises the <seealso cref="ChildMoved"/> event.</para>
		/// </summary>
		/// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
		protected virtual void OnChildMoved(ConfigurationNodeMovedEventArgs e)
		{
			if (handlerList != null)
			{
				EventHandler<ConfigurationNodeMovedEventArgs> handler = (EventHandler<ConfigurationNodeMovedEventArgs>)handlerList[childMovedEvent];
				if (handler != null)
				{
					handler(this, e);
				}
			}
		}
		/// <summary>
		/// <para>Raises the <seealso cref="ChildMoved"/> event.</para>
		/// </summary>
		/// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
		protected virtual void OnChildMoved(ConfigurationNodeMovedEventArgs e)
		{
			if (handlerList != null)
			{
				EventHandler<ConfigurationNodeMovedEventArgs> handler = (EventHandler<ConfigurationNodeMovedEventArgs>)handlerList[childMovedEvent];
				if (handler != null)
				{
					handler(this, e);
				}
			}
		}