Beispiel #1
0
        public void ConfirmSelectedConfirmableElements(bool confirm)
        {
            // create new collection so that we can iterate safely (selectedElements might change due with confirm/cancel)
            List <DrawableContainer> selectedDCs = new List <DrawableContainer>(selectedElements);

            foreach (DrawableContainer dc in selectedDCs)
            {
                if (dc.Equals(cropContainer))
                {
                    DrawingMode = DrawingModes.None;
                    // No undo memento for the cropcontainer itself, only for the effect
                    RemoveElement(cropContainer, false);
                    if (confirm)
                    {
                        ApplyCrop(cropContainer.Bounds);
                    }
                    cropContainer.Dispose();
                }
            }
        }