protected override void WndProc(ref Message m) { try { if (this.m_ExpandableNodePanel.Created) { switch (m.Msg) { case (int)GISShare.Win32.Msgs.WM_LBUTTONDOWN: //0x201 Point point = GISShare.Win32.NativeMethods.LParamToMouseLocation((int)m.LParam); if ( (this.m_ExpandableNodePanel.ShowTreeNodeButton && this.m_ExpandableNodePanel.GetTreeNodeButtonRectangle().Contains(point)) || (this.m_ExpandableNodePanel.ShowExpandButton && this.m_ExpandableNodePanel.GetExpandButtonRectangle().Contains(point)) ) { ISetExpandableCaptionPanelHelper pSetExpandableCaptionPanelHelper = this.m_ExpandableNodePanel as ISetExpandableCaptionPanelHelper; if (pSetExpandableCaptionPanelHelper == null) { return; } pSetExpandableCaptionPanelHelper.SetIsExpand(!this.m_ExpandableNodePanel.IsExpand); } break; default: break; } } } finally { base.WndProc(ref m); } }
private void Relayout() { switch (this.eOrientation) { case Orientation.Horizontal: foreach (ISetExpandableCaptionPanelHelper one in this.ExpandablePanels) { if (one != null) { one.SetDockStyle(DockStyle.Left); } } break; case Orientation.Vertical: foreach (ISetExpandableCaptionPanelHelper one in this.ExpandablePanels) { if (one != null) { one.SetDockStyle(DockStyle.Top); } } break; default: break; } // ISetExpandableCaptionPanelHelper pSetExpandableCaptionPanelHelper = this.SelectedExpandablePanel as ISetExpandableCaptionPanelHelper; if (pSetExpandableCaptionPanelHelper == null) return; pSetExpandableCaptionPanelHelper.ResetSize(); }