コード例 #1
0
ファイル: DockContent.cs プロジェクト: helgef/flysight
 public DockContent()
 {
     m_dockHandler = new DockContentHandler(this, new GetPersistStringCallback(GetPersistString));
     m_dockHandler.DockStateChanged += new EventHandler(DockHandler_DockStateChanged);
     //Suggested as a fix by bensty regarding form resize
     this.ParentChanged += new EventHandler(DockContent_ParentChanged);
 }
コード例 #2
0
ファイル: clsForm.cs プロジェクト: routd1/ProjectHurricane
        public clsForm()
        {
            Application.DoEvents();
            _ReportForm = false;

            m_dockHandler = new DockContentHandler(this, new GetPersistStringCallback(GetPersistString));
            m_dockHandler.DockStateChanged += new EventHandler(DockHandler_DockStateChanged);
        }
コード例 #3
0
ファイル: DockContentEx.cs プロジェクト: bing-copy/NFlex
        }         //end HideOrCloseFrom

        /// <summary>
        /// 关闭或隐藏当前窗体
        /// 仅DockState状态跟当前的DockState状态相同的窗体
        /// </summary>
        /// <param name="content">当前窗体对象</param>
        void HideOrCloseFrom(DockContentHandler content, bool isClose)
        {
            if (content == null || content.DockState != this.DockState)
            {
                return;
            }
            if (isClose)
            {
                content.Close();
            }
            else if (!content.IsHidden)
            {
                content.Hide();
            }
        }
コード例 #4
0
ファイル: FormMain.cs プロジェクト: moaistory/IE10Analyzer
 public bool checkDockDocument(String tableName)
 {
     //tableName = tableName.Replace("\0", string.Empty);
     IDockContent[] idockContentArray = this.dockPanel.DocumentsToArray();
     foreach (IDockContent idockContent in idockContentArray)
     {
         DockContentHandler dockContentHandler = idockContent.DockHandler;
         if (dockContentHandler.TabText.Equals(tableName))
         {
             //MessageBox.Show("[" + tableName + "] has already selected.");
             dockContentHandler.Activate();
             return(true);
         }
     }
     return(false);
 }
コード例 #5
0
        /// <summary>
        /// Tile all dock panes in the active dock window
        /// </summary>
        /// <param name="dockStyle">Dock style</param>
        public void TileDocumentContent(DockStyle dockStyle)
        {
            DockWindow documentDockWindow = m_dockPanel.DockWindows[DockState.Document];
            DockPane   activePane         = documentDockWindow.NestedPanes[0];
            int        count = m_dockPanel.DocumentsCount;

            foreach (IDockContent dockContent in m_dockPanel.Documents)
            {
                if (count > 1)
                {
                    if (dockContent != null)
                    {
                        DockContentHandler dockContentHandler = dockContent.DockHandler;
                        dockContentHandler.DockTo(activePane, dockStyle, -1, 1.0 / (double)count);
                    }
                }

                count--;
            }
        }