Inheritance: SIL.FieldWorks.Common.RootSites.SimpleRootSite
        /// <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.
                if (m_innerControl != null)
                {
                    if (m_innerControl.RootBox != null && m_innerControl.RootBox.DataAccess != null)
                    {
                        m_innerControl.RootBox.DataAccess.RemoveNotification(this);
                    }

                    m_innerControl.MouseEnter -= new EventHandler(m_innerControl_MouseEnter);
                    m_innerControl.MouseLeave -= new EventHandler(m_innerControl_MouseLeave);
                    m_innerControl.GotFocus   -= new EventHandler(m_innerControl_GotFocus);
                    m_innerControl.LostFocus  -= new EventHandler(m_innerControl_LostFocus);
                }
            }

            // Dispose unmanaged resources here, whether disposing is true or false.
            m_innerControl = 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>
		/// <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_innerControl != null)
				{
					if (m_innerControl.RootBox != null && m_innerControl.RootBox.DataAccess != null)
						m_innerControl.RootBox.DataAccess.RemoveNotification(this);

					m_innerControl.MouseEnter -= new EventHandler(m_innerControl_MouseEnter);
					m_innerControl.MouseLeave -= new EventHandler(m_innerControl_MouseLeave);
					m_innerControl.GotFocus -= new EventHandler(m_innerControl_GotFocus);
					m_innerControl.LostFocus -= new EventHandler(m_innerControl_LostFocus);
				}
			}

			// Dispose unmanaged resources here, whether disposing is true or false.
			m_innerControl = null;

			base.Dispose(disposing);
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="LabeledMultiStringControl"/> class.
		/// </summary>
		/// <param name="cache">The cache.</param>
		/// <param name="wsMagic">The ws magic.</param>
		/// <param name="vss">The VSS.</param>
		/// ------------------------------------------------------------------------------------
		/// ------------------------------------------------------------------------------------
		public LabeledMultiStringControl(FdoCache cache, int wsMagic, IVwStylesheet vss)
		{
			m_innerControl = new InnerLabeledMultiStringControl(cache, wsMagic);
			if (vss != null)
				m_innerControl.StyleSheet = vss;
			m_innerControl.Dock = DockStyle.Fill;
			this.Controls.Add(m_innerControl);
			m_innerControl.MakeRoot();

			m_innerControl.RootBox.DataAccess.AddNotification(this);
			m_innerControl.MouseEnter += new EventHandler(m_innerControl_MouseEnter);
			m_innerControl.MouseLeave += new EventHandler(m_innerControl_MouseLeave);
			m_innerControl.GotFocus += new EventHandler(m_innerControl_GotFocus);
			m_innerControl.LostFocus += new EventHandler(m_innerControl_LostFocus);

			HasBorder = true;
			Height = PreferredHeight;
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="LabeledMultiStringControl"/> class.
		/// For use with a non-standard list of wss (like available UI languages).
		/// (See CustomListDlg)
		/// </summary>
		/// <param name="cache">The FdoCache.</param>
		/// <param name="wsList">The non-standard list of IWritingSystems.</param>
		/// <param name="vss">The stylesheet.</param>
		public LabeledMultiStringControl(FdoCache cache, List<IWritingSystem> wsList, IVwStylesheet vss)
		{

			m_innerControl = new InnerLabeledMultiStringControl(cache, wsList);
			InternalInit(cache, vss);
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="LabeledMultiStringControl"/> class.
		/// </summary>
		public LabeledMultiStringControl(FdoCache cache, int wsMagic, IVwStylesheet vss)
		{
			m_innerControl = new InnerLabeledMultiStringControl(cache, wsMagic);
			InternalInit(cache, vss);
		}
 /// <summary>
 /// Initializes a new instance of the <see cref="LabeledMultiStringControl"/> class.
 /// For use with a non-standard list of wss (like available UI languages).
 /// (See CustomListDlg)
 /// </summary>
 /// <param name="cache">The FdoCache.</param>
 /// <param name="wsList">The non-standard list of IWritingSystems.</param>
 /// <param name="vss">The stylesheet.</param>
 public LabeledMultiStringControl(FdoCache cache, List <IWritingSystem> wsList, IVwStylesheet vss)
 {
     m_innerControl = new InnerLabeledMultiStringControl(cache, wsList);
     InternalInit(cache, vss);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="LabeledMultiStringControl"/> class.
 /// </summary>
 public LabeledMultiStringControl(FdoCache cache, int wsMagic, IVwStylesheet vss)
 {
     m_innerControl = new InnerLabeledMultiStringControl(cache, wsMagic);
     InternalInit(cache, vss);
 }
Beispiel #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LabeledMultiStringControl"/> class.
 /// For use with a non-standard list of wss (like available UI languages).
 /// (See CustomListDlg)
 /// </summary>
 /// <param name="cache">The LcmCache.</param>
 /// <param name="wsList">The non-standard list of IWritingSystems.</param>
 /// <param name="vss">The stylesheet.</param>
 public LabeledMultiStringControl(LcmCache cache, List <CoreWritingSystemDefinition> wsList, IVwStylesheet vss)
 {
     m_innerControl = new InnerLabeledMultiStringControl(cache, wsList);
     InternalInit(cache, vss);
 }