Exemplo n.º 1
0
 public void SetValueAndNotify(string newValue)
 {
     if (!EqualityComparer <string> .Default.Equals(this.value, newValue))
     {
         using (ChangeEvent <string> pooled = ChangeEvent <string> .GetPooled(this.value, newValue))
         {
             pooled.target = this;
             this.value    = newValue;
             UIElementsUtility.eventDispatcher.DispatchEvent(pooled, base.panel);
         }
     }
 }
Exemplo n.º 2
0
 public virtual void SetValueAndNotify(T newValue)
 {
     if (!EqualityComparer <T> .Default.Equals(value, newValue))
     {
         using (ChangeEvent <T> evt = ChangeEvent <T> .GetPooled(value, newValue))
         {
             evt.target = this;
             value      = newValue;
             UIElementsUtility.eventDispatcher.DispatchEvent(evt, panel);
         }
     }
 }
Exemplo n.º 3
0
        public override void OnPersistentDataReady()
        {
            base.OnPersistentDataReady();
            var key = GetFullHierarchicalPersistenceKey();

            var oldValue = m_Value;

            OverwriteFromPersistedData(this, key);

            if (!EqualityComparer <T> .Default.Equals(oldValue, m_Value))
            {
                using (ChangeEvent <T> evt = ChangeEvent <T> .GetPooled(oldValue, m_Value))
                {
                    evt.target = this;
                    SendEvent(evt);
                }
            }
        }