Exemplo n.º 1
0
			public SandboxVc(CachePair caches, InterlinLineChoices choices, bool fIconsForAnalysisChoices, SandboxBase sandbox)
			{
				m_caches = caches;
				m_cache = caches.MainCache; //prior to 9-20-2011 this was not set, if we find there was a reason get rid of this.
				m_choices = choices;
				m_sandbox = sandbox;
				m_fIconsForAnalysisChoices = fIconsForAnalysisChoices;
				m_wsAnalysis = caches.MainCache.DefaultAnalWs;
				m_wsUi = caches.MainCache.LanguageWritingSystemFactoryAccessor.UserWs;
				m_tssMissingMorphs = m_tsf.MakeString(ITextStrings.ksStars, m_sandbox.RawWordformWs);
				m_tssEmptyAnalysis = m_tsf.MakeString("", m_wsAnalysis);
				m_tssEmptyVern = m_tsf.MakeString("", m_sandbox.RawWordformWs);
				m_tssMissingEntry = m_tssMissingMorphs;
				// It's tempting to re-use m_tssMissingMorphs, but the analysis and vernacular default
				// fonts may have different sizes, requiring differnt line heights to align things well.
				m_tssMissingMorphGloss = m_tsf.MakeString(ITextStrings.ksStars, m_wsAnalysis);
				m_tssMissingMorphPos = m_tsf.MakeString(ITextStrings.ksStars, m_wsAnalysis);
				m_tssMissingWordPos = m_tssMissingMorphPos;
				m_PulldownArrowPic = VwConstructorServices.ConvertImageToComPicture(ResourceHelper.InterlinPopupArrow);
				m_dxmpArrowPicWidth = ConvertPictureWidthToMillipoints(m_PulldownArrowPic.Picture);
				IWritingSystem wsObj = caches.MainCache.ServiceLocator.WritingSystemManager.Get(m_sandbox.RawWordformWs);
				if (wsObj != null)
					m_fRtl = wsObj.RightToLeftScript;

			}
		public OnePictureOneEditBoxVc()
		{
			m_picture = VwConstructorServices.ConvertImageToComPicture(Properties.Resources.InterlinPopupArrow);
		}
Exemplo n.º 3
0
			/// <summary/>
			protected virtual void Dispose(bool fDisposing)
			{
				System.Diagnostics.Debug.WriteLineIf(!fDisposing, "****** Missing Dispose() call for " + GetType().ToString() + " *******");
				if (fDisposing && !IsDisposed)
				{
					// Dispose managed resources here.
					if (m_PulldownArrowPic != null)
						m_PulldownArrowPic.Dispose();
				}

				// Dispose unmanaged resources here, whether disposing is true or false.
				m_sandbox = null; // Client gave it to us, so has to deal with it.
				m_caches = null; // Client gave it to us, so has to deal with it.
				m_PulldownArrowPic = null;
				m_tsf = null;
				m_tssMissingEntry = null; // Same as m_tssMissingMorphs, so just null it.
				m_tssMissingWordPos = null; // Same as m_tssMissingMorphPos, so just null it.
				m_tssMissingMorphs = null;
				m_tssEmptyAnalysis = null;
				m_tssEmptyVern = null;
				m_tssMissingMorphGloss = null;
				m_tssMissingMorphPos = null;
				IsDisposed = true;
			}