void item_Label_ValueChanged(IViewableProperty <string> property, string newValue, string oldValue) { if (TrackRenamed != null) { TrackRenamed(oldValue, newValue); } }
// BeUtilExtensions.FlowIntoRd subscribes to Advise on source.Change, which is a signal. This means it doesn't // send the acknowledgement (i.e. set the current value immediately) as part of Advise. FlowIntoRd will set the // target value from the source itself, but doesn't check if the source value has been set, which can cause // exceptions. We'll Advise the source itself, which does check the source value, and sends an acknowledgement public static void FlowIntoRdSafe <TValue>( [NotNull] this IViewableProperty <TValue> source, Lifetime lifetime, [NotNull] IViewableProperty <TValue> target) { source.Advise(lifetime, val => target.Value = val); }
public static void FlowIntoRdSafe <TValue, TResult>( [NotNull] this IViewableProperty <TValue> source, Lifetime lifetime, Func <TValue, TResult> converter, [NotNull] IViewableProperty <TResult> target) { source.Advise(lifetime, val => target.Value = converter(val)); }
public RdOtBasedText(RdOtState @delegate) : base(@delegate) { myTextChanged = new ViewableProperty <RdTextChange>(); myDiff = new List <OtOperation>(); // disabling mastering, text buffer must resolve conflicts by itself ((RdProperty <OtOperation>)Delegate.Operation).IsMaster = false; }
public RdTextBuffer(RdTextBufferState state) : base(state) { myTextChanged = new ViewableProperty <RdTextChange>(); myChangesToConfirmOrRollback = new List <RdTextBufferChange>(); BufferVersion = TextBufferVersion.InitVersion; myLocalOrigin = IsMaster ? RdChangeOrigin.Master : RdChangeOrigin.Slave; // disabling mastering, text buffer must resolve conflicts by itself ((RdProperty <RdTextBufferChange>)Delegate.Changes).IsMaster = false; }
public static void FlowChangesIntoRdDeferred<TValue>( [NotNull] this IViewableProperty<TValue> source, Lifetime lifetime, [NotNull] Func<IViewableProperty<TValue>> nullableTargetCreator) { // If the source has a value, Advise will immediately try to set it on target source.Advise(lifetime, args => { var target = nullableTargetCreator(); if (target != null) target.Value = source.Value; }); }
void Time_ValueChanged(IViewableProperty <float> property, float newValue, float oldValue) { if (NeighbourLeft != null) { if (NeighbourLeft.Time.Value > this.Time.Value) { NeighbourChanged(); return; } } if (NeighbourRight != null) { if (NeighbourRight.Time.Value < this.Time.Value) { NeighbourChanged(); return; } } }
public T4OutputExtensionChangeListener([NotNull] IViewableProperty <string> sink) => Sink = sink;
public LifeModel() { StrProperty = new RdProperty <string>(Serializers.ReadString, Serializers.WriteString); }
void EaseChanged(IViewableProperty <int> property, int newValue, int oldValue) { FIsDirty = true; }
void CurveChanged(IViewableProperty <float> property, float newValue, float oldValue) { FIsDirty = true; }
void item_Label_ValueChanged(IViewableProperty<string> property, string newValue, string oldValue) { if (TrackRenamed != null) TrackRenamed(oldValue, newValue); }
public DeferredCacheProgressBar(Lifetime lifetime, DeferredHelperCache cache) { CurrentFile = new ViewableProperty <IPsiSourceFile>(null); }
public ViewablePropertyCell(IViewableProperty property) { FProperty = property; FProperty.ValueObjectChanged += HandleValueObjectChanged; }
void FNameProperty_ValueChanged(IViewableProperty <string> property, string newValue, string oldValue) { Name = newValue; }
public MappedProperty(IViewableProperty <T> source, Func <T, R> map) { mySource = source; myMap = map; Change = new MappedSink <T, R>(source.Change, myMap); }
public static void Set <T>(this IViewableProperty <T> p, T value) { p.Value = value; }
public static IReadonlyProperty <R> Select <T, R>(this IViewableProperty <T> source, Func <T, R> f) { return(new MappedProperty <T, R>(source, f)); }
public ViewablePropertyCellProvider(IViewableProperty property) { FNameCell = new Cell(property.Name, typeof(string), false); FValueCell = new ViewablePropertyCell(property); }
public WrongInitializedTypeTest() { ViewableProperty = new ViewableProperty <string>(); }
void HandleValueObjectChanged(IViewableProperty property, object newValue, object oldValue) { OnValueChanged(EventArgs.Empty); }