Example #1
0
        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));
        }
Example #2
0
 /// <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);
 }
Example #3
0
 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());
 }
Example #6
0
 public SurfaceParalellismMeasurementMethod()
 {
     BaseElements.Add(new Surface());
     BaseElements.Add(new Surface());
 }