/// <summary> /// Make one. This variant is used in testing (to plug in a known logic class). /// </summary> internal ConstituentChart(FdoCache cache, ConstituentChartLogic logic) { m_cache = cache; m_logic = logic; this.SuspendLayout(); m_ribbon = new InterlinRibbon(m_cache, 0); m_ribbon.Dock = DockStyle.Fill; // fills the 'bottom stuff' m_logic.Ribbon = m_ribbon as IInterlinRibbon; m_toolTip = new ToolTip(); // Holds tooltip help for 'Move Here' buttons. // Set up the delays for the ToolTip. m_toolTip.AutoPopDelay = 5000; m_toolTip.InitialDelay = 1000; m_toolTip.ReshowDelay = 500; // Force the ToolTip text to be displayed whether or not the form is active. m_toolTip.ShowAlways = true; m_bottomStuff = new Panel(); m_bottomStuff.SuspendLayout(); m_bottomStuff.Height = 100; // Enhance: figure based on contents or at least number of rows. m_bottomStuff.Dock = DockStyle.Bottom; m_buttonRow = new Panel(); m_buttonRow.Height = new Button().Height; // grab the default height of a button; don't insert any yet. m_buttonRow.Dock = DockStyle.Top; m_buttonRow.Layout += new LayoutEventHandler(m_buttonRow_Layout); m_bottomStuff.Controls.AddRange(new Control[] { m_ribbon, m_buttonRow }); m_fContextMenuButtonsEnabled = true; m_bottomStuff.ResumeLayout(); m_body = new ConstChartBody(m_logic, this); m_body.Cache = m_cache; m_body.Dock = DockStyle.Fill; //m_headerGroups = new ChartHeaderView(); m_headerMainCols = new ChartHeaderView(this); m_headerMainCols.Dock = DockStyle.Top; m_headerMainCols.Layout += new LayoutEventHandler(m_headerMainCols_Layout); m_headerMainCols.SizeChanged += new EventHandler(m_headerMainCols_SizeChanged); m_headerMainCols.View = System.Windows.Forms.View.Details; m_headerMainCols.Height = 22; // Seems to be right (cf BrowseViewer) but not ideal. m_headerMainCols.Scrollable = false; m_headerMainCols.AllowColumnReorder = false; m_headerMainCols.ColumnWidthChanged += new ColumnWidthChangedEventHandler(m_headerMainCols_ColumnWidthChanged); //m_headerGroups.Layout += new LayoutEventHandler(m_headerGroups_Layout); m_logic.Ribbon_Changed += new EventHandler(m_logic_Ribbon_Changed); m_topStuff = new Panel(); m_topStuff.Dock = DockStyle.Fill; m_topStuff.Controls.AddRange(new Control[] { m_body, m_headerMainCols /*, m_headerGroups */}); this.Controls.AddRange(new Control[] { m_topStuff, m_bottomStuff }); this.ResumeLayout(); }
public RibbonVc(InterlinRibbon ribbon) : base(ribbon.Cache) { m_ribbon = ribbon; }
private void BuildBottomStuffUI() { // fills the 'bottom stuff' m_ribbon = new InterlinRibbon(m_cache, 0) { Dock = DockStyle.Fill }; m_logic.Ribbon = m_ribbon; m_logic.Ribbon_Changed += m_logic_Ribbon_Changed; // Holds tooltip help for 'Move Here' buttons. // Set up the delays for the ToolTip. // Force the ToolTip text to be displayed whether or not the form is active. m_toolTip = new ToolTip { AutoPopDelay = 5000, InitialDelay = 1000, ReshowDelay = 500, ShowAlways = true }; m_bottomStuff = new Panel { Height = 100, Dock = DockStyle.Bottom }; m_bottomStuff.SuspendLayout(); m_buttonRow = new Panel { Height = new Button().Height, Dock = DockStyle.Top, BackColor = Color.FromKnownColor(KnownColor.ControlLight) }; m_fContextMenuButtonsEnabled = true; m_buttonRow.Layout += m_buttonRow_Layout; m_bottomStuff.Controls.AddRange(new Control[] { m_ribbon, m_buttonRow }); m_bottomStuff.ResumeLayout(); }