private void UpdateStoredAlgorithm(OperationType operationType, AlgorithmProperty algorithmProperty) { if (OperationType.Blur == operationType) { if (algorithmProperty.ParameterName == "Ksize") { storeditem.UpdateCurrentValue(algorithmProperty); storeditem.UpdateProperty("Anchor", AlgorithmPropertyType.maxValue, algorithmProperty.CurrentDoubleValue); } else { storeditem.UpdateCurrentValue(algorithmProperty); } } else if (OperationType.Contours == currentOperation) { storeditem.UpdateCurrentValue(algorithmProperty); } else if (OperationType.Canny == currentOperation) { storeditem.UpdateCurrentValue(algorithmProperty); } else if (OperationType.HoughLines == currentOperation) { storeditem.UpdateCurrentValue(algorithmProperty); } else if (OperationType.MotionDetector == currentOperation) { storeditem.UpdateCurrentValue(algorithmProperty); } }
public void UpdateCurrentValue(AlgorithmProperty newParam) { foreach (var p in this.AlgorithmProperties) { if (p.ParameterName == newParam.ParameterName) { p.CurrentValue = newParam.CurrentDoubleValue; } } }
public void AddProperty(AlgorithmProperty additionParams) { this.AlgorithmProperties.Add(additionParams); }