private void CollectionChange(InBase item, bool visible) { if(item == null) { throw new ArgumentNullException("item"); } if(visible) { lock(_valueVC) { int min = 0, mid = -1, max = _valueVC.Count - 1, cr; while(min <= max) { mid = (min + max) / 2; cr = item.CompareTo(_valueVC[mid]); if(cr > 0) { min = mid + 1; } else if(cr < 0) { max = mid - 1; mid = max; } else { break; } } _valueVC.Insert(mid + 1, item); } } else { _valueVC.Remove(item); } }
public override string ToString() { return(InBase.ToString()[0].ToString() + InLocal.ToString()[0].ToString() + InRemote.ToString()[0].ToString() + " " + Path); }
public veSliderBool(InBase owner, JSC.JSValue schema) { _owner = owner; InitializeComponent(); ValueChanged(_owner.value); cbBool.Checked+=cbBool_Checked; cbBool.Unchecked+=cbBool_Unchecked; }
public static IValueEditor GetEdititor(string view, InBase owner, JSC.JSValue schema) { IValueEditor rez; Func<InBase, JSC.JSValue, IValueEditor> ct; if(_editors.TryGetValue(view, out ct) && ct != null) { rez = ct(owner, schema); } else { rez = new veDefault(owner, schema); } return rez; }
public veString(InBase owner, JSC.JSValue schema) { _owner = owner; base.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; base.Padding = new System.Windows.Thickness(10, 0, 10, 0); base.BorderThickness = new System.Windows.Thickness(0); base.Background = System.Windows.Media.Brushes.Azure; base.GotFocus += ve_GotFocus; base.LostFocus += ve_LostFocus; base.KeyUp += ve_KeyUp; ValueChanged(_owner.value); SchemaChanged(schema); }
public override int CompareTo(InBase other) { var o = other as InValue; return o == null ? -1 : this._path.CompareTo(o._path); }
public veDefault(InBase owner, JSC.JSValue schema) { base.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; base.Padding = new System.Windows.Thickness(10, 2, 10, 0); ValueChanged(owner.value); }
public static IValueEditor Create(InBase owner, JSC.JSValue schema) { return new veInteger(owner, schema); }
public static IValueEditor Create(InBase owner, JSC.JSValue schema) { return new veSliderBool(owner, schema); }
public override int CompareTo(InBase other) { var o = other as InTopic; return o == null?1:this.path.CompareTo(o.path); }