protected virtual void OnValueChanged(StiValueChangedEventArgs e)
 {
     if (ValueChanged != null)
     {
         ValueChanged(this, e);
     }
 }
        private void tvNodes_DoubleClick(object sender, System.EventArgs e)
        {
            TreeNode treeNode = tvNodes.SelectedNode;

            if (treeNode != null)
            {
                if (treeNode.Tag != null || (!((StiTreeViewBox)ParentControl).SelectOnlyTagNotNull))
                {
                    ((StiTreeViewBox)ParentControl).SelectedItem = treeNode.Tag;

                    StiValueChangedEventArgs ea = new
                                                  StiValueChangedEventArgs(tvNodes, treeNode.Text);

                    ((StiTreeViewBox)ParentControl).InvokeValueChanged(ea);


                    ((StiTreeViewBox)ParentControl).Text = ea.Text;
                }
            }
            else
            {
                if (!((StiTreeViewBox)ParentControl).SelectOnlyTagNotNull)
                {
                    StiValueChangedEventArgs ea = new
                                                  StiValueChangedEventArgs(tvNodes, string.Empty);
                    ((StiTreeViewBox)ParentControl).InvokeValueChanged(ea);

                    ((StiTreeViewBox)ParentControl).SelectedItem = null;
                    ((StiTreeViewBox)ParentControl).Text         = ea.Text;
                }
            }

            ClosePopupForm();
        }
 /// <summary>
 /// Raises the ValueChanged event for this control.
 /// </summary>
 /// <param name="e">An StiValueChangedEventArgs that contains the event data.</param>
 public void InvokeValueChanged(StiValueChangedEventArgs e)
 {
     OnValueChanged(e);
 }