Esempio n. 1
0
		public override void Execute()
		{
			if (_undoCommand != null)
				throw new InvalidOperationException("The command has already been executed.");

			_parentCollection.Add(_graphic);
			_undoCommand = new RemoveGraphicCommand(_graphic);

			_parentCollection = null;
			_graphic = null;
		}
        public override void Execute()
        {
            if (_undoCommand != null)
            {
                throw new InvalidOperationException("The command has already been executed.");
            }

            _parentCollection.Add(_graphic);
            _undoCommand = new RemoveGraphicCommand(_graphic);

            _parentCollection = null;
            _graphic          = null;
        }