private void addSalvageRulesToolStripMenuItem_Click(object sender, EventArgs e) { AddSalvageRulesForm asr = new AddSalvageRulesForm(); DialogResult r = asr.ShowDialog(this); if (r == DialogResult.OK || r == DialogResult.Yes) { try { int[] matIds = GameInfo.getMaterialGroups()[asr.grp]; this.addMaterialRules(matIds, asr.wrk, r == DialogResult.Yes); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show("Exception: " + ex.ToString()); } } asr.Dispose(); }