void SetCustomData(ref ItemProto Prot, bool ToUI)
{
// Custom data, see Custom.cfg
// Parse trough all pages in properties panels
foreach (TabPage Page in panelProperties.TabPages)
{
TabControl SubControl = null;
foreach (Control TopCtrl in Page.Controls)
{
if (TopCtrl is TabControl)
SubControl = (TabControl)Page.Controls[0];
}
if (SubControl == null)
continue;
foreach (TabPage SubPage in SubControl.TabPages)
{
SetCustomTabPage(ref Prot, SubPage, ToUI);
}
}
foreach (TabPage Page in panelMain.TabPages)
{
SetCustomTabPage(ref Prot, Page, ToUI);
}
}