Switch-Toolbox/Switch_FileFormatsMain/FileFormats/BMD/BMDShapeWrapper.cs

37 lines
942 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Switch_Toolbox.Library;
using Switch_Toolbox.Library.IO;
using Switch_Toolbox.Library.Forms;
using SuperBMDLib.Geometry;
namespace FirstPlugin
{
public class BMDShapeWrapper : STGenericObject
{
Shape BMDShape;
public BMDShapeWrapper(Shape shape)
{
BMDShape = shape;
}
public override void OnClick(TreeView treeView)
{
STPropertyGrid editor = (STPropertyGrid)LibraryGUI.GetActiveContent(typeof(STPropertyGrid));
if (editor == null)
{
editor = new STPropertyGrid();
LibraryGUI.LoadEditor(editor);
}
editor.Text = Text;
editor.Dock = DockStyle.Fill;
editor.LoadProperty(BMDShape, null);
}
}
}