private void PlaceElement(ITypeProvider provider, double x, double y) { BaseElementViewModel viewModel = BaseElementViewModel.GetViewModel(provider.ElementType, this); viewModel.Left = x - _trackerCenterX; viewModel.Top = y - _trackerCenterY; BaseElements.Add(viewModel); AddUndoAction(new GenericAddedAction <BaseElementViewModel>(this, viewModel)); }
/// <summary> /// Add tracker, selection and drawing connection view models /// </summary> private void AddDefaultElements() { Tracker = new TrackerViewModel(this); Selection = new SelectionViewModel(this); _drawingConnectionViewModel = new DrawingConnectionViewModel(this); BaseElements.Add(Tracker); BaseElements.Add(Selection); BaseElements.Add(_drawingConnectionViewModel); }
public TwoHolesMeasurementMethod() { BaseElements.Add(new Hole()); BaseElements.Add(new Hole()); }
public OneHoleMeasurementMethod() { BaseElements.Add(new Hole()); }
public SurfacePerpendicularityMeasurementMethod() { BaseElements.Add(new Surface()); BaseElements.Add(new Surface()); }
public SurfaceParalellismMeasurementMethod() { BaseElements.Add(new Surface()); BaseElements.Add(new Surface()); }