/// <summary> /// Make a rootbox. When changing this, give careful consideration to changing Reuse(). /// </summary> public override void MakeRoot() { CheckDisposed(); m_rootb = null; if (m_cache == null || DesignMode) { return; } m_rgws = WritingSystemOptions; int wsUser = m_cache.WritingSystemFactory.UserWs; m_vc = new InnerLabeledMultiStringViewVc(m_flid, m_rgws, wsUser, m_editable, this); base.MakeRoot(); Debug.Assert(m_rootb != null); // And maybe this too, at least by default? m_rootb.DataAccess = m_cache.DomainDataByFlid; // arg3 is a meaningless initial fragment, since this VC only displays one thing. // arg4 could be used to supply a stylesheet. m_rootb.SetRootObject(m_hvoObj, m_vc, 1, m_styleSheet); if (SetupOtherControls != null) { SetupOtherControls(this, new EventArgs()); } }
/// <summary></summary> public override void MakeRoot() { CheckDisposed(); if (DesignMode) { return; } // The simple root site won't lay out properly until this is done. // It needs to be done before base.MakeRoot or it won't lay out at all ever! WritingSystemFactory = m_realCache.WritingSystemFactory; base.MakeRoot(); m_rootb.DataAccess = m_sda; int wsUser = m_realCache.ServiceLocator.WritingSystemManager.UserWs; int wsEn = m_realCache.ServiceLocator.WritingSystemManager.GetWsFromStr("en"); m_vc = new LabeledMultiStringVc(kflid, WritingSystems, wsUser, true, wsEn); // arg3 is a meaningless initial fragment, since this VC only displays one thing. m_rootb.SetRootObject(khvoRoot, m_vc, 1, m_styleSheet); m_dxdLayoutWidth = kForceLayout; // Don't try to draw until we get OnSize and do layout. }
/// <summary> /// Executes in two distinct scenarios. /// /// 1. If disposing is true, the method has been called directly /// or indirectly by a user's code via the Dispose method. /// Both managed and unmanaged resources can be disposed. /// /// 2. If disposing is false, the method has been called by the /// runtime from inside the finalizer and you should not reference (access) /// other managed objects, as they already have been garbage collected. /// Only unmanaged resources can be disposed. /// </summary> /// <remarks> /// If any exceptions are thrown, that is fine. /// If the method is being done in a finalizer, it will be ignored. /// If it is thrown by client code calling Dispose, /// it needs to be handled by fixing the bug. /// /// If subclasses override this method, they should call the base implementation. /// </remarks> protected override void Dispose(bool disposing) { Debug.WriteLineIf(!disposing, "****************** Missing Dispose() call for " + GetType().Name + " ******************"); // Must not be run more than once. if (IsDisposed) { return; } base.Dispose(disposing); if (disposing) { } // Dispose unmanaged resources here, whether disposing is true or false. m_rgws = null; m_vc = null; }
/// <summary> /// Executes in two distinct scenarios. /// /// 1. If disposing is true, the method has been called directly /// or indirectly by a user's code via the Dispose method. /// Both managed and unmanaged resources can be disposed. /// /// 2. If disposing is false, the method has been called by the /// runtime from inside the finalizer and you should not reference (access) /// other managed objects, as they already have been garbage collected. /// Only unmanaged resources can be disposed. /// </summary> /// <remarks> /// If any exceptions are thrown, that is fine. /// If the method is being done in a finalizer, it will be ignored. /// If it is thrown by client code calling Dispose, /// it needs to be handled by fixing the bug. /// /// If subclasses override this method, they should call the base implementation. /// </remarks> protected override void Dispose(bool disposing) { Debug.WriteLineIf(!disposing, "****************** Missing Dispose() call for " + GetType().Name + " ******************"); // Must not be run more than once. if (IsDisposed) { return; } // m_sda COM object block removed due to crash in Finializer thread LT-6124 if (disposing) { // Dispose managed resources here. } // Dispose unmanaged resources here, whether disposing is true or false. m_sda = null; m_realCache = null; m_rgws = null; m_vc = null; base.Dispose(disposing); }
/// ------------------------------------------------------------------------------------ /// <summary> /// /// </summary> /// ------------------------------------------------------------------------------------ public override void MakeRoot() { CheckDisposed(); m_rootb = null; base.MakeRoot(); if (m_fdoCache == null || DesignMode) return; m_rgws = GetWritingSystemOptions(true); // A crude way of making sure the property we want is loaded into the cache. CmObject.CreateFromDBObject(m_fdoCache, m_hvoObj); int wsUser = m_fdoCache.LanguageWritingSystemFactoryAccessor.UserWs; m_vc = new LabeledMultiStringViewVc(m_flid, m_rgws, wsUser, m_editable, this); // Review JohnT: why doesn't the base class do this?? m_rootb = VwRootBoxClass.Create(); m_rootb.SetSite(this); // And maybe this too, at least by default? m_rootb.DataAccess = m_fdoCache.MainCacheAccessor; // arg3 is a meaningless initial fragment, since this VC only displays one thing. // arg4 could be used to supply a stylesheet. m_rootb.SetRootObject(m_hvoObj, m_vc, 1, m_styleSheet); }
/// <summary> /// Executes in two distinct scenarios. /// /// 1. If disposing is true, the method has been called directly /// or indirectly by a user's code via the Dispose method. /// Both managed and unmanaged resources can be disposed. /// /// 2. If disposing is false, the method has been called by the /// runtime from inside the finalizer and you should not reference (access) /// other managed objects, as they already have been garbage collected. /// Only unmanaged resources can be disposed. /// </summary> /// <param name="disposing"></param> /// <remarks> /// If any exceptions are thrown, that is fine. /// If the method is being done in a finalizer, it will be ignored. /// If it is thrown by client code calling Dispose, /// it needs to be handled by fixing the bug. /// /// If subclasses override this method, they should call the base implementation. /// </remarks> 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) { // Dispose managed resources here. if (m_vc != null) m_vc.Dispose(); } // Dispose unmanaged resources here, whether disposing is true or false. m_rgws = null; m_vc = null; }
/// ------------------------------------------------------------------------------------ /// <summary> /// /// </summary> /// ------------------------------------------------------------------------------------ public override void MakeRoot() { CheckDisposed(); if (DesignMode) return; m_rootb = VwRootBoxClass.Create(); m_rootb.SetSite(this); m_rootb.DataAccess = m_sda; int wsUser = m_realCache.LanguageWritingSystemFactoryAccessor.UserWs; int wsEn = m_realCache.LanguageWritingSystemFactoryAccessor.GetWsFromStr("en"); m_vc = new LabeledMultiStringVc(kflid, m_rgws, wsUser, true, wsEn); // arg3 is a meaningless initial fragment, since this VC only displays one thing. m_rootb.SetRootObject(khvoRoot, m_vc, 1, m_styleSheet); m_dxdLayoutWidth = kForceLayout; // Don't try to draw until we get OnSize and do layout. // The simple root site won't lay out properly until this is done. // It needs to be done before base.MakeRoot or it won't lay out at all ever! WritingSystemFactory = m_realCache.LanguageWritingSystemFactoryAccessor; base.MakeRoot(); }
/// <summary> /// Executes in two distinct scenarios. /// /// 1. If disposing is true, the method has been called directly /// or indirectly by a user's code via the Dispose method. /// Both managed and unmanaged resources can be disposed. /// /// 2. If disposing is false, the method has been called by the /// runtime from inside the finalizer and you should not reference (access) /// other managed objects, as they already have been garbage collected. /// Only unmanaged resources can be disposed. /// </summary> /// <param name="disposing"></param> /// <remarks> /// If any exceptions are thrown, that is fine. /// If the method is being done in a finalizer, it will be ignored. /// If it is thrown by client code calling Dispose, /// it needs to be handled by fixing the bug. /// /// If subclasses override this method, they should call the base implementation. /// </remarks> protected override void Dispose(bool disposing) { //Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************"); // Must not be run more than once. if (IsDisposed) return; // m_sda COM object block removed due to crash in Finializer thread LT-6124 if (disposing) { // Dispose managed resources here. if (m_vc != null) m_vc.Dispose(); if (m_sda != null) (m_sda as IVwCacheDa).ClearAllData(); } // Dispose unmanaged resources here, whether disposing is true or false. m_sda = null; m_realCache = null; m_rgws = null; m_vc = null; base.Dispose(disposing); }
/// <summary> /// Executes in two distinct scenarios. /// /// 1. If disposing is true, the method has been called directly /// or indirectly by a user's code via the Dispose method. /// Both managed and unmanaged resources can be disposed. /// /// 2. If disposing is false, the method has been called by the /// runtime from inside the finalizer and you should not reference (access) /// other managed objects, as they already have been garbage collected. /// Only unmanaged resources can be disposed. /// </summary> /// <remarks> /// If any exceptions are thrown, that is fine. /// If the method is being done in a finalizer, it will be ignored. /// If it is thrown by client code calling Dispose, /// it needs to be handled by fixing the bug. /// /// If subclasses override this method, they should call the base implementation. /// </remarks> protected override void Dispose(bool disposing) { Debug.WriteLineIf(!disposing, "****************** Missing Dispose() call for " + GetType().Name + " ******************"); // Must not be run more than once. if (IsDisposed) return; // m_sda COM object block removed due to crash in Finializer thread LT-6124 if (disposing) { // Dispose managed resources here. } // Dispose unmanaged resources here, whether disposing is true or false. m_sda = null; m_realCache = null; m_rgws = null; m_vc = null; base.Dispose(disposing); }
/// <summary> /// Make a rootbox. When changing this, give careful consideration to changing Reuse(). /// </summary> public override void MakeRoot() { CheckDisposed(); m_rootb = null; base.MakeRoot(); if (m_fdoCache == null || DesignMode) return; m_rgws = WritingSystemOptions; int wsUser = m_fdoCache.WritingSystemFactory.UserWs; m_vc = new InnerLabeledMultiStringViewVc(m_flid, m_rgws, wsUser, m_editable, m_fdoCache.TsStrFactory, this); // Review JohnT: why doesn't the base class do this?? m_rootb = VwRootBoxClass.Create(); m_rootb.SetSite(this); // And maybe this too, at least by default? m_rootb.DataAccess = m_fdoCache.DomainDataByFlid; // arg3 is a meaningless initial fragment, since this VC only displays one thing. // arg4 could be used to supply a stylesheet. m_rootb.SetRootObject(m_hvoObj, m_vc, 1, m_styleSheet); if (SetupOtherControls != null) SetupOtherControls(this, new EventArgs()); }
/// <summary> /// Executes in two distinct scenarios. /// /// 1. If disposing is true, the method has been called directly /// or indirectly by a user's code via the Dispose method. /// Both managed and unmanaged resources can be disposed. /// /// 2. If disposing is false, the method has been called by the /// runtime from inside the finalizer and you should not reference (access) /// other managed objects, as they already have been garbage collected. /// Only unmanaged resources can be disposed. /// </summary> /// <remarks> /// If any exceptions are thrown, that is fine. /// If the method is being done in a finalizer, it will be ignored. /// If it is thrown by client code calling Dispose, /// it needs to be handled by fixing the bug. /// /// If subclasses override this method, they should call the base implementation. /// </remarks> protected override void Dispose(bool disposing) { Debug.WriteLineIf(!disposing, "****************** Missing Dispose() call for " + GetType().Name + " ******************"); // Must not be run more than once. if (IsDisposed) return; base.Dispose(disposing); if (disposing) { } // Dispose unmanaged resources here, whether disposing is true or false. m_rgws = null; m_vc = null; }