private void SetParentPanel(PanelBase panel) { parentPanel = panel; if (parentPanel != null) { parentPanel.AddChildsPanel(this); } }