private void historicoDeConsumoToolStripMenuItem_Click(object sender, EventArgs e) { if (telaPesquisarHistorico == null) { telaPesquisarHistorico = new Pesquisa_Historico(); telaPesquisarHistorico.MdiParent = this; telaPesquisarHistorico.Show(); telaPesquisarHistorico.Disposed += new EventHandler(telaPesquisarHistorico_Disposed); } }
void telaPesquisarHistorico_Disposed(object sender, EventArgs e) { telaPesquisarHistorico = null; }