/// <summary> /// Override to support fake integer properties. /// </summary> /// <param name="hvo"></param> /// <param name="tag"></param> /// <param name="n"></param> public override void SetInt(int hvo, int tag, int n) { switch (tag) { default: base.SetInt(hvo, tag, n); break; case ktagActiveColumn: case ktagItemEnabled: { var key = new HvoFlidKey(hvo, tag); int oldVal; if (m_integerCache.TryGetValue(key, out oldVal) && oldVal == n) { return; // unchanged, avoid especially PropChanged. } m_integerCache[key] = n; SendPropChanged(hvo, tag, 0, 0, 0); } break; case ktagItemSelected: { if (GetItemSelectedValue(hvo) == n) { return; // unchanged, avoid especially PropChanged. } m_selectedCache[hvo] = n; SendPropChanged(hvo, tag, 0, 0, 0); } break; } }
/// <summary> /// Override to support fake integer properties. /// </summary> /// <param name="hvo"></param> /// <param name="tag"></param> /// <param name="n"></param> public override void SetInt(int hvo, int tag, int n) { switch (tag) { default: base.SetInt(hvo, tag, n); break; case ktagActiveColumn: case ktagItemEnabled: { var key = new HvoFlidKey(hvo, tag); int oldVal; if (m_integerCache.TryGetValue(key, out oldVal) && oldVal == n) return; // unchanged, avoid especially PropChanged. m_integerCache[key] = n; SendPropChanged(hvo, tag, 0, 0, 0); } break; case ktagItemSelected: { if (GetItemSelectedValue(hvo) == n) return; // unchanged, avoid especially PropChanged. m_selectedCache[hvo] = n; SendPropChanged(hvo, tag, 0, 0, 0); } break; } }