public void DetachGraphHandlers() { while (PlotterChildren.Count > 0) { PlotterChildren.RemoveAt(0); } }
private void SetModelHandlers(PeqDataViewModel model1) { model1.BiquadsChanged += OnChangeBiquads; model1.DraggablePoint.MouseRightButtonDown += (sender, args) => { if (!model1.HasBandwidth()) { return; } if (PlotterChildren.Contains(model1.BandWidthPoint) || PlotterChildren.Contains(model1.BandwidthArrow)) { return; } if (model1.BandWidthPoint == null) { return; } PlotterChildren.Add(model1.BandWidthPoint); if (model1.BandwidthArrow == null) { return; } PlotterChildren.Add(model1.BandwidthArrow); }; model1.BandWidthPoint.MouseRightButtonDown += (q, i) => RemoveBandwith(model1); model1.RemoveThisParam += RemovePeqParam; }
protected void AttachGraphHandlers() { foreach (var model in PeqDataViewModels) { if (model.LineData != null) { PlotterChildren.Add(model.LineData); } if (model.DraggablePoint != null) { PlotterChildren.Add(model.DraggablePoint); } SetModelHandlers(model); } PlotterChildren.Add(MasterLine); }
private void AddParam() { var vm = NewParam(); if (vm == null) { return; } PlotterChildren.Add(vm.LineData); PlotterChildren.Add(vm.DraggablePoint); SetModelHandlers(vm); RedrawMasterLine(); SendParamData(vm.PeqDataModel); }
private void RemoveVm(PeqDataViewModel s) { PlotterChildren.Remove(s.DraggablePoint); PlotterChildren.Remove(s.LineData); RemoveBandwith(s); }
private void RemoveBandwith(PeqDataViewModel model1) { PlotterChildren.Remove(model1.BandWidthPoint); PlotterChildren.Remove(model1.BandwidthArrow); }