Ejemplo n.º 1
0
 public void AttachData(PairSwitcher p, SimpleScore s)
 {
     if (m_score == null)
     {
         m_score          = s;
         m_score.Changed += OnValueChanged;
     }
     if (m_pair == null)
     {
         m_pair          = p;
         m_pair.Changed += OnValueChanged;
     }
     OnValueChanged(this, null);
 }
Ejemplo n.º 2
0
        public void DetachData(bool _inv)
        {
            if (m_score != null)
            {
                m_score.Changed -= OnValueChanged;
                m_score          = null;
            }
            if (m_pair != null)
            {
                m_pair.Changed -= OnValueChanged;
                m_pair          = null;
            }

            if (_inv)
            {
                OnValueChanged(this, null);
            }
        }