Inheritance: SIL.FieldWorks.Common.RootSites.VwBaseVc
示例#1
0
		/// <summary>
		/// Create the root box and initialize it.
		/// </summary>
		public override void MakeRoot()
		{
			CheckDisposed();

			if (DesignMode)
				return;
			m_rootb = VwRootBoxClass.Create();
			m_rootb.SetSite(this);
			m_rootb.DataAccess = m_DataAccess;
			if (m_vc == null)
				m_vc = new ListBoxVc(this);
			m_rootb.SetRootObject(khvoRoot, m_vc, kfragRoot, m_styleSheet);
			m_dxdLayoutWidth = kForceLayout; // Don't try to draw until we get OnSize and do layout.
			EditingHelper.DefaultCursor = Cursors.Arrow;
			base.MakeRoot();
		}
示例#2
0
		/// <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;

			base.Dispose(disposing);

			if (disposing)
			{
				// Cleanup managed stuff here.
				if (m_vc != null)
					m_vc.Dispose();
			}
			// Cleanup unmanaged stuff here.
			m_DataAccess = null;
			if (m_CacheDa != null)
			{
				m_CacheDa.ClearAllData();
				if (Marshal.IsComObject(m_CacheDa))
					Marshal.ReleaseComObject(m_CacheDa);
				m_CacheDa = null;
			}
			m_owner = null; // It will get disposed on its own, if it hasn't been already.
			m_vc = null;
		}
示例#3
0
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			// Must not be run more than once.
			if (IsDisposed)
				return;

			if (disposing)
			{
				// Cleanup managed stuff here.
				if (m_cacheDa != null)
					m_cacheDa.ClearAllData();
			}
			// Cleanup unmanaged stuff here.
			m_dataAccess = null;
			if (m_cacheDa != null)
			{
				if (Marshal.IsComObject(m_cacheDa))
					Marshal.ReleaseComObject(m_cacheDa);
				m_cacheDa = null;
			}
			m_owner = null; // It will get disposed on its own, if it hasn't been already.
			m_vc = null;

			base.Dispose(disposing);
		}