Пример #1
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Allows the IRootSite to be cast as an IVwRootSite
 /// </summary>
 /// <returns></returns>
 /// ------------------------------------------------------------------------------------
 IVwRootSite IRootSite.CastAsIVwRootSite()
 {
     if (m_draftView != null)
     {
         return(m_draftView.CastAsIVwRootSite());
     }
     return(null);
 }
Пример #2
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Called when the row height changed.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewRowEventArgs"/>
        /// instance containing the event data.</param>
        /// ------------------------------------------------------------------------------------
        protected virtual void OnRowHeightChanged(object sender, DataGridViewRowEventArgs e)
        {
            if (!e.Row.Visible && m_grid.DisplayedRowCount(false) == 1)
            {
                // If the user drags the footnote pane all the way up to the top, we want
                // to display the draftview instead of the footnote pane
                if (FootnoteViewShowing)
                {
                    m_grid.Rows[kFootnoteRow].Visible = false;
                    m_grid.Rows[kDraftRow].Visible    = true;
                }

                IRootSite rootSite = FocusedRootSite;
                if (rootSite != null)
                {
                    ((Control)rootSite).Focus();
                    if (rootSite.EditingHelper.CurrentSelection == null)
                    {
                        rootSite.CastAsIVwRootSite().RootBox.MakeSimpleSel(true, true, false, true);
                    }
                }
            }
        }