Ejemplo n.º 1
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            // Must not be run more than once.
            if (IsDisposed)
            {
                return;
            }

            base.Dispose(disposing);

            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
                var disposable = m_basicViewVc as IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
            m_basicViewVc          = null;
            m_SelectionHelper      = null;
            m_vernLgCharPropEngine = null;
        }
Ejemplo n.º 2
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Makes a root box and initializes it with appropriate data
        /// </summary>
        /// <param name="hvoRoot">Hvo of the root object</param>
        /// <param name="flid">Flid in which hvoRoot contains a sequence of StTexts</param>
        /// <param name="frag">Fragment for view constructor</param>
        /// ------------------------------------------------------------------------------------
        public void MakeRoot(int hvoRoot, int flid, int frag)
        {
            CheckDisposed();

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

            base.MakeRoot();

            // Set up a new view constructor.
            m_basicViewVc           = CreateVc(flid);
            m_basicViewVc.DefaultWs = m_cache.ServiceLocator.WritingSystems.DefaultVernacularWritingSystem.Handle;

            m_rootb.DataAccess = m_cache.DomainDataByFlid;
            m_rootb.SetRootObject(hvoRoot, m_basicViewVc, frag, m_styleSheet);

            m_fRootboxMade   = true;
            m_dxdLayoutWidth = kForceLayout;
            // 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.
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            //Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************");
            // Must not be run more than once.
            if (IsDisposed)
            {
                return;
            }

            base.Dispose(disposing);

            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
                if (m_basicViewVc != null)
                {
                    m_basicViewVc.Dispose();
                }
            }
            m_basicViewVc          = null;
            m_SelectionHelper      = null;
            m_vernLgCharPropEngine = null;
        }
 /// <summary/>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         var disposable = m_vc as IDisposable;
         if (disposable != null)
         {
             disposable.Dispose();
         }
     }
     m_vc = null;
     base.Dispose(disposing);
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="fragRoot"></param>
        /// <param name="createVc"></param>
        public void MakeRoot(int fragRoot, Func <VwBaseVc> createVc)
        {
            CheckDisposed();

            if (DesignMode)
            {
                return;
            }

            base.MakeRoot();

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

            m_fragRoot = fragRoot;
            // Set up a new view constructor.
            m_vc = createVc();

            m_rootb.DataAccess = m_sda;
            m_rootb.SetRootObject(m_hvoRoot, m_vc, fragRoot, m_styleSheet);
        }
Ejemplo n.º 6
0
		/// <summary>
		///
		/// </summary>
		/// <param name="fragRoot"></param>
		/// <param name="createVc"></param>
		public void MakeRoot(int fragRoot, Func<VwBaseVc> createVc)
		{
			CheckDisposed();

			if (DesignMode)
				return;

			base.MakeRoot();

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

			m_fragRoot = fragRoot;
			// Set up a new view constructor.
			m_vc = createVc();

			m_rootb.DataAccess = m_sda;
			m_rootb.SetRootObject(m_hvoRoot, m_vc, fragRoot, m_styleSheet);
		}
Ejemplo n.º 7
0
		/// <summary/>
		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				var disposable = m_vc as IDisposable;
				if (disposable != null)
					disposable.Dispose();
			}
			m_vc = null;
			base.Dispose(disposing);
		}
Ejemplo n.º 8
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Makes a root box and initializes it with appropriate data
		/// </summary>
		/// <param name="hvoRoot">Hvo of the root object</param>
		/// <param name="flid">Flid in which hvoRoot contains a sequence of StTexts</param>
		/// <param name="frag">Fragment for view constructor</param>
		/// ------------------------------------------------------------------------------------
		public void MakeRoot(int hvoRoot, int flid, int frag)
		{
			CheckDisposed();

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

			base.MakeRoot();

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

			// Set up a new view constructor.
			m_basicViewVc = CreateVc(flid);
			m_basicViewVc.DefaultWs = m_fdoCache.DefaultVernWs;

			m_rootb.DataAccess = m_fdoCache.MainCacheAccessor;
			m_rootb.SetRootObject(hvoRoot, m_basicViewVc, frag, m_styleSheet);

			m_fRootboxMade = true;
			m_dxdLayoutWidth = kForceLayout; // 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.
			}
		}
Ejemplo n.º 9
0
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			//Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************");
			// Must not be run more than once.
			if (IsDisposed)
				return;

			base.Dispose(disposing);

			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
				if (m_basicViewVc != null)
					m_basicViewVc.Dispose();
			}
			m_basicViewVc = null;
			m_SelectionHelper = null;
			m_vernLgCharPropEngine = null;
		}
Ejemplo n.º 10
0
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose(bool disposing)
		{
			// Must not be run more than once.
			if (IsDisposed)
				return;

			base.Dispose(disposing);

			if (disposing)
			{
				if (components != null)
				{
					components.Dispose();
				}
				var disposable = m_basicViewVc as IDisposable;
				if (disposable != null)
					disposable.Dispose();
			}
			m_basicViewVc = null;
			m_SelectionHelper = null;
			m_vernLgCharPropEngine = null;
		}