/// <summary> /// Load the tree items if the starting point is a feature structure. /// </summary> /// <param name="fs"></param> private void LoadPhonFeats(IFsFeatStruc fs) { m_sda = new PhonologicalFeaturePublisher(m_cache.DomainDataByFlid as ISilDataAccessManaged, m_cache); foreach (IFsClosedFeature feat in m_cache.LangProject.PhFeatureSystemOA.FeaturesOC) { if (fs != null) { var closedValue = fs.GetValue(feat); if (closedValue != null) { m_sda.SetObjProp(feat.Hvo, PhonologicalFeaturePublisher.ValueFlid, closedValue.ValueRA.Hvo); } else { if (m_ctxt != null && ShowFeatureConstraintValues) { string str; if (ContainsFeature(m_ctxt.PlusConstrRS, feat)) { str = LexTextControls.ksFeatConstrAgree; } else if (ContainsFeature(m_ctxt.MinusConstrRS, feat)) { str = LexTextControls.ksFeatConstrDisagree; } else { str = ""; } if (!string.IsNullOrEmpty(str)) { m_sda.SetUnicode(feat.Hvo, PhonologicalFeaturePublisher.PolarityFlid, str, str.Length); continue; } } // set the value to zero so nothing shows m_sda.SetObjProp(feat.Hvo, PhonologicalFeaturePublisher.ValueFlid, 0); } } else { // set the value to zero so nothing shows m_sda.SetObjProp(feat.Hvo, PhonologicalFeaturePublisher.ValueFlid, 0); } } }
/// <summary> /// Load the tree items if the starting point is a feature structure. /// </summary> /// <param name="fs"></param> private void LoadPhonFeats(IFsFeatStruc fs) { m_sda = new PhonologicalFeaturePublisher(m_cache.DomainDataByFlid as ISilDataAccessManaged); foreach (IFsClosedFeature feat in m_cache.LangProject.PhFeatureSystemOA.FeaturesOC) { if (fs != null) { var closedValue = fs.GetValue(feat); if (closedValue != null) { m_sda.SetObjProp(feat.Hvo, PhonologicalFeaturePublisher.ValueFlid, closedValue.ValueRA.Hvo); } else { // set the value to zero so nothing shows m_sda.SetObjProp(feat.Hvo, PhonologicalFeaturePublisher.ValueFlid, 0); } } else { // set the value to zero so nothing shows m_sda.SetObjProp(feat.Hvo, PhonologicalFeaturePublisher.ValueFlid, 0); } } }
/// <summary> /// Load the tree items if the starting point is a feature structure. /// </summary> /// <param name="fs"></param> private void LoadPhonFeats(IFsFeatStruc fs) { m_sda = new PhonologicalFeaturePublisher(m_cache.DomainDataByFlid as ISilDataAccessManaged, m_cache); foreach (IFsClosedFeature feat in m_cache.LangProject.PhFeatureSystemOA.FeaturesOC) { if (fs != null) { var closedValue = fs.GetValue(feat); if (closedValue != null) { m_sda.SetObjProp(feat.Hvo, PhonologicalFeaturePublisher.ValueFlid, closedValue.ValueRA.Hvo); } else { if (m_ctxt != null && ShowFeatureConstraintValues) { string str; if (ContainsFeature(m_ctxt.PlusConstrRS, feat)) str = LexTextControls.ksFeatConstrAgree; else if (ContainsFeature(m_ctxt.MinusConstrRS, feat)) str = LexTextControls.ksFeatConstrDisagree; else str = ""; if (!string.IsNullOrEmpty(str)) { m_sda.SetUnicode(feat.Hvo, PhonologicalFeaturePublisher.PolarityFlid, str, str.Length); continue; } } // set the value to zero so nothing shows m_sda.SetObjProp(feat.Hvo, PhonologicalFeaturePublisher.ValueFlid, 0); } } else { // set the value to zero so nothing shows m_sda.SetObjProp(feat.Hvo, PhonologicalFeaturePublisher.ValueFlid, 0); } } }