protected virtual void OnValueToIndex(ValueIndexConversionEventArgs e)
 {
     if (!this._inOnIndexToValue && (this.ValueToIndex != null))
     {
         int index = this.ValueToIndex(this, e);
         if ((!e.Cancel && !this.DeselectAllIndex(index)) && this.ValidateIndex(index))
         {
             this._index           = index;
             this._backgroundValid = false;
         }
     }
 }
 protected virtual void OnIndexToValue(ValueIndexConversionEventArgs e)
 {
     this._inOnIndexToValue = true;
     if (this.IndexToValue != null)
     {
         int num = this.IndexToValue(this, e);
         if ((!e.Cancel && (this.NeedChangeValue != null)) && this.ValidateValue(num))
         {
             this.NeedChangeValue(this, new ValueIndexConversionEventArgs(num));
         }
     }
     this._inOnIndexToValue = false;
 }
 protected virtual void OnValueToIndex(ValueIndexConversionEventArgs e)
 {
     if (!this._inOnIndexToValue && (this.ValueToIndex != null))
     {
         int index = this.ValueToIndex(this, e);
         if ((!e.Cancel && !this.DeselectAllIndex(index)) && this.ValidateIndex(index))
         {
             this._index = index;
             this._backgroundValid = false;
         }
     }
 }
 protected virtual void OnIndexToValue(ValueIndexConversionEventArgs e)
 {
     this._inOnIndexToValue = true;
     if (this.IndexToValue != null)
     {
         int num = this.IndexToValue(this, e);
         if ((!e.Cancel && (this.NeedChangeValue != null)) && this.ValidateValue(num))
         {
             this.NeedChangeValue(this, new ValueIndexConversionEventArgs(num));
         }
     }
     this._inOnIndexToValue = false;
 }