Ejemplo n.º 1
0
			public override void MakeRoot()
			{
				CheckDisposed();

				base.MakeRoot();

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

				// A crude way of making sure the property we want is loaded into the cache.
				m_sense = LexSense.CreateFromDBObject(m_fdoCache, m_hvoObj);
				// Review JohnT: why doesn't the base class do this??
				m_rootb = VwRootBoxClass.Create();
				m_rootb.SetSite(this);
				if (m_vwCache == null)
				{
					m_vwCache = VwCacheDaClass.Create();
					m_silCache = (ISilDataAccess)m_vwCache;
					m_silCache.WritingSystemFactory = m_fdoCache.LanguageWritingSystemFactoryAccessor;
				}

				LoadDummyCache(false);

				// And maybe this too, at least by default?
				m_rootb.DataAccess = m_silCache;
				m_vc = new ReversalIndexEntryVc(m_usedIndices, m_fdoCache);

				// arg4 could be used to supply a stylesheet.
				m_rootb.SetRootObject(m_hvoObj,
					m_vc,
					kFragMainObject,
					m_rootb.Stylesheet);
				m_heightView = m_rootb.Height;
			}
Ejemplo n.º 2
0
			public override void MakeRoot()
			{
				CheckDisposed();

				base.MakeRoot();

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

				// A crude way of making sure the property we want is loaded into the cache.
				m_sense = (ILexSense)m_fdoCache.ServiceLocator.GetObject(m_hvoObj);
				// Review JohnT: why doesn't the base class do this??
				m_rootb = VwRootBoxClass.Create();
				m_rootb.SetSite(this);
				if (m_sdaRev == null)
					m_sdaRev = new ReversalEntryDataAccess(m_fdoCache.DomainDataByFlid as ISilDataAccessManaged);

				LoadDummyCache(false);

				// And maybe this too, at least by default?
				m_rootb.DataAccess = m_sdaRev;
				m_vc = new ReversalIndexEntryVc(m_usedIndices, m_fdoCache);

				// arg4 could be used to supply a stylesheet.
				m_rootb.SetRootObject(m_hvoObj,
					m_vc,
					kFragMainObject,
					m_rootb.Stylesheet);
				m_heightView = m_rootb.Height;
			}
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 (m_vc != null)
						m_vc.Dispose();
					if (m_usedIndices != null)
						m_usedIndices.Clear();
				}

				m_sense = null;
				m_vc = null;
				if (m_tsf != null)
					System.Runtime.InteropServices.Marshal.ReleaseComObject(m_tsf);
				m_tsf = null;
				m_silCache = null;
				if (m_vwCache != null)
				{
					m_vwCache.ClearAllData();
					System.Runtime.InteropServices.Marshal.ReleaseComObject(m_vwCache);
					m_vwCache = null;
				}
				m_usedIndices = null;
			}
Ejemplo n.º 4
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();
					if (m_vc != null)
						m_vc.Dispose();
					if (m_usedIndices != null)
						m_usedIndices.Clear();
					if (m_sdaRev != null)
						m_sdaRev.ClearAllData();
				}

				m_sense = null;
				m_vc = null;
				if (m_tsf != null)
					System.Runtime.InteropServices.Marshal.ReleaseComObject(m_tsf);
				m_tsf = null;
				m_sdaRev = null;
				m_usedIndices = null;
			}