/// ----------------------------------------------------------------------------------- /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged /// resources; <c>false</c> to release only unmanaged resources. /// </param> /// ----------------------------------------------------------------------------------- protected override void Dispose(bool disposing) { System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** "); // Must not be run more than once. if (IsDisposed) { return; } if (disposing) { if (components != null) { components.Dispose(); } if (m_styleListHelper != null) { m_styleListHelper.Dispose(); } } m_styleListHelper = null; m_StyleSheet = null; m_mapping = null; m_cache = null; m_scr = null; base.Dispose(disposing); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="T:FwApplyStyleDlg"/> class. /// </summary> /// <param name="rootSite">The root site.</param> /// <param name="cache">The cache.</param> /// <param name="hvoStylesOwner">The hvo of the object which owns the style.</param> /// <param name="stylesTag">The "flid" in which the styles are owned.</param> /// <param name="normalStyleName">Name of the normal style.</param> /// <param name="customUserLevel">The custom user level.</param> /// <param name="paraStyleName">Name of the currently selected paragraph style.</param> /// <param name="charStyleName">Name of the currently selected character style.</param> /// <param name="hvoRootObject">The hvo of the root object in the current view.</param> /// <param name="app">The application.</param> /// <param name="helpTopicProvider">The help topic provider.</param> /// ------------------------------------------------------------------------------------ public FwApplyStyleDlg(IVwRootSite rootSite, FdoCache cache, int hvoStylesOwner, int stylesTag, string normalStyleName, int customUserLevel, string paraStyleName, string charStyleName, int hvoRootObject, IApp app, IHelpTopicProvider helpTopicProvider) { m_rootSite = rootSite; InitializeComponent(); m_customUserLevel = customUserLevel; m_helpTopicProvider = helpTopicProvider; m_paraStyleName = paraStyleName; m_charStyleName = charStyleName; // Cache is null in tests if (cache == null) { return; } m_cboTypes.SelectedIndex = 1; // All Styles // Load the style information m_styleTable = new StyleInfoTable(normalStyleName, cache.ServiceLocator.WritingSystemManager); m_styleSheet = new FwStyleSheet(); m_styleSheet.Init(cache, hvoStylesOwner, stylesTag); m_styleListHelper = new StyleListBoxHelper(m_lstStyles); m_styleListHelper.ShowInternalStyles = false; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="MappingDetailsCtrl"/> class. /// </summary> /// ------------------------------------------------------------------------------------ public MappingDetailsCtrl() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); m_styleListHelper = new StyleListBoxHelper(lbStyles); }
/// ----------------------------------------------------------------------------------- /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged /// resources; <c>false</c> to release only unmanaged resources. /// </param> /// ----------------------------------------------------------------------------------- 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) { if (components != null) { components.Dispose(); } } m_styleListHelper = null; m_StyleSheet = null; m_mapping = null; m_cache = null; m_scr = null; base.Dispose(disposing); }