/// <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(); } } RequestedSelectionAtEndOfUow = null; Cache = null; m_basicViewVc = null; m_SelectionHelper = null; }
/// ------------------------------------------------------------------------------------ /// <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> /// <param name="hvoWs">The ID of thje default Writing System to use</param> /// ------------------------------------------------------------------------------------ public void MakeRoot(int hvoRoot, int flid, int frag, int hvoWs) { CheckDisposed(); if (Cache == null || DesignMode) { return; } base.MakeRoot(); // Set up a new view constructor. m_basicViewVc = new SimpleViewVc(DisplayType, flid); m_basicViewVc.DefaultWs = hvoWs; m_rootb.DataAccess = Cache; 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. } }
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); }
protected void MakeRoot(int hvoRoot, int flid, int frag, int hvoDefaultWs, VwBaseVc vc) { CheckDisposed(); if (DesignMode) { return; } base.MakeRoot(); m_fragRoot = frag; // Set up a new view constructor. m_vc = vc; m_vc.DefaultWs = hvoDefaultWs; m_rootb.DataAccess = Cache; m_rootb.SetRootObject(hvoRoot, m_vc, frag, m_styleSheet); }
protected void MakeRoot(int hvoRoot, int flid, int frag, int hvoDefaultWs, VwBaseVc vc) { CheckDisposed(); if (DesignMode) return; base.MakeRoot(); m_rootb = VwRootBoxClass.Create(); m_rootb.SetSite(this); m_fragRoot = frag; // Set up a new view constructor. m_vc = vc; m_vc.DefaultWs = hvoDefaultWs; m_rootb.DataAccess = Cache; m_rootb.SetRootObject(hvoRoot, m_vc, frag, m_styleSheet); }
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> /// 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(); } RequestedSelectionAtEndOfUow = null; Cache = null; m_basicViewVc = null; m_SelectionHelper = null; }
/// ------------------------------------------------------------------------------------ /// <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> /// <param name="hvoWs">The ID of thje default Writing System to use</param> /// ------------------------------------------------------------------------------------ public void MakeRoot(int hvoRoot, int flid, int frag, int hvoWs) { CheckDisposed(); if (Cache == null || DesignMode) return; base.MakeRoot(); m_rootb = VwRootBoxClass.Create(); m_rootb.SetSite(this); // Set up a new view constructor. m_basicViewVc = new SimpleViewVc(DisplayType, flid); m_basicViewVc.DefaultWs = hvoWs; m_rootb.DataAccess = Cache; 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. } }