26 lines
765 B
C#
26 lines
765 B
C#
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<EditorExtension> GetExtensions(CellEditor editor, IGridDataRow row)
|
|
{
|
|
yield return ItemPickerCreator.CreateMultiPicker(Map.AllMaps, editor, map => new MapModel(map));
|
|
}
|
|
}
|
|
}
|