public void UnicodeProp() { string strNew = m_ISilDataAccess.get_UnicodeProp(1119, 2229); Assert.IsNull(strNew); string str = "UnicodeTest"; m_IVwCacheDa.CacheUnicodeProp(1119, 2229, str, str.Length); strNew = m_ISilDataAccess.get_UnicodeProp(1119, 2229); Assert.AreEqual(str, strNew); str = "SecondUnicodeTest"; m_IVwCacheDa.CacheUnicodeProp(1119, 2229, str, str.Length); strNew = m_ISilDataAccess.get_UnicodeProp(1119, 2229); Assert.AreEqual(str, strNew); }
void m_valuesCombo_SelectedIndexChanged(object sender, EventArgs e) { // make sure the dummy value reflects the selected value int selectedRowIndex = m_bvList.SelectedIndex; int hvoSel = m_bvList.AllItems[selectedRowIndex]; string str = m_valuesCombo.SelectedItem as string; if (str == MEStrings.ks_DontCare_) { str = ""; } IVwCacheDa cda = m_cache.VwCacheDaAccessor; cda.CacheUnicodeProp(hvoSel, m_dummyPolarityFlid, str, str.Length); }
/// <summary> /// Load the tree items if the starting point is a simple context. /// </summary> /// <param name="fs"></param> private void LoadPhonFeats(List <int> featureHvos) { m_dummyPolarityFlid = DummyVirtualHandler.InstallDummyHandler(m_cache.VwCacheDaAccessor, "FsClosedFeature", "DummyPolarity", (int)CellarModuleDefns.kcptUnicode).Tag; IVwCacheDa cda = m_cache.VwCacheDaAccessor; foreach (int hvoClosedFeature in featureHvos) { string str = null; if (ContainsFeature(m_ctxt.PlusConstrRS, hvoClosedFeature)) { str = MEStrings.ksFeatConstrAgree; } else if (ContainsFeature(m_ctxt.MinusConstrRS, hvoClosedFeature)) { str = MEStrings.ksFeatConstrDisagree; } else { str = ""; } cda.CacheUnicodeProp(hvoClosedFeature, m_dummyPolarityFlid, str, str.Length); } }