using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.Windows.Controls; using JD.Asset.Types.Map; using JD.Pickers.PickerControls; using TeaBox.Gui.PropertyGrid; namespace JD.Pickers.MapPickers { [Export("MapPicker")] public class MapPickerAttribute : Attribute, IEditorExtensionProviderAttribute { protected SelectionMode SelectionMode { get; set; } public MapPickerAttribute() { SelectionMode = SelectionMode.Extended; } public IEnumerable GetExtensions(CellEditor editor, IGridDataRow row) { yield return ItemPickerCreator.CreateMultiPicker(Map.AllMaps, editor, map => new MapModel(map)); } } }