//------------------------------------------------------------------- public static ControlContainerSplitterDesc FromTaxonSplitterContainer(ControlContainerSplitter _split) { ControlContainerSplitterDesc desc = new ControlContainerSplitterDesc { Orientation = _split.Orientation, SplitterDistance = _split.SplitterDistance }; if (_split.Panel1.Controls[0] is ControlContainerTabs) { desc.Panel1TabDesc = ControlContainerTabsDesc.FromTaxonTabControls(_split.Panel1.Controls[0] as ControlContainerTabs); } else if (_split.Panel1.Controls[0] is ControlContainerSplitter) { desc.Panel1SplitterDesc = FromTaxonSplitterContainer(_split.Panel1.Controls[0] as ControlContainerSplitter); } if (_split.Panel2.Controls[0] is ControlContainerTabs) { desc.Panel2TabDesc = ControlContainerTabsDesc.FromTaxonTabControls(_split.Panel2.Controls[0] as ControlContainerTabs); } else if (_split.Panel2.Controls[0] is ControlContainerSplitter) { desc.Panel2SplitterDesc = FromTaxonSplitterContainer(_split.Panel2.Controls[0] as ControlContainerSplitter); } return(desc); }
//----------------------------------------------------------------------------------------- void MainWindowContentFromUI() { TaxonTabControlsDescriptor = null; SplitterContainerDescriptor = null; Panel mainPanel = TaxonUtils.MainWindow.GetMainPanel(); if (mainPanel.Controls[0] is GUI.ControlContainerTabs) { TaxonTabControlsDescriptor = GUI.ControlContainerTabsDesc.FromTaxonTabControls(mainPanel.Controls[0] as GUI.ControlContainerTabs); } else if (mainPanel.Controls[0] is GUI.ControlContainerSplitter) { SplitterContainerDescriptor = GUI.ControlContainerSplitterDesc.FromTaxonSplitterContainer(mainPanel.Controls[0] as GUI.ControlContainerSplitter); } }