public DeltaFigure(double thickness, float thicknessDelta, int startIteration, int endIteration, string skipIterationsCSV) { m_SkipIterationsList = new List<int>(); m_Thickness = new DeltaValue(thickness, thicknessDelta, 0, double.MaxValue); m_StartIteration = startIteration; m_EndIteration = endIteration; m_SkipIterationsCSV = skipIterationsCSV; this.SetSkipIterationList(); }
//Now, we'll handle OnTextChange event fired by TextBox to update our value void onTextChanged(object sender, TextChangedEventArgs e) { //Unregister event this.Value.PropertyChanged -= new PropertyChangedEventHandler(Value_PropertyChanged); double channel = 0; float delta = 0; if (double.TryParse(textChannel.Text == String.Empty ? "0" : textChannel.Text, out channel) & float.TryParse(textDelta.Text == String.Empty ? "0" : textDelta.Text, out delta)) { Value = new DeltaValue(channel, delta, 0, 255); } else { UpdateValue(); } //Re-register event this.Value.PropertyChanged += new PropertyChangedEventHandler(Value_PropertyChanged); }