Ejemplo n.º 1
0
        private void btnEditCustomActions_Click(object sender, EventArgs e)
        {
            if (objectList.SelectedIndex == -1 || objectList.SelectedIndex > (objectList.Items.Count - 1))
            {
                MessageBox.Show("Cannot edit custom actions without a valid object selected.");
                return;
            }

            EditCustomActions dlg = new EditCustomActions(_area, _area.Objects[objectList.SelectedIndex].CustomActions);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                _area.Objects[objectList.SelectedIndex].CustomActions = dlg.GetActions();
            }
        }
Ejemplo n.º 2
0
        private void btnEditCustomActions_Click(object sender, EventArgs e)
        {
            if (mobList.SelectedIndex == -1 || mobList.SelectedIndex > (mobList.Items.Count - 1))
            {
                MessageBox.Show("Cannot edit custom actions without a valid mobile selected.");
                return;
            }

            EditCustomActions dlg = new EditCustomActions(_area, _area.Mobs[mobList.SelectedIndex].CustomActions);
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                _area.Mobs[mobList.SelectedIndex].CustomActions = dlg.GetActions();
            }
        }