private void documentoToolStripMenuItem_Click_1(object sender, EventArgs e) { SetPerson(); if (!verifyPerson()) { InfoForm info = new InfoForm(); info.Add("Aviso: Tem que prencher todos os campos pessoa primeiro"); info.Enabled = false; info.Visible = true; } else { DocumentEditor doc = new DocumentEditor(serverClient,this.p); doc.Visible = true; doc.FormClosed += (o, even) => this.Close(); } }
private void documentoToolStripMenuItem_Click(object sender, EventArgs e) { var doc = new DocumentEditor(serverClient, person); doc.ShowDialog(this); }