Пример #1
0
 private void UIARRuleEditor_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (FiddlerApplication.isClosing || (e.CloseReason != CloseReason.UserClosing))
     {
         this._oOwningRule._oEditor = null;
         base.Dispose();
     }
     else
     {
         IResponseInspector2 tag = this.tabsResponseEditors.SelectedTab.Tag as IResponseInspector2;
         if ((tag == null) || !tag.bDirty)
         {
             this._oOwningRule._oEditor = null;
             base.Dispose();
         }
         else
         {
             DialogResult result = MessageBox.Show("You made changes to the current response. Do you want to commit these changes?", "Save Changes?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
             if (DialogResult.Cancel == result)
             {
                 e.Cancel = true;
             }
             else
             {
                 if (DialogResult.Yes == result)
                 {
                     this.actCommitEdits();
                 }
                 this._oOwningRule._oEditor = null;
                 base.Dispose();
             }
         }
     }
 }
Пример #2
0
        private void actUpdateEditor()
        {
            IResponseInspector2 tag = this.tabsResponseEditors.SelectedTab.Tag as IResponseInspector2;

            tag.headers   = this.tmpRH;
            tag.body      = this.tmpRB;
            tag.bReadOnly = false;
        }
Пример #3
0
 private void actUpdateFields(IResponseInspector2 oRI)
 {
     if ((oRI != null) && oRI.bDirty)
     {
         if (oRI.headers != null)
         {
             this.tmpRH = oRI.headers;
         }
         if (oRI.body != null)
         {
             this.tmpRB = oRI.body;
         }
         if (this.tmpRH.Exists("Content-Length"))
         {
             this.tmpRH["Content-Length"] = this.tmpRB.LongLength.ToString();
         }
     }
 }