Example #1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Creates a new HFSetView
		/// </summary>
		/// <param name="sda">The ISilDataAccess for the view</param>
		/// <param name="vc">The view constructor used to create the view</param>
		/// <param name="hvoHeader">The id of the PubHeader used to get the Header/Footer
		/// information to display in the view</param>
		/// ------------------------------------------------------------------------------------
		public HFSetView(ISilDataAccess sda, HeaderFooterVc vc, int hvoHeader) : base()
		{
			m_sda = sda;
			WritingSystemFactory = m_sda.WritingSystemFactory;
			m_vc = vc;
			m_hvoHeader = hvoHeader;
		}
Example #2
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Creates a new HFSetView
 /// </summary>
 /// <param name="sda">The ISilDataAccess for the view</param>
 /// <param name="vc">The view constructor used to create the view</param>
 /// <param name="hvoHeader">The id of the PubHeader used to get the Header/Footer
 /// information to display in the view</param>
 /// ------------------------------------------------------------------------------------
 public HFSetView(ISilDataAccess sda, HeaderFooterVc vc, int hvoHeader) : base()
 {
     m_sda = sda;
     WritingSystemFactory = m_sda.WritingSystemFactory;
     m_vc        = vc;
     m_hvoHeader = hvoHeader;
 }
		/// -------------------------------------------------------------------------------------
		/// <summary>
		/// Creates and returns the footer view construtor for the layout.
		/// </summary>
		/// <param name="page">Page info</param>
		/// <returns>the footer view construtor</returns>
		/// -------------------------------------------------------------------------------------
		public virtual IVwViewConstructor MakeFooterVc(IPageInfo page)
		{
			// TODO: Supply params to configure footer based on the header/footer set being used.
			HeaderFooterVc vc = new HeaderFooterVc(page, m_wsDefault, m_printDateTime, m_fdoCache);
			vc.SetDa(m_fdoCache.MainCacheAccessor);
			return vc;
		}
Example #4
0
        public override void FixtureTeardown()
        {
            m_vc       = null;
            m_pageInfo = null;

            base.FixtureTeardown();
        }
Example #5
0
        public override void FixtureSetup()
        {
            base.FixtureSetup();

            m_pageInfo = new DummyPageInfo();
            m_vc       = new HeaderFooterVc(m_pageInfo, Cache.DefaultVernWs, DateTime.Now, Cache);
        }
Example #6
0
        /// -------------------------------------------------------------------------------------
        /// <summary>
        /// Creates and returns the footer view construtor for the layout.
        /// </summary>
        /// <param name="page">Page info</param>
        /// <returns>the footer view construtor</returns>
        /// -------------------------------------------------------------------------------------
        public virtual IVwViewConstructor MakeFooterVc(IPageInfo page)
        {
            // TODO: Supply params to configure footer based on the header/footer set being used.
            HeaderFooterVc vc = new HeaderFooterVc(page, m_wsDefault, m_printDateTime, m_fdoCache);

            vc.SetDa(m_fdoCache.MainCacheAccessor);
            return(vc);
        }
Example #7
0
        public void Setup()
        {
            Dictionary <string, string> cacheOptions = new Dictionary <string, string>();

            cacheOptions.Add("db", "TestLangProj");
            m_fdoCache = FdoCache.Create(cacheOptions);
            m_pageInfo = new DummyPageInfo();
            m_vc       = new HeaderFooterVc(m_pageInfo, m_fdoCache.DefaultVernWs, DateTime.Now, m_fdoCache);
        }
Example #8
0
		/// <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)
		{
			// Must not be run more than once.
			if (IsDisposed)
				return;

			base.Dispose(disposing);

			if (disposing)
			{
				// Dispose managed resources here.
			}

			// Dispose unmanaged resources here, whether disposing is true or false.
			m_vc = null;
			m_sda = null; // This comes from an FdoCache, so just turn loose of it.
		}
Example #9
0
        /// <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)
        {
            // Must not be run more than once.
            if (IsDisposed)
            {
                return;
            }

            base.Dispose(disposing);

            if (disposing)
            {
                // Dispose managed resources here.
            }

            // Dispose unmanaged resources here, whether disposing is true or false.
            m_vc  = null;
            m_sda = null;             // This comes from an FdoCache, so just turn loose of it.
        }
Example #10
0
        /// <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;
            }

            base.Dispose(disposing);

            if (disposing)
            {
                // Dispose managed resources here.
                if (m_vc != null)
                {
                    m_vc.Dispose();
                }
            }

            // Dispose unmanaged resources here, whether disposing is true or false.
            m_vc  = null;
            m_sda = null;             // This comes from an FdoCache, so just turn loose of it.
        }
Example #11
0
		public void Setup()
		{
			Dictionary<string, string> cacheOptions = new Dictionary<string, string>();
			cacheOptions.Add("db", "TestLangProj");
			m_fdoCache = FdoCache.Create(cacheOptions);
			m_pageInfo = new DummyPageInfo();
			m_vc = new HeaderFooterVc(m_pageInfo, m_fdoCache.DefaultVernWs, DateTime.Now, m_fdoCache);
		}
Example #12
0
		public override void FixtureTeardown()
		{
			m_vc = null;
			m_pageInfo = null;

			base.FixtureTeardown();
		}
Example #13
0
		public override void FixtureSetup()
		{
			base.FixtureSetup();

			m_pageInfo = new DummyPageInfo();
			m_vc = new HeaderFooterVc(m_pageInfo, Cache.DefaultVernWs, DateTime.Now, Cache);
		}
Example #14
0
		/// <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;

			base.Dispose(disposing);

			if (disposing)
			{
				// Dispose managed resources here.
				if (m_vc != null)
					m_vc.Dispose();
			}

			// Dispose unmanaged resources here, whether disposing is true or false.
			m_vc = null;
			m_sda = null; // This comes from an FdoCache, so just turn loose of it.
		}