Пример #1
0
 private void propEdit_Click(object sender, EventArgs e)
 {
     if (tileset == null) return;
     if (comboProperties.SelectedItem == null) return;
     TileProperties properties = tileset.GetProperties(comboProperties.SelectedItem.ToString());
     TilePropForm propForm = new TilePropForm(tileset, properties);
     propForm.OkPressed += propForm_OkPressed;
     propForm.Show();
 }
Пример #2
0
        private void comboProperties_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (tileset == null) return;
            if (comboProperties.SelectedIndex == comboProperties.Items.Count - 1) // <New...> selected
            {
                MegaMan.TileProperties properties = new TileProperties();
                properties.Name = "NewProperties";
                TilePropForm propForm = new TilePropForm(tileset, properties);
                propForm.OkPressed += propForm_OkPressed;
                propForm.Show();

                comboProperties.SelectedIndex = 0;
            }
            else tileset.SetProperties(selected, comboProperties.SelectedItem.ToString());
        }