Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 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();
 }