/// <summary> /// Deletes the current block. /// Changes the Undo stack. /// </summary> public virtual void Delete() { BlockActions.DeleteBlock(this); //if (this.Parent == null) //{ // return; //} //if (this.Root != null && this.Root.ActionManager != null) //{ // RemoveBlocksAction Action = new RemoveBlocksAction(this.Parent); // Action.PrepareBlocks(GetBlocksToDelete()); // this.Root.ActionManager.RecordAction(Action); //} //else //{ // this.Parent.Children.Delete(GetBlocksToDelete()); //} }
private void AssignSetAccessor(PropertySetBlock value) { if (value == null && mSetAccessor != null) { if (GetAccessor == null) { this.ReplaceWithField(); } else { BlockActions.DeleteBlock(mSetAccessor); } } else if (mSetAccessor == null && value != null) { this.VMembers.Add(value); } else if (mSetAccessor != null && value != null) { mSetAccessor.Replace(value); } mSetAccessor = value; }