private void toolStripButtonEdit_Click(object sender, EventArgs e) { if (enforceLawGridViewChemicalsList.SelectedRows.Count == 0) return; if (enforceLawGridViewChemicalsList.SelectedRows[0].Tag == null) return; UseWaitCursor = true; Application.DoEvents(); try { ChemicalsList chemicalsList = enforceLawGridViewChemicalsList.SelectedRows[0].Tag as ChemicalsList; frmChemicalsList frm = new frmChemicalsList(chemicalsList, ChemicalsListType); frm.OpenWindow(this); } catch (Exception ex) { CommonInvoke.ErrorMessageBox(ex); } UseWaitCursor = false; }
private void toolStripButtonAdd_Click(object sender, EventArgs e) { UseWaitCursor = true; Application.DoEvents(); try { frmChemicalsList frm = new frmChemicalsList(ChemicalsListType); frm.OpenWindow(this); } catch (Exception ex) { CommonInvoke.ErrorMessageBox(ex); } UseWaitCursor = false; }