override public void OnLSystemSet() { velValueKey = $"{lsys.Key}-vel"; velocityValueFilter.Init(ValueStore.Get(velValueKey, 0.5f)); speedValueKey = $"{lsys.Key}-speed"; speedValueFilter.Init(ValueStore.Get(velValueKey, 0.5f)); base.OnLSystemSet(); }
void CheckEquality( ValueStore sut, object value, string secondKey, Guid id, int number ) { Assert.Empty( sut ); var key = id.ToString(); var composite = new Registration( key, value, secondKey ); sut.Add( composite ); sut.Add( new Registration( "asdfasdf", number ) ); var first = sut.Get( key ); Assert.NotNull( first ); Assert.Same( first, value ); var second = sut.Get( secondKey ); Assert.NotNull( second ); Assert.Same( second, value ); Assert.Same( first, second ); var third = sut.Get( "asdfasdf" ); Assert.Equal( number, third ); }
/// Compares the current value of a given control agaist the previous /// registered value for that particular control. Returns true if the /// value is different, otherwise, false. static bool HasChanged(Control c, ValueStore values) { var pval = values.Get(c); return(String.Compare(pval, c.Text) != 0); }