Browse Source

Added some documentation to DocumentViewModel

CPKreuz 2 years ago
parent
commit
e2644ea46e

+ 11 - 0
src/PixiEditor.ChangeableDocument/Enums/FlipType.cs

@@ -11,7 +11,18 @@ public enum FlipType
 /// </summary>
 public enum RotationAngle
 {
+    /// <summary>
+    /// 90 Degree
+    /// </summary>
     D90,
+    
+    /// <summary>
+    /// 180 Degree
+    /// </summary>
     D180,
+
+    /// <summary>
+    /// -90 Degree
+    /// </summary>
     D270
 }

+ 155 - 0
src/PixiEditor/Models/DocumentModels/Public/DocumentOperationsModule.cs

@@ -24,6 +24,9 @@ internal class DocumentOperationsModule
         Internals = internals;
     }
 
+    /// <summary>
+    /// Creates a new selection with the size of the document
+    /// </summary>
     public void SelectAll()
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -33,6 +36,9 @@ internal class DocumentOperationsModule
             new EndSelectRectangle_Action());
     }
 
+    /// <summary>
+    /// Clears the current selection
+    /// </summary>
     public void ClearSelection()
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -40,6 +46,10 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new ClearSelection_Action());
     }
 
+    /// <summary>
+    /// Deletes selected pixels
+    /// </summary>
+    /// <param name="clearSelection">Should the selection be cleared</param>
     public void DeleteSelectedPixels(bool clearSelection = false)
     {
         var member = Document.SelectedStructureMember;
@@ -54,6 +64,11 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions();
     }
 
+    /// <summary>
+    /// Sets the opacity of the member with the guid <paramref name="memberGuid"/>
+    /// </summary>
+    /// <param name="memberGuid">The Guid of the member</param>
+    /// <param name="value">A value between 0 and 1</param>
     public void SetMemberOpacity(Guid memberGuid, float value)
     {
         if (Internals.ChangeController.IsChangeActive || value is > 1 or < 0)
@@ -63,10 +78,20 @@ internal class DocumentOperationsModule
             new EndStructureMemberOpacity_Action());
     }
 
+    /// <summary>
+    /// Adds a new viewport or updates a existing one
+    /// </summary>
     public void AddOrUpdateViewport(ViewportInfo info) => Internals.ActionAccumulator.AddActions(new RefreshViewport_PassthroughAction(info));
 
+    /// <summary>
+    /// Deletes the viewport with the <paramref name="viewportGuid"/>
+    /// </summary>
+    /// <param name="viewportGuid">The Guid of the viewport to remove</param>
     public void RemoveViewport(Guid viewportGuid) => Internals.ActionAccumulator.AddActions(new RemoveViewport_PassthroughAction(viewportGuid));
 
+    /// <summary>
+    /// Delete the whole undo stack
+    /// </summary>
     public void ClearUndo()
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -74,6 +99,10 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddActions(new DeleteRecordedChanges_Action());
     }
 
+    /// <summary>
+    /// Pastes the <paramref name="images"/> as new layers
+    /// </summary>
+    /// <param name="images">The images to paste</param>
     public void PasteImagesAsLayers(List<(string? name, Surface image)> images)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -96,6 +125,12 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions();
     }
 
+    /// <summary>
+    /// Creates a new structure member of type <paramref name="type"/> with the name <paramref name="name"/>
+    /// </summary>
+    /// <param name="type">The type of the member</param>
+    /// <param name="name">The name of the member</param>
+    /// <returns>The Guid of the new structure member</returns>
     public Guid? CreateStructureMember(StructureMemberType type, string? name = null)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -103,6 +138,10 @@ internal class DocumentOperationsModule
         return Internals.StructureHelper.CreateNewStructureMember(type, name, true);
     }
 
+    /// <summary>
+    /// Duplicates the layer with the <paramref name="guidValue"/>
+    /// </summary>
+    /// <param name="guidValue">The Guid of the layer</param>
     public void DuplicateLayer(Guid guidValue)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -110,6 +149,10 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new DuplicateLayer_Action(guidValue));
     }
 
+    /// <summary>
+    /// Delete the member with the <paramref name="guidValue"/>
+    /// </summary>
+    /// <param name="guidValue">The Guid of the layer</param>
     public void DeleteStructureMember(Guid guidValue)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -117,6 +160,10 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new DeleteStructureMember_Action(guidValue));
     }
 
+    /// <summary>
+    /// Deletes all members with the <paramref name="guids"/>
+    /// </summary>
+    /// <param name="guids">The Guids of the layers to delete</param>
     public void DeleteStructureMembers(IReadOnlyList<Guid> guids)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -124,6 +171,11 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(guids.Select(static guid => new DeleteStructureMember_Action(guid)).ToArray());
     }
 
+    /// <summary>
+    /// Resizes the canvas (Does not upscale the content of the image)
+    /// </summary>
+    /// <param name="newSize">The size the canvas should be resized to</param>
+    /// <param name="anchor">Where the existing content should be put</param>
     public void ResizeCanvas(VecI newSize, ResizeAnchor anchor)
     {
         if (Internals.ChangeController.IsChangeActive || newSize.X > 9999 || newSize.Y > 9999 || newSize.X < 1 || newSize.Y < 1)
@@ -146,6 +198,11 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new ResizeCanvas_Action(newSize, anchor));
     }
 
+    /// <summary>
+    /// Resizes the image (Upscales the content of the image)
+    /// </summary>
+    /// <param name="newSize">The size the image should be resized to</param>
+    /// <param name="resampling">The resampling method to use</param>
     public void ResizeImage(VecI newSize, ResamplingMethod resampling)
     {
         if (Internals.ChangeController.IsChangeActive || newSize.X > 9999 || newSize.Y > 9999 || newSize.X < 1 || newSize.Y < 1)
@@ -168,6 +225,11 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new ResizeImage_Action(newSize, resampling));
     }
 
+    /// <summary>
+    /// Replaces all <paramref name="oldColor"/> with <paramref name="newColor"/>
+    /// </summary>
+    /// <param name="oldColor">The color to replace</param>
+    /// <param name="newColor">The new color</param>
     public void ReplaceColor(Color oldColor, Color newColor)
     {
         if (Internals.ChangeController.IsChangeActive || oldColor == newColor)
@@ -175,6 +237,9 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new ReplaceColor_Action(oldColor, newColor));
     }
 
+    /// <summary>
+    /// Creates a new mask on the <paramref name="member"/>
+    /// </summary>
     public void CreateMask(StructureMemberViewModel member)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -184,6 +249,9 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new CreateStructureMemberMask_Action(member.GuidValue));
     }
 
+    /// <summary>
+    /// Deletes the mask of the <paramref name="member"/>
+    /// </summary>
     public void DeleteMask(StructureMemberViewModel member)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -191,6 +259,9 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new DeleteStructureMemberMask_Action(member.GuidValue));
     }
     
+    /// <summary>
+    /// Applies the mask to the image
+    /// </summary>
     public void ApplyMask(StructureMemberViewModel member)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -199,14 +270,32 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new ApplyMask_Action(member.GuidValue), new DeleteStructureMemberMask_Action(member.GuidValue));
     }
 
+    /// <summary>
+    /// Sets the selected structure memeber
+    /// </summary>
+    /// <param name="memberGuid">The Guid of the member to select</param>
     public void SetSelectedMember(Guid memberGuid) => Internals.ActionAccumulator.AddActions(new SetSelectedMember_PassthroughAction(memberGuid));
 
+    /// <summary>
+    /// Adds a member to the soft selection
+    /// </summary>
+    /// <param name="memberGuid">The Guid of the member to add</param>
     public void AddSoftSelectedMember(Guid memberGuid) => Internals.ActionAccumulator.AddActions(new AddSoftSelectedMember_PassthroughAction(memberGuid));
 
+    /// <summary>
+    /// Removes a member from the soft selection
+    /// </summary>
+    /// <param name="memberGuid">The Guid of the member to remove</param>
     public void RemoveSoftSelectedMember(Guid memberGuid) => Internals.ActionAccumulator.AddActions(new RemoveSoftSelectedMember_PassthroughAction(memberGuid));
 
+    /// <summary>
+    /// Clears the soft selection
+    /// </summary>
     public void ClearSoftSelectedMembers() => Internals.ActionAccumulator.AddActions(new ClearSoftSelectedMembers_PassthroughAction());
 
+    /// <summary>
+    /// Undo last change
+    /// </summary>
     public void Undo()
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -214,6 +303,9 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddActions(new Undo_Action());
     }
 
+    /// <summary>
+    /// Redo previously undone change
+    /// </summary>
     public void Redo()
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -221,6 +313,12 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddActions(new Redo_Action());
     }
 
+    /// <summary>
+    /// Moves a member next to or inside another structure member
+    /// </summary>
+    /// <param name="memberToMove">The member to move</param>
+    /// <param name="memberToMoveIntoOrNextTo">The target member</param>
+    /// <param name="placement">Where to place the <paramref name="memberToMove"/></param>
     public void MoveStructureMember(Guid memberToMove, Guid memberToMoveIntoOrNextTo, StructureMemberPlacement placement)
     {
         if (Internals.ChangeController.IsChangeActive || memberToMove == memberToMoveIntoOrNextTo)
@@ -228,6 +326,9 @@ internal class DocumentOperationsModule
         Internals.StructureHelper.TryMoveStructureMember(memberToMove, memberToMoveIntoOrNextTo, placement);
     }
 
+    /// <summary>
+    /// Merge all structure members with the Guids inside <paramref name="members"/>
+    /// </summary>
     public void MergeStructureMembers(IReadOnlyList<Guid> members)
     {
         if (Internals.ChangeController.IsChangeActive || members.Count < 2)
@@ -248,6 +349,11 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddActions(new ChangeBoundary_Action());
     }
 
+    /// <summary>
+    /// Starts a image transform and pastes the transformed image on the currently selected layer
+    /// </summary>
+    /// <param name="image">The image to paste</param>
+    /// <param name="startPos">Where the transform should start</param>
     public void PasteImageWithTransform(Surface image, VecI startPos)
     {
         if (Document.SelectedStructureMember is null)
@@ -255,6 +361,10 @@ internal class DocumentOperationsModule
         Internals.ChangeController.TryStartExecutor(new PasteImageExecutor(image, startPos));
     }
 
+    /// <summary>
+    /// Starts a transform on the selected area
+    /// </summary>
+    /// <param name="toolLinked">Is this transform started by a tool</param>
     public void TransformSelectedArea(bool toolLinked)
     {
         if (Document.SelectedStructureMember is null ||
@@ -264,6 +374,9 @@ internal class DocumentOperationsModule
         Internals.ChangeController.TryStartExecutor(new TransformSelectedAreaExecutor(toolLinked));
     }
 
+    /// <summary>
+    /// Ties stopping the currently executing tool linked executor
+    /// </summary>
     public void TryStopToolLinkedExecutor()
     {
         if (Internals.ChangeController.GetCurrentExecutorType() == ExecutorType.ToolLinked)
@@ -273,6 +386,15 @@ internal class DocumentOperationsModule
     public void DrawImage(Surface image, ShapeCorners corners, Guid memberGuid, bool ignoreClipSymmetriesEtc, bool drawOnMask) =>
         DrawImage(image, corners, memberGuid, ignoreClipSymmetriesEtc, drawOnMask, true);
 
+    /// <summary>
+    /// Draws a image on the member with the <paramref name="memberGuid"/>
+    /// </summary>
+    /// <param name="image">The image to draw onto the layer</param>
+    /// <param name="corners">The shape the image should fit into</param>
+    /// <param name="memberGuid">The Guid of the member to paste on</param>
+    /// <param name="ignoreClipSymmetriesEtc">Ignore selection clipping and symmetry (See DrawingChangeHelper.ApplyClipsSymmetriesEtc of UpdateableDocument)</param>
+    /// <param name="drawOnMask">Draw on the mask or on the image</param>
+    /// <param name="finish">Is this a finished action</param>
     private void DrawImage(Surface image, ShapeCorners corners, Guid memberGuid, bool ignoreClipSymmetriesEtc, bool drawOnMask, bool finish)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -284,6 +406,9 @@ internal class DocumentOperationsModule
             Internals.ActionAccumulator.AddFinishedActions();
     }
 
+    /// <summary>
+    /// Resizes the canvas to fit the content
+    /// </summary>
     public void ClipCanvas()
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -291,8 +416,14 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new ClipCanvas_Action());
     }
 
+    /// <summary>
+    /// Flips the image on the <paramref name="flipType"/> axis
+    /// </summary>
     public void FlipImage(FlipType flipType) => FlipImage(flipType, null);
 
+    /// <summary>
+    /// Flips the members with the Guids of <paramref name="membersToFlip"/> on the <paramref name="flipType"/> axis
+    /// </summary>
     public void FlipImage(FlipType flipType, List<Guid> membersToFlip)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -301,8 +432,16 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new FlipImage_Action(flipType, membersToFlip));
     }
 
+    /// <summary>
+    /// Rotates the image
+    /// </summary>
+    /// <param name="rotation">The degrees to rotate the image by</param>
     public void RotateImage(RotationAngle rotation) => RotateImage(rotation, null);
 
+    /// <summary>
+    /// Rotates the members with the Guids of <paramref name="membersToRotate"/>
+    /// </summary>
+    /// <param name="rotation">The degrees to rotate the members by</param>
     public void RotateImage(RotationAngle rotation, List<Guid> membersToRotate)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -311,6 +450,9 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new RotateImage_Action(rotation, membersToRotate));
     }
     
+    /// <summary>
+    /// Puts the content of the image in the middle of the canvas
+    /// </summary>
     public void CenterContent(IReadOnlyList<Guid> structureMembers)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -319,6 +461,10 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new CenterContent_Action(structureMembers.ToList()));
     }
 
+    /// <summary>
+    /// Imports a reference layer from a Pbgra Int32 array
+    /// </summary>
+    /// <param name="imageSize">The size of the image</param>
     public void ImportReferenceLayer(ImmutableArray<byte> imagePbgra32Bytes, VecI imageSize)
     {
         if (Internals.ChangeController.IsChangeActive)
@@ -329,6 +475,9 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new SetReferenceLayer_Action(corners, imagePbgra32Bytes, imageSize));
     }
 
+    /// <summary>
+    /// Deletes the reference layer
+    /// </summary>
     public void DeleteReferenceLayer()
     {
         if (Internals.ChangeController.IsChangeActive || Document.ReferenceLayerViewModel.ReferenceBitmap is null)
@@ -337,6 +486,9 @@ internal class DocumentOperationsModule
         Internals.ActionAccumulator.AddFinishedActions(new DeleteReferenceLayer_Action());
     }
 
+    /// <summary>
+    /// Starts a transform on the reference layer
+    /// </summary>
     public void TransformReferenceLayer()
     {
         if (Document.ReferenceLayerViewModel.ReferenceBitmap is null || Internals.ChangeController.IsChangeActive)
@@ -344,6 +496,9 @@ internal class DocumentOperationsModule
         Internals.ChangeController.TryStartExecutor(new TransformReferenceLayerExecutor());
     }
 
+    /// <summary>
+    /// Resets the reference layer transform
+    /// </summary>
     public void ResetReferenceLayerPosition()
     {
         if (Document.ReferenceLayerViewModel.ReferenceBitmap is null || Internals.ChangeController.IsChangeActive)

+ 11 - 42
src/PixiEditor/ViewModels/SubViewModels/Document/DocumentManagerViewModel.cs

@@ -50,48 +50,20 @@ internal class DocumentManagerViewModel : SubViewModel<ViewModelMain>
     public bool DocumentNotNull() => ActiveDocument != null;
 
     [Command.Basic("PixiEditor.Document.ClipCanvas", "Clip Canvas", "Clip Canvas", CanExecute = "PixiEditor.HasDocument")]
-    public void ClipCanvas()
-    {
-        if (ActiveDocument is null)
-            return;
-        
-        ActiveDocument?.Operations.ClipCanvas();
-    }
-    
-    [Command.Basic("PixiEditor.Document.FlipImageHorizontal", "Flip Image Horizontally", "Flip Image Horizontally", CanExecute = "PixiEditor.HasDocument")]
-    public void FlipImageHorizontally()
-    {
-        if (ActiveDocument is null)
-            return;
-        
-        ActiveDocument?.Operations.FlipImage(FlipType.Horizontal);
-    }
-    
-    [Command.Basic("PixiEditor.Document.FlipLayersHorizontal", "Flip Selected Layers Horizontally", "Flip Selected Layers Horizontally", CanExecute = "PixiEditor.HasDocument")]
-    public void FlipLayersHorizontally()
-    {
-        if (ActiveDocument?.SelectedStructureMember == null)
-            return;
-        
-        ActiveDocument?.Operations.FlipImage(FlipType.Horizontal, ActiveDocument.GetSelectedMembers());
-    }
-    
-    [Command.Basic("PixiEditor.Document.FlipImageVertical", "Flip Image Vertically", "Flip Image Vertically", CanExecute = "PixiEditor.HasDocument")]
-    public void FlipImageVertically()
-    {
-        if (ActiveDocument is null)
-            return;
-        
-        ActiveDocument?.Operations.FlipImage(FlipType.Vertical);
-    }
-    
-    [Command.Basic("PixiEditor.Document.FlipLayersVertical", "Flip Selected Layers Vertically", "Flip Selected Layers Vertically", CanExecute = "PixiEditor.HasDocument")]
-    public void FlipLayersVertically()
+    public void ClipCanvas() => ActiveDocument?.Operations.ClipCanvas();
+
+    [Command.Basic("PixiEditor.Document.FlipImageHorizontal", FlipType.Horizontal, "Flip Image Horizontally", "Flip Image Horizontally", CanExecute = "PixiEditor.HasDocument")]
+    [Command.Basic("PixiEditor.Document.FlipImageVertical", FlipType.Vertical, "Flip Image Vertically", "Flip Image Vertically", CanExecute = "PixiEditor.HasDocument")]
+    public void FlipImage(FlipType type) => ActiveDocument?.Operations.FlipImage(type);
+
+    [Command.Basic("PixiEditor.Document.FlipLayersHorizontal", FlipType.Horizontal, "Flip Selected Layers Horizontally", "Flip Selected Layers Horizontally", CanExecute = "PixiEditor.HasDocument")]
+    [Command.Basic("PixiEditor.Document.FlipLayersVertical", FlipType.Vertical, "Flip Selected Layers Vertically", "Flip Selected Layers Vertically", CanExecute = "PixiEditor.HasDocument")]
+    public void FlipLayers(FlipType type)
     {
         if (ActiveDocument?.SelectedStructureMember == null)
             return;
         
-        ActiveDocument?.Operations.FlipImage(FlipType.Vertical, ActiveDocument.GetSelectedMembers());
+        ActiveDocument?.Operations.FlipImage(type, ActiveDocument.GetSelectedMembers());
     }
     
     [Command.Basic("PixiEditor.Document.Rotate90Deg", "Rotate Image 90 degrees", 
@@ -100,10 +72,7 @@ internal class DocumentManagerViewModel : SubViewModel<ViewModelMain>
         "Rotate Image 180 degrees", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D180)]
     [Command.Basic("PixiEditor.Document.Rotate270Deg", "Rotate Image -90 degrees", 
         "Rotate Image -90 degrees", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D270)]
-    public void RotateImage(RotationAngle angle)
-    {
-        ActiveDocument?.Operations.RotateImage(angle);
-    }
+    public void RotateImage(RotationAngle angle) => ActiveDocument?.Operations.RotateImage(angle);
 
     [Command.Basic("PixiEditor.Document.Rotate90DegLayers", "Rotate Selected Layers 90 degrees", 
         "Rotate Selected Layers 90 degrees", CanExecute = "PixiEditor.HasDocument", Parameter = RotationAngle.D90)]

+ 16 - 0
src/PixiEditor/ViewModels/SubViewModels/Document/DocumentViewModel.cs

@@ -177,6 +177,10 @@ internal partial class DocumentViewModel : NotifyableObject
         ReferenceLayerViewModel = new(this, Internals);
     }
 
+    /// <summary>
+    /// Creates a new document using the <paramref name="builder"/>
+    /// </summary>
+    /// <returns>The created document</returns>
     public static DocumentViewModel Build(Action<DocumentViewModelBuilder> builder)
     {
         var builderInstance = new DocumentViewModelBuilder();
@@ -278,6 +282,10 @@ internal partial class DocumentViewModel : NotifyableObject
         RaisePropertyChanged(nameof(AllChangesSaved));
     }
 
+    /// <summary>
+    /// Tries rendering the whole document
+    /// </summary>
+    /// <returns><see cref="Error"/> if the ChunkyImage was disposed, otherwise a <see cref="Surface"/> of the rendered document</returns>
     public OneOf<Error, Surface> MaybeRenderWholeImage()
     {
         try
@@ -356,6 +364,11 @@ internal partial class DocumentViewModel : NotifyableObject
         return (output, bounds);
     }
 
+    /// <summary>
+    /// Picks the color at <paramref name="pos"/>
+    /// </summary>
+    /// <param name="includeReference">Should the color be picked from the reference layer</param>
+    /// <param name="includeCanvas">Should the color be picked from the canvas</param>
     public Color PickColor(VecD pos, DocumentScope scope, bool includeReference, bool includeCanvas)
     {
         if (scope == DocumentScope.SingleLayer && includeReference && includeCanvas)
@@ -485,6 +498,9 @@ internal partial class DocumentViewModel : NotifyableObject
     public void InternalRemoveSoftSelectedMember(StructureMemberViewModel member) => softSelectedStructureMembers.Remove(member);
     #endregion
 
+    /// <summary>
+    /// Returns a list of all selected members (Hard and Soft selected)
+    /// </summary>
     public List<Guid> GetSelectedMembers()
     {
         List<Guid> layerGuids = new List<Guid>() { SelectedStructureMember.GuidValue };