private void lbBaralhos_MouseDoubleClick(object sender, MouseEventArgs e) { if (lbBaralhos.SelectedIndex >= 0) { formBaralhosManipula formManipula = new formBaralhosManipula(GetSelectedDeck(), dbContainer); formManipula.FormClosing += (object formSender, FormClosingEventArgs fromE) => { RefreshDeckList(); }; formManipula.ShowDialog(this); DisableCardsList(); } }
private void btNovo_Click(object sender, EventArgs e) { formBaralhosManipula formManipula = new formBaralhosManipula(dbContainer); formManipula.FormClosing += (object formSender, FormClosingEventArgs fromE) => { RefreshDeckList(); }; /*(object formSender, FormClosingEventArgs fromE) => { RefreshDeckList(); }; * É um expresão Lambda para: * new FormClosingEventHandler(delegate (object formSender, FormClosingEventArgs fromE) { RefreshDeckList(); }); * **/ formManipula.ShowDialog(this); }