Beispiel #1
0
 protected override void EndImpl()
 {
     editingUIRoot.Visibility = Visibility.Collapsed;
     UnsubscribeMouseEvents();
     UnsubscribeUIEvents();
     ClearLayers();
     editedObject = null;
 }
Beispiel #2
0
            public WorkingRadiusFeature(AttractorObject attractor)
            {
                Attractor = attractor;

                style = new VectorStyle();
                Styles.Add(style);

                Update();
            }
Beispiel #3
0
 public AttractorDraggingFeature(AttractorObject attractor) : base(attractor)
 {
     Geometry = attractor.Position;
     Styles.Add(new ImageStyle
     {
         BitmapId    = BitmapResources.GetBitmapIdForEmbeddedResourceRelative("Dragging.png"),
         SymbolScale = 0.8f
     });
 }
Beispiel #4
0
 private void PlaceAttractorObject(Point point)
 {
     Result = new AttractorObject
     {
         Position      = point,
         WorkingRadius = AttractorObject.DefaultWorkingRadius,
         Type          = AttractorType,
         Performance   = AttractorPerformance
     };
     targetLayer.Add(Result);
 }
Beispiel #5
0
        protected override void BeginImpl()
        {
            editedObject = TargetObject;

            if (editedObject == null)
            {
                throw new InvalidOperationException($"{nameof(TargetObject)} was not set");
            }

            CreateDraggingFeature();
            CreateWorkingRadiusFeature();
            FillEditingUIControls();
            SubscribeUIEvents();
            SubscribeMouseEvents();
            editingUIRoot.Visibility = Visibility.Visible;
        }