private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(XWindow)); this.builtInImages = new System.Windows.Forms.ImageList(this.components); this.m_mainSplitContainer = new XCore.CollapsingSplitContainer(); this.m_mainContentPlaceholderPanel = new Panel(); this.m_mainContentPlaceholderPanel.BackColor = Color.FromKnownColor(KnownColor.Window); this.m_secondarySplitContainer = new XCore.CollapsingSplitContainer(); this.m_secondarySplitContainer.Panel2.BackColor = Color.FromKnownColor(KnownColor.Window); this.m_recordBar = new XCore.RecordBar(); this.m_sideBarPlaceholderPanel = new Panel(); this.m_widgetUpdateTimer = new System.Windows.Forms.Timer(this.components); this.m_mainSplitContainer.SuspendLayout(); this.m_secondarySplitContainer.SuspendLayout(); this.SuspendLayout(); // // builtInImages // this.builtInImages.ImageSize = new System.Drawing.Size(16, 16); this.builtInImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("builtInImages.ImageStream"))); this.builtInImages.TransparentColor = System.Drawing.Color.Transparent; // // m_mainSplitContainer // this.m_mainSplitContainer.AccessibleName = "xWindow.mainSplitContainer"; this.m_mainSplitContainer.BackColor = System.Drawing.SystemColors.Control; this.m_mainSplitContainer.Dock = DockStyle.Fill; this.m_mainSplitContainer.FirstControl = this.m_sideBarPlaceholderPanel; this.m_mainSplitContainer.SecondControl = this.m_secondarySplitContainer; this.m_mainSplitContainer.Location = new System.Drawing.Point(0, 0); this.m_mainSplitContainer.Name = "m_mainSplitContainer"; this.m_mainSplitContainer.Size = new System.Drawing.Size(873, 569); this.m_mainSplitContainer.TabStop = false; this.m_mainSplitContainer.TabIndex = 0; this.m_mainSplitContainer.FixedPanel = FixedPanel.Panel1; this.m_mainSplitContainer.SplitterDistance = 140; // // m_mainContentPlaceholderPanel // this.m_mainContentPlaceholderPanel.AccessibleName = "xWindow.contentPanel"; this.m_mainContentPlaceholderPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.m_mainContentPlaceholderPanel.Name = "m_contentPanel"; this.m_mainContentPlaceholderPanel.TabIndex = 1; // // m_secondarySplitContainer // this.m_secondarySplitContainer.AccessibleName = "xWindow.m_secondarySplitContainer"; this.m_secondarySplitContainer.Panel1Collapsed = true; this.m_secondarySplitContainer.FirstControl = this.m_recordBar; this.m_secondarySplitContainer.SecondControl = this.m_mainContentPlaceholderPanel; this.m_secondarySplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; this.m_secondarySplitContainer.Location = new System.Drawing.Point(0, 0); this.m_secondarySplitContainer.Name = "m_secondarySplitContainer"; this.m_secondarySplitContainer.Size = new System.Drawing.Size(728, 569); this.m_secondarySplitContainer.TabStop = false; this.m_secondarySplitContainer.TabIndex = 1; this.m_secondarySplitContainer.FixedPanel = FixedPanel.Panel1; this.m_secondarySplitContainer.SplitterDistance = 200; // // m_recordBar // this.m_recordBar.AccessibleName = "XCore.RecordBar"; this.m_recordBar.Dock = System.Windows.Forms.DockStyle.Fill; this.m_recordBar.Name = "m_recordBar"; this.m_recordBar.TabIndex = 1; // // m_sideBarPlaceholderPanel // this.m_sideBarPlaceholderPanel.AccessibleName = "xWindow.sideBarPanel"; this.m_sideBarPlaceholderPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.m_sideBarPlaceholderPanel.Name = "m_sideBarPanel"; this.m_sideBarPlaceholderPanel.TabIndex = 2; // // m_widgetUpdateTimer // this.m_widgetUpdateTimer.Interval = 1000; this.m_widgetUpdateTimer.Tick += new System.EventHandler(this.WidgetUpdateTimer_Tick); // // XWindow // this.AccessibleDescription = "The main window"; this.AccessibleName = "The Window"; this.AccessibleRole = System.Windows.Forms.AccessibleRole.Window; this.AutoScaleMode = AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(873, 569); this.Controls.Add(this.m_mainSplitContainer); this.KeyPreview = true; this.Name = "XWindow"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show; this.Text = "XCoreMainWnd"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.XWindow_KeyDown); this.Resize += new System.EventHandler(this.XWindow_Resize); this.Closing += new System.ComponentModel.CancelEventHandler(this.XWindow_Closing); this.Move += new System.EventHandler(this.XWindow_Move); this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.XWindow_KeyUp); this.Activated += new System.EventHandler(this.XWindow_Activated); this.m_mainSplitContainer.ResumeLayout(false); this.m_secondarySplitContainer.ResumeLayout(false); this.ResumeLayout(false); }
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(); }
/// ----------------------------------------------------------------------------------- /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged /// resources; <c>false</c> to release only unmanaged resources. /// </param> /// ----------------------------------------------------------------------------------- protected override void Dispose(bool disposing) { Debug.WriteLineIf(!disposing, "****************** Missing Dispose() call for " + GetType().Name + ". ******************"); // Must not be run more than once. if (IsDisposed) return; if (disposing) ShutDownPart1(); base.Dispose(disposing); if (disposing) ShutDownPart2(); m_mainContentPlaceholderPanel = null; m_widgetUpdateTimer = null; m_mediator = null; //m_adapters = null; m_mainContentControl = null; m_recordBar = null; m_sidebar = null; //m_statusPanels = null; m_smallImages = null; m_largeImages = null; }