private void UpdateTransformAction()
        {
            CookiesTransform transform = (CookiesTransform)base.WebTransform;
            TransformAction action = null;
            Cookie cookie = null;

            switch ( this.cmbTransformAction.SelectedIndex )
            {
                case 0:
                    // Add TransformAction and cookie too.
                    AddTransformAction a = new AddTransformAction();
                    a.Name = this.txtCookieName.Text;
                    a.Value = TransformValue;
                    action = a;

                    if ( _hasDescription )
                    {
                        a.Description = txtTransformDescription.Text;// + " with an add transform action";
                    }

                    // Add dummy cookie.
                    cookie = new Cookie();
                    cookie.Domain = txtDomain.Text;
                    cookie.Name = txtCookieName.Text;
                    cookie.Path = txtPath.Text;
                    cookie.Port = txtPort.Text;
                    cookie.Expires = this.dtExpires.Value;
                    break;
                case 1:
                    // Update
                    UpdateTransformAction u = new UpdateTransformAction();
                    u.Name = this.txtCookieName.Text;
                    u.Value = TransformValue;
                    action = u;

                    if ( _hasDescription )
                    {
                        u.Description = txtTransformDescription.Text;// + " with an update transform action";
                    }
                    break;
                case 2:
                    // Remove
                    RemoveTransformAction r = new RemoveTransformAction();
                    r.Name = this.txtCookieName.Text;
                    action = r;
                    r.Description = "Removes a cookie";
                    break;
            }

            if ( _isEdit )
            {
                ListViewItem updateItem = lstActions.Items[_editIndex];
                updateItem.Text = txtCookieName.Text;
                if ( action.Description != null )
                {
                    updateItem.SubItems[1].Text = action.Description;
                }
                else
                {
                    action.Description = updateItem.SubItems[1].Text;
                }

                updateItem.Tag = new CookieListItemArgs(cookie, action);

                btnUpdate.Text = "Add";
                _isEdit = false;
            }
            else
            {
                // Add List View Item
                #region Add List View Item
                ListViewItem listItem = new ListViewItem();
                listItem.Text = txtCookieName.Text;
                listItem.SubItems.Add(action.Description);
                listItem.Tag = new CookieListItemArgs(cookie, action);
                lstActions.Items.Add(listItem);
                #endregion
            }

            this.txtCookieName.Text = String.Empty;
            this.txtDomain.Text  = String.Empty;
            this.txtPath.Text  = String.Empty;
            this.txtPort.Text  = String.Empty;
            this.txtTransformDescription.Text  = String.Empty;
        }
        private void UpdateTransformAction()
        {
            HeaderTransform transform = (HeaderTransform)base.WebTransform;
            TransformAction action = null;

            switch ( this.cmbTransformAction.SelectedIndex )
            {
                case 0:
                    // Add
                    AddTransformAction a = new AddTransformAction();
                    a.Name = this.txtHeaderName.Text;
                    a.Value = TransformValue;
                    action = a;

                    if ( _hasDescription )
                    {
                        a.Description = txtTransformDescription.Text;// + " with an add transform action";
                    }
                    break;
                case 1:
                    // Update
                    UpdateTransformAction u = new UpdateTransformAction();
                    u.Name = this.txtHeaderName.Text;
                    u.Value = TransformValue;
                    action = u;

                    if ( _hasDescription )
                    {
                        u.Description = txtTransformDescription.Text;// + " with an update transform action";
                    }
                    break;
                case 2:
                    // Remove
                    RemoveTransformAction r = new RemoveTransformAction();
                    r.Name = this.txtHeaderName.Text;
                    action = r;
                    r.Description = "Removes a header";
                    break;
            }

            if ( _isEdit )
            {
                ListViewItem updateItem = lstActions.Items[_editIndex];
                updateItem.Text = action.Name;
                if ( action.Description != null )
                {
                    updateItem.SubItems[1].Text = action.Description;
                }
                else
                {
                    action.Description = updateItem.SubItems[1].Text;
                }

                updateItem.Tag = action;

                this.btnUpdate.Text = "Add";
                _isEdit = false;
            }
            else
            {
                // Add List View Item
                #region Add List View Item
                ListViewItem listItem = new ListViewItem();
                listItem.Text = action.Name;
                listItem.SubItems.Add(action.Description);
                listItem.Tag = action;

                lstActions.Items.Add(listItem);
                #endregion
            }

            _hasDescription = false;
            this.txtHeaderName.Text = "";
            this.txtTransformDescription.Text = "";
        }