/// <summary>
        /// Remove all the operations from the collection
        /// </summary>
        public void ClearOperation()
        {
            _operationLists.Clear();
            ImageProperty panel = ImagePropertyPanel;

            if (panel != null)
            {
                panel.SetOperations(_operationLists);
            }
            Image = Image;
        }
 /// <summary>
 /// Remove the last added operation
 /// </summary>
 public void PopOperation()
 {
     if (_operationLists.Count > 0)
     {
         _operationLists.RemoveAt(_operationLists.Count - 1);
         ImageProperty panel = ImagePropertyPanel;
         if (panel != null)
         {
             panel.SetOperations(_operationLists);
         }
         Image = Image;
     }
 }
        /// <summary>
        /// Push the specific operation to the operation collection
        /// </summary>
        /// <param name="operation">The operation to be pushed onto the operation collection</param>
        public void PushOperation(Operation operation)
        {
            _operationLists.Add(operation);
            ImageProperty panel = ImagePropertyPanel;

            if (panel != null)
            {
                panel.SetOperations(_operationLists);
            }

            try
            {
                Image = Image;
            }
            catch
            {                   //if pushing the operation generate exceptions
                PopOperation(); //remove the operation
                throw;          //rethrow the exception
            }
        }