Inheritance: WeifenLuo.WinFormsUI.Docking.DockContent
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Handles the Click event of the m_tsbShowObjInNewWnd control.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private void m_tsbShowObjInNewWnd_Click(object sender, EventArgs e)
        {
            InspectorWnd wnd = m_dockPanel.ActiveContent as InspectorWnd;

            if (wnd == null)
            {
                return;
            }

            IInspectorObject io = wnd.CurrentInspectorObject;

            if (io == null || io.Object == null)
            {
                return;
            }

            string text = io.DisplayName;

            if (text.StartsWith("[") && text.EndsWith("]"))
            {
                text = text.Trim('[', ']');
                int i;
                if (int.TryParse(text, out i))
                {
                    text = null;
                }
            }

            if (text != null && text != io.DisplayType)
            {
                text += (": " + io.DisplayType);
            }

            m_InspectorWnd = ShowNewInspectorWindow(io.Object, text);
        }
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Handles the Opening event of the grid's context menu.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        protected virtual void HandleOpenObjectInNewWindowContextMenuClick(object sender, CancelEventArgs e)
        {
            InspectorWnd wnd = m_dockPanel.ActiveContent as InspectorWnd;

            if (wnd != null)
            {
                IInspectorObject io = wnd.CurrentInspectorObject;
                cmnuShowInNewWindow.Enabled = (io != null && io.Object != null);
            }
        }
        /// ------------------------------------------------------------------------------------
        public InspectorWnd ShowNewInspectorWndOne()
        {
            InspectorWnd wnd = new InspectorWnd();

            return(wnd);
        }
 /// ------------------------------------------------------------------------------------
 public InspectorWnd ShowNewInspectorWndTwo(object obj, string text, string toolTipText, InspectorWnd wnd)
 {
     wnd.Text        = (!string.IsNullOrEmpty(text) ? text : GetNewInspectorWndTitle(obj));
     wnd.ToolTipText = (string.IsNullOrEmpty(toolTipText) ? wnd.Text : toolTipText);
     wnd.SetTopLevelObject(obj, GetNewInspectorList());
     wnd.InspectorGrid.ContextMenuStrip = m_cmnuGrid;
     wnd.InspectorGrid.Enter           += InspectorGrid_Enter;
     wnd.InspectorGrid.Leave           += InspectorGrid_Leave;
     wnd.FormClosed += HandleWindowClosed;
     wnd.Show(m_dockPanel);
     return(wnd);
 }
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Creates the new inspector window for the specified object.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        protected virtual InspectorWnd ShowNewInspectorWindow(object obj, string text, string toolTipText)
        {
            InspectorWnd wnd = ShowNewInspectorWndOne();

            return(ShowNewInspectorWndTwo(obj, text, toolTipText, wnd));
        }
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Handles the ActiveDocumentChanged event of the m_dockPanel control.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        void m_dockPanel_ActiveDocumentChanged(object sender, EventArgs e)
        {
            InspectorWnd wnd = m_dockPanel.ActiveDocument as InspectorWnd;

            m_statuslabel.Text = (wnd == null ? string.Empty : wnd.InspectorList.Count + " Top Level Items");
        }
示例#7
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Handles the Click event of the m_tsbShowObjInNewWnd control.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		private void m_tsbShowObjInNewWnd_Click(object sender, EventArgs e)
		{
			InspectorWnd wnd = m_dockPanel.ActiveContent as InspectorWnd;
			if (wnd == null)
				return;

			IInspectorObject io = wnd.CurrentInspectorObject;
			if (io == null || io.Object == null)
				return;

			string text = io.DisplayName;
			if (text.StartsWith("[") && text.EndsWith("]"))
			{
				text = text.Trim('[', ']');
				int i;
				if (int.TryParse(text, out i))
					text = null;
			}

			if (text != null && text != io.DisplayType)
				text += (": " + io.DisplayType);

			m_InspectorWnd = ShowNewInspectorWindow(io.Object, text);
		}
示例#8
0
		/// ------------------------------------------------------------------------------------
		public InspectorWnd ShowNewInspectorWndTwo(object obj, string text, string toolTipText, InspectorWnd wnd)
		{
			wnd.Text = (!string.IsNullOrEmpty(text) ? text : GetNewInspectorWndTitle(obj));
			wnd.ToolTipText = (string.IsNullOrEmpty(toolTipText) ? wnd.Text : toolTipText);
			wnd.SetTopLevelObject(obj, GetNewInspectorList());
			wnd.InspectorGrid.ContextMenuStrip = m_cmnuGrid;
			wnd.InspectorGrid.Enter += InspectorGrid_Enter;
			wnd.InspectorGrid.Leave += InspectorGrid_Leave;
			wnd.FormClosed += HandleWindowClosed;
			wnd.Show(m_dockPanel);
			return wnd;
		}
示例#9
0
		/// ------------------------------------------------------------------------------------
		public InspectorWnd ShowNewInspectorWndOne()
		{
			InspectorWnd wnd = new InspectorWnd();
			return wnd;
		}