protected virtual void OnAfterEdit(AfterEditEventArgs e)
 {
     if (AfterEdit != null)
     {
         AfterEdit(this, e);
     }
 }
 private void HideTextBox()
 {
     textBox.Visible = false;
     AfterEditEventArgs args = new AfterEditEventArgs(textBox.Text);
     OnAfterEdit(args);
     if (!args.Cancel)
     {
         label.Text = args.Text;
     }
 }
        private void titleLabel_AfterEdit(object sender, AfterEditEventArgs e)
        {
            try
            {
                DirectoryInfo directory = new DirectoryInfo(e.Text);

                listView.CurrentDirectory = directory;
            }
            catch (DirectoryNotFoundException)
            {
                e.Cancel = true;
            }
        }