23 lines
789 B
C#
23 lines
789 B
C#
using System.Linq;
|
|
using JD.Collections.Extensions;
|
|
using TeaBox;
|
|
using TeaBox.Gui.PropertyGrid;
|
|
using JD.Serialization;
|
|
|
|
namespace JD.Timeline.View.PropertyGrid
|
|
{
|
|
[System.ComponentModel.Composition.Export("MoveModelEditor")]
|
|
public class MoveModelEditor : ComboEditor<MoveModel>
|
|
{
|
|
protected override void OnEditionStarted()
|
|
{
|
|
ComboBox.Items.Clear();
|
|
var model = (MoveModel)CurrentRow.Value;
|
|
foreach (var moveModel in model.Tape.MoveModels().Where(m => m.MoveType == model.MoveType).AsSorted((m1,m2)=>System.String.Compare(m1.Name, m2.Name, System.StringComparison.Ordinal)))
|
|
{
|
|
AddComboBoxItem(moveModel, moveModel.ToString());
|
|
}
|
|
base.OnEditionStarted();
|
|
}
|
|
}
|
|
}
|