/// ------------------------------------------------------------------------------------ /// <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; } if (disposing) { ShutDownTempWsFactory(); // Must happen before call to base. } base.Dispose(disposing); if (disposing) { if (m_CacheDa != null) { m_CacheDa.ClearAllData(); } } m_vc = null; m_DataAccess = null; m_wsf = null; if (m_CacheDa != null && Marshal.IsComObject(m_CacheDa)) { Marshal.ReleaseComObject(m_CacheDa); } m_CacheDa = null; }
/// ------------------------------------------------------------------------------------- /// <summary> /// Default constructor /// </summary> /// ------------------------------------------------------------------------------------- public BulletsPreview() { m_CacheDa = VwCacheDaClass.Create(); m_DataAccess = (ISilDataAccess)m_CacheDa; m_vc = new BulletsPreviewVc(); // So many things blow up so badly if we don't have one of these that I finally decided to just // make one, even though it won't always, perhaps not often, be the one we want. CreateTempWritingSystemFactory(); m_DataAccess.WritingSystemFactory = WritingSystemFactory; VScroll = false; // no vertical scroll bar visible. AutoScroll = false; // not even if the root box is bigger than the window. }
/// ------------------------------------------------------------------------------------- /// <summary> /// Default constructor /// </summary> /// ------------------------------------------------------------------------------------- public BulletsPreview() { m_CacheDa = VwCacheDaClass.Create(); m_DataAccess = (ISilDataAccess)m_CacheDa; m_vc = new BulletsPreviewVc(); // So many things blow up so badly if we don't have one of these that I finally decided to just // make one, even though it won't always, perhaps not often, be the one we want. CreateTempWritingSystemFactory(); m_DataAccess.WritingSystemFactory = WritingSystemFactory; VScroll = false; // no vertical scroll bar visible. AutoScroll = false; // not even if the root box is bigger than the window. }
/// ------------------------------------------------------------------------------------ /// <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; if (disposing) { ShutDownTempWsFactory(); // Must happen before call to base. } base.Dispose(disposing); if (disposing) { if (m_CacheDa != null) m_CacheDa.ClearAllData(); } m_vc = null; m_DataAccess = null; m_wsf = null; if (m_CacheDa != null && Marshal.IsComObject(m_CacheDa)) Marshal.ReleaseComObject(m_CacheDa); m_CacheDa = null; }