Esempio n. 1
0
 private void SetupAndShowHeaderPanel(XmlNode node, RecordBar treeBarControl)
 {
     if (!treeBarControl.HasHeaderControl)
     {
         m_titleBar = new PaneBar {
             Dock = DockStyle.Top
         };
         var headerPanel = new Panel {
             Visible = false
         };
         headerPanel.Controls.Add(m_titleBar);
         m_btnCancelSearch = new FwCancelSearchButton();
         m_btnCancelSearch.Init();
         m_btnCancelSearch.Click += m_btnCancelSearch_Click;
         headerPanel.Controls.Add(m_btnCancelSearch);
         m_textSearch        = CreateSearchBox();
         m_textSearch.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
         headerPanel.Controls.Add(m_textSearch);
         m_textSearch.AdjustForStyleSheet(m_stylesheet);
         headerPanel.Height = SetHeaderPanelHeight();
         treeBarControl.AddHeaderControl(headerPanel);
         // Keep the text box from covering the cancel search button
         m_textSearch.Width         = headerPanel.Width - m_btnCancelSearch.Width;
         m_btnCancelSearch.Location = new Point(headerPanel.Width - m_btnCancelSearch.Width, m_textSearch.Location.Y);
         SetInfoBarText(node, m_titleBar);
     }
     treeBarControl.ShowHeaderControl();
 }
 private void SetupAndShowHeaderPanel(Mediator mediator, XmlNode node, RecordBar treeBarControl)
 {
     if (!treeBarControl.HasHeaderControl)
     {
         m_titleBar = new PaneBar {
             Dock = DockStyle.Top
         };
         var headerPanel = new Panel {
             Visible = false
         };
         headerPanel.Controls.Add(m_titleBar);
         m_textSearch = CreateSearchBox();
         //m_textSearch.Dock = DockStyle.Fill;
         m_textSearch.Anchor = (AnchorStyles.Top | AnchorStyles.Left) | AnchorStyles.Right;
         headerPanel.Controls.Add(m_textSearch);
         m_textSearch.AdjustForStyleSheet(FontHeightAdjuster.StyleSheetFromMediator(mediator));
         headerPanel.Height = SetHeaderPanelHeight();
         treeBarControl.AddHeaderControl(headerPanel);
         SetInfoBarText(node, m_titleBar);
     }
     treeBarControl.ShowHeaderControl();
 }