private void Comments_BeforeSelect(object sender, TreeViewCancelEventArgs e) { if (!CommentEdit.Visible) { if (SaveComment()) e.Cancel = true; } }