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; }
/// <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; }