public static void setDocActive(cEditor editor)
{
m_editor = editor;
setMenu();
if (editor != null)
{
TabPage editorTab = editor.getEditorTab();
(editorTab.Parent as TabControl).SelectedTab = editorTab;
if (m_fToolbox != null && !m_fToolbox.IsDisposed && m_fToolbox.Visible)
{
if (getToolbox(editor) != null)
{
editor.showToolbox();
}
}
if (m_fControls != null && !m_fControls.IsDisposed && m_fControls.Visible)
{
if (getCtrlBox(editor) != null)
{
editor.showControls();
}
}
if (m_fTreeViewCtrls != null && !m_fTreeViewCtrls.IsDisposed && m_fTreeViewCtrls.Visible)
{
if (getCtrlTreeBox(editor) != null)
{
editor.showControlsTree();
}
}
}
else
{
if (m_fToolbox != null && !m_fToolbox.IsDisposed && m_fToolbox.Visible)
{
m_fToolbox.clear();
}
if (m_fControls != null && !m_fControls.IsDisposed && m_fControls.Visible)
{
m_fControls.clear();
}
if (m_fTreeViewCtrls != null && !m_fTreeViewCtrls.IsDisposed && m_fTreeViewCtrls.Visible)
{
m_fTreeViewCtrls.clear();
}
}
fmain.showControls(editor);
fmain.showControlsTree(editor);
fmain.showFields(editor);
}