internal void HandleAddPropertyClick() { var tile = AppState.Self.CurrentMapTilesetTile; if (tile == null) { MessageBox.Show("You must first select a Tile"); } else { NewPropertyWindow window = new NewPropertyWindow(); DialogResult result = window.ShowDialog(); if (result == DialogResult.OK) { string name = window.ResultName; string type = window.ResultType; AddProperty(tile, name, type); } } }
private void HandleEditNameAndType(object sender, EventArgs e) { if (CurrentTilesetTileProperty != null) { NewPropertyWindow window = new NewPropertyWindow(); window.ResultName = property.GetStrippedName(CurrentTilesetTileProperty.name); window.ResultType = property.GetPropertyName(CurrentTilesetTileProperty.name); DialogResult result = window.ShowDialog(); if (result == DialogResult.OK) { LayersController.SetPropertyNameFromNameAndType( window.ResultName, window.ResultType, CurrentTilesetTileProperty); mDisplayer.UpdateDisplayedProperties(); mDisplayer.PropertyGrid.Refresh(); if (AnyTileMapChange != null) { AnyTileMapChange(this, null); } } } else { MessageBox.Show("No property selected"); } }