Inheritance: SIL.FieldWorks.Common.RootSites.FwBaseVc
Esempio n. 1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		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;

			//Visible = false;

			if (disposing)
			{
				m_fIsDisposing = true;

				// This disposes m_wsf
				ShutDownTempWsFactory();
			}
			// Must happen before call to base.

			base.Dispose(disposing);

			if (disposing)
			{
				m_DataAccess.RemoveNotification(this);
				if (m_editingHelper != null)
					m_editingHelper.Dispose();
				if (m_rootb != null)
					m_rootb.Close();
				m_fIsDisposing = false;
			}
			m_rootb = null;
			m_editingHelper = null;
			m_vc = null;
			m_controlID = null;
			m_DataAccess = null;
			m_wsf = null;
		}
Esempio n. 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;

			//Visible = false;

			if (disposing)
				ShutDownTempWsFactory(); // Must happen before call to base.

			base.Dispose(disposing);

			if (disposing)
			{
				m_DataAccess.RemoveNotification(this);
				if (m_editingHelper != null)
					(m_editingHelper as TextBoxEditingHelper).Dispose();
				if (m_vc != null)
					m_vc.Dispose();
				if (m_CacheDa != null)
				{
					m_CacheDa.ClearAllData();
					if (Marshal.IsComObject(m_CacheDa))
						Marshal.ReleaseComObject(m_CacheDa);
				}
			}

			m_editingHelper = null;
			m_vc = null;
			m_controlID = null;
			m_DataAccess = null;
			m_wsf = null;
			m_CacheDa = null;
		}
Esempio n. 3
0
		/// -------------------------------------------------------------------------------------
		/// <summary>
		/// Default constructor
		/// </summary>
		/// -------------------------------------------------------------------------------------
		public InnerFwTextBox()
		{
			m_DataAccess = new TextBoxDataAccess();
			// Check for the availability of the FwKernel COM DLL.  Too bad we have to catch an
			// exception to make this check...
			try
			{
				ITsStrBldr bldr = TsStrBldrClass.Create();
				m_vc = new TextBoxVc(this);
				m_fTssRegistered = true;
			}
			catch
			{
				m_fTssRegistered = false;
			}
			// So many things blow up so badly if we don't have one of these that I finally decided to just
			// make one, even though it won't always, perhaps not often, be the one we want.
			CreateTempWritingSystemFactory();
			m_DataAccess.WritingSystemFactory = WritingSystemFactory;
			IsTextBox = true;	// range selection not shown when not in focus
		}
Esempio n. 4
0
		/// -------------------------------------------------------------------------------------
		/// <summary>
		/// Default constructor
		/// </summary>
		/// -------------------------------------------------------------------------------------
		public InnerFwTextBox()
		{
			m_CacheDa = VwCacheDaClass.Create();
			m_DataAccess = (ISilDataAccess)m_CacheDa;
			m_vc = new TextBoxVc(this); // this
			// So many things blow up so badly if we don't have one of these that I finally decided to just
			// make one, even though it won't always, perhaps not often, be the one we want.
			CreateTempWritingSystemFactory();
			m_DataAccess.WritingSystemFactory = WritingSystemFactory;
			this.VScroll = false; // no vertical scroll bar visible.
			this.AutoScroll = false; // not even if the root box is bigger than the window.
			this.IsTextBox = true;	// range selection not shown when not in focus
		}