Beispiel #1
0
        public virtual void Delete()
        {
            var allDependents = this.AsEnumerable <IFigure>().TopologicalSort(f => f.Dependents);

            using (var transaction = Transaction.Create(Drawing.ActionManager, false))
            {
                foreach (var figure in allDependents)
                {
                    RemoveFigureAction action = new RemoveFigureAction(Drawing, figure);
                    Drawing.ActionManager.RecordAction(action);
                }
            }

            Drawing.RaiseSelectionChanged(new Drawing.SelectionChangedEventArgs());
        }
Beispiel #2
0
        public void Remove(IFigure figure)
        {
            RemoveFigureAction action = new RemoveFigureAction(this, figure);

            ActionManager.RecordAction(action);
        }