示例#1
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)
                {
                    if (m_vc != null)
                    {
                        m_vc.Dispose();
                    }
                }

                ShutDownTempWsFactory();                 // *May* set m_wsf to null.
                //m_wsf = null;
                m_vc         = null;
                m_object     = null;
                m_DataAccess = null;
                if (m_CacheDa != null)
                {
                    m_CacheDa.ClearAllData();
                    if (Marshal.IsComObject(m_CacheDa))
                    {
                        Marshal.ReleaseComObject(m_CacheDa);
                    }
                    m_CacheDa = null;
                }
            }
示例#2
0
 public InnerTsStringBox()
 {
     m_CacheDa    = VwCacheDaClass.Create();
     m_DataAccess = (ISilDataAccess)m_CacheDa;
     m_vc         = new TsStringBoxVc(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;
     VScroll    = false;              // no vertical scroll bar visible.
     AutoScroll = false;              // not even if the root box is bigger than the window.
     BackColor  = Color.White;
 }
示例#3
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)
				{
					if (m_vc != null)
						m_vc.Dispose();
				}

				ShutDownTempWsFactory(); // *May* set m_wsf to null.
				//m_wsf = null;
				m_vc = null;
				m_object = null;
				m_DataAccess = null;
				if (m_CacheDa != null)
				{
					m_CacheDa.ClearAllData();
					if (Marshal.IsComObject(m_CacheDa))
						Marshal.ReleaseComObject(m_CacheDa);
					m_CacheDa = null;
				}
			}
示例#4
0
			public InnerTsStringBox()
			{
				m_CacheDa = VwCacheDaClass.Create();
				m_DataAccess = (ISilDataAccess)m_CacheDa;
				m_vc = new TsStringBoxVc(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;
				VScroll = false; // no vertical scroll bar visible.
				AutoScroll = false; // not even if the root box is bigger than the window.
				BackColor = Color.White;
			}