2019-08-29 21:45:32 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using Toolbox.Library.Forms;
|
|
|
|
|
|
2019-08-29 22:33:23 +02:00
|
|
|
|
namespace LayoutBXLYT
|
2019-08-29 21:45:32 +02:00
|
|
|
|
{
|
2019-08-30 01:01:47 +02:00
|
|
|
|
public partial class LayoutProperties : LayoutDocked
|
2019-08-29 21:45:32 +02:00
|
|
|
|
{
|
|
|
|
|
public LayoutProperties()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
stTabControl1.myBackColor = FormThemes.BaseTheme.FormBackColor;
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-30 01:01:47 +02:00
|
|
|
|
public void Reset()
|
|
|
|
|
{
|
|
|
|
|
stTabControl1.Controls.Clear();
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-29 22:33:23 +02:00
|
|
|
|
public void LoadProperties(BasePane prop, Action propChanged)
|
2019-08-29 21:45:32 +02:00
|
|
|
|
{
|
|
|
|
|
stTabControl1.Controls.Clear();
|
|
|
|
|
|
|
|
|
|
if (prop is BFLYT.PIC1)
|
|
|
|
|
{
|
|
|
|
|
LoadPropertyTab("Pane", prop, propChanged);
|
|
|
|
|
LoadPropertyTab("Materials", ((BFLYT.PIC1)prop).GetMaterial(), propChanged);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
LoadPropertyTab("Pane", prop, propChanged);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void LoadPropertyTab(string text, object prop, Action propChanged)
|
|
|
|
|
{
|
|
|
|
|
TabPage page = new TabPage();
|
|
|
|
|
page.Text = text;
|
|
|
|
|
var propGrid = new STPropertyGrid();
|
|
|
|
|
propGrid.Dock = DockStyle.Fill;
|
|
|
|
|
propGrid.LoadProperty(prop, propChanged);
|
|
|
|
|
page.Controls.Add(propGrid);
|
|
|
|
|
stTabControl1.Controls.Add(page);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|