Пример #1
0
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if (IsDisposed)
				return;

			base.Dispose(disposing);

			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
				if (m_DraftViewVc != null)
					m_DraftViewVc.Dispose();
			}
			m_DraftViewVc = null;
		}
Пример #2
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (IsDisposed)
            {
                return;
            }

            base.Dispose(disposing);

            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
                if (m_DraftViewVc != null)
                {
                    m_DraftViewVc.Dispose();
                }
            }
            m_DraftViewVc = null;
        }
Пример #3
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Makes a root box and initializes it with appropriate data
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public override void MakeRoot()
        {
            CheckDisposed();

            if (m_fdoCache == null || DesignMode)
            {
                return;
            }

            BaseMakeRoot();

            m_rootb = VwRootBoxClass.Create();
            m_rootb.SetSite(this);

            // Set up a new view constructor.
            m_DraftViewVc = new DummyDraftViewVc();

            m_DraftViewVc.SetDa(m_fdoCache);

            m_rootb.DataAccess = m_fdoCache.MainCacheAccessor;
            m_rootb.SetRootObject(HvoScripture, m_DraftViewVc, (int)ScrFrags.kfrScripture, m_styleSheet);

            m_fRootboxMade   = true;
            m_dxdLayoutWidth = -50000;             // Don't try to draw until we get OnSize and do layout.

            // Added this to keep from Asserting if the user tries to scroll the draft window
            // before clicking into it to place the insertion point.
            try
            {
                m_rootb.MakeSimpleSel(true, true, false, true);
            }
            catch (COMException)
            {
                // We ignore failures since the text window may be empty, in which case making a
                // selection is impossible.
            }
        }
Пример #4
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Makes a root box and initializes it with appropriate data
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public override void MakeRoot()
        {
            CheckDisposed();

            if (m_fdoCache == null || DesignMode)
                return;

            BaseMakeRoot();

            m_rootb = VwRootBoxClass.Create();
            m_rootb.SetSite(this);

            // Set up a new view constructor.
            m_DraftViewVc = new DummyDraftViewVc();

            m_DraftViewVc.SetDa(m_fdoCache);

            m_rootb.DataAccess = m_fdoCache.MainCacheAccessor;
            m_rootb.SetRootObject(HvoScripture, m_DraftViewVc, (int)ScrFrags.kfrScripture, m_styleSheet);

            m_fRootboxMade = true;
            m_dxdLayoutWidth = -50000; // Don't try to draw until we get OnSize and do layout.

            // Added this to keep from Asserting if the user tries to scroll the draft window
            // before clicking into it to place the insertion point.
            try
            {
                m_rootb.MakeSimpleSel(true, true, false, true);
            }
            catch(COMException)
            {
                // We ignore failures since the text window may be empty, in which case making a
                // selection is impossible.
            }
        }