using System; using System.Windows.Controls; using VisionCommon; namespace MilUI { /// /// Interaction logic for MultiLineParamSettingView.xaml /// public partial class MultiLineParamSettingView : UserControl, IDisposable { private PatternAgentBase _patternAgent; private PatternInfo _patternInfo; private CameraDisplay _cameraDisplay; private FovInfo _fovInfo; private int _LineIdx = 0; public MultiLineParamSettingView( PatternAgentBase patternAgent, PatternInfo patternInfo, CameraDisplay cameraDisplay, FovInfo fovInfo, int lineIdx) { _patternAgent = patternAgent; _patternInfo = patternInfo; _cameraDisplay = cameraDisplay; _fovInfo = fovInfo; _LineIdx = lineIdx; InitializeComponent(); SetEventHandler(); } private void SetEventHandler() { sliderRoiAngle.SliderChangedEvent += SliderChangedEventHandler; } private void ClearEventHandler() { sliderRoiAngle.SliderChangedEvent -= SliderChangedEventHandler; } public void SliderChangedEventHandler(object sender, EventArgs e) { (DataContext as MultiLineParamSettingViewModel).UpdateAngleOfFindRoi(sliderRoiAngle.KeyValue); } public void Dispose() { ClearEventHandler(); } } }