SIL.FieldWorks.FdoUi.Dialogs.RelatedWordsView.SetEntry C# (CSharp) 메소드

SetEntry() 개인적인 메소드

private SetEntry ( int hvoEntry ) : void
hvoEntry int
리턴 void
		internal void SetEntry(int hvoEntry)
		{
			CheckDisposed();
			var entry = m_cache.ServiceLocator.GetInstance<ILexEntryRepository>().GetObject(hvoEntry);
			m_headword = entry.HeadWord;
			m_hvoRoot = hvoEntry;
			m_vc = new RelatedWordsVc(m_wsUser, m_headword);
			m_rootb.SetRootObject(m_hvoRoot, m_vc, RelatedWordsVc.kfragRoot, m_styleSheet);
		}

Usage Example

예제 #1
0
        private void m_btnLookup_Click(object sender, System.EventArgs e)
        {
            using (LexEntryUi leui = GetSelWord())
            {
                if (leui == null)
                {
                    ShowNotInDictMessage(this);
                    return;
                }

                int[]      domains;
                int[]      lexrels;
                IVwCacheDa cdaTemp;
                if (!LoadDomainAndRelationInfo(m_cache, leui.Object.Hvo, out domains, out lexrels, out cdaTemp, this))
                {
                    return;
                }
                m_cdaTemp.ClearAllData();
                // copy the names loaded into the even more temporary cda to the main one.
                foreach (int hvoDomain in domains)
                {
                    m_cdaTemp.CacheStringProp(hvoDomain, RelatedWordsVc.ktagName,
                                              (cdaTemp as ISilDataAccess).get_StringProp(hvoDomain, RelatedWordsVc.ktagName));
                }
                foreach (int hvoLexRel in lexrels)
                {
                    m_cdaTemp.CacheStringProp(hvoLexRel, RelatedWordsVc.ktagName,
                                              (cdaTemp as ISilDataAccess).get_StringProp(hvoLexRel, RelatedWordsVc.ktagName));
                }
                m_hvoEntry = leui.Object.Hvo;
                SetupForEntry(domains, lexrels);
                m_view.SetEntry(m_hvoEntry);
            }
        }