private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { if (treeView1.SelectedNode == null) { editorForm1.New(); btnSalva.Enabled = false; btnClear.Enabled = false; editorForm1.Enabled = false; } else { editorForm1.Enabled = true; btnSalva.Enabled = true; btnClear.Enabled = true; var mail = AppRepo.GetMailById(CurrentMailId); editorForm1.SetHtmlText(mail.HtmlBody); tbSubject.Text = mail.Subject; } }