Esempio n. 1
0
        /// <summary>
        /// Opens a new change group used to batch several changes.
        /// ChangeGroups work as transactions and are used to support the Undo/Redo system.
        /// </summary>
        public override ChangeGroup OpenGroup(string changeGroupTitle, ICollection <DesignItem> affectedItems)
        {
            if (affectedItems == null)
            {
                throw new ArgumentNullException("affectedItems");
            }

            UndoService     undoService = this.Services.GetRequiredService <UndoService>();
            UndoTransaction g           = undoService.StartTransaction(affectedItems);

            g.Title = changeGroupTitle;
            return(g);
        }