private static void CurvePointsPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { try { CurveControl gainControl = source as CurveControl; gainControl.updateCurve(); } catch { //(source as ViewChamberControl).ScanStart = 0; } }
private static void Cp2Changed(DependencyObject source, DependencyPropertyChangedEventArgs e) { CurveControl control = null; try { control = source as CurveControl; control.updatePoint(control.cp2Thumb, control.cp2YellowThumb, control.Cp2.X, control.Cp2.Y); } catch { if (control != null) { control.Cp2 = new Point(1, 1); } } }