示例#1
0
        private void FreeHttpWindow_Load(object sender, EventArgs e)
        {
            try
            {
                LoadFiddlerModificHttpRuleCollection(fiddlerModificHttpRuleCollection);
            }
            catch (Exception ex)
            {
                MessageBox.Show(string.Format("{0}\r\n{1}", ex.Message, ex.InnerException == null? "":ex.InnerException.Message), "load user rule fail");
                if (File.Exists("RuleData.xml"))
                {
                    File.Copy("RuleData.xml", "RuleData.lastErrorFile", true);
                }
            }
            if (StaticDataCollection == null)
            {
                StaticDataCollection = new ActuatorStaticDataCollection(true);
            }
            if (ModificSettingInfo == null)
            {
                ModificSettingInfo = new FiddlerModificSettingInfo(false, true, true);
            }
            if (ModificSettingInfo.IsDefaultEnableRule)
            {
                pb_requestRuleSwitch_Click(null, null);
                pb_responseRuleSwitch_Click(null, null);
            }

            FreeHttp.MyHelper.MyGlobalHelper.OnGetGlobalMessage += ((obj, arg) => { PutWarn(arg.Message); });

            tbe_RequestBodyModific.Visible          = false;
            tbe_ResponseBodyModific.Visible         = false;
            tbe_urlFilter.Visible                   = false;
            tbe_RequestBodyModific.OnCloseEditBox  += tbe_BodyModific_OnCloseEditBox;
            tbe_ResponseBodyModific.OnCloseEditBox += tbe_BodyModific_OnCloseEditBox;
            tbe_urlFilter.OnCloseEditBox           += tbe_BodyModific_OnCloseEditBox;


            cb_macthMode.SelectedIndex       = 0;
            tabControl_Modific.SelectedIndex = 0;
            IsSetResponseLatencyEable        = false;

            //rtb_MesInfo.AllowDrop = true;
            //rtb_MesInfo.DragEnter += rtb_MesInfo_DragEnter;
            //rtb_MesInfo.DragDrop += rtb_MesInfo_DragDrop;

            splitContainer_httpEditInfo.AllowDrop  = true;
            splitContainer_httpEditInfo.DragEnter += rtb_MesInfo_DragEnter;
            splitContainer_httpEditInfo.DragDrop  += rtb_MesInfo_DragDrop;

            panel_modific_Contorl.AllowDrop  = true;
            panel_modific_Contorl.DragEnter += rtb_MesInfo_DragEnter;
            panel_modific_Contorl.DragDrop  += rtb_MesInfo_DragDrop;

            MyControlHelper.SetRichTextBoxDropString(rtb_requsetReplace_body);
            MyControlHelper.SetRichTextBoxDropString(rtb_requestRaw);
        }
示例#2
0
 private void RawResponseEdit_Load(object sender, EventArgs e)
 {
     initializeResponseLineDc(out responseLineDc);
     foreach (var tempKey in responseLineDc)
     {
         cb_responseLine.Items.Add(tempKey.Key);
     }
     cb_responseLine.SelectedIndex = 0;
     MyControlHelper.SetRichTextBoxDropString(rtb_rawResponse);
     //rtb_rawResponse.AllowDrop = true;
     //rtb_rawResponse.DragEnter += rtb_rawResponse_DragEnter;
     //rtb_rawResponse.DragDrop += rtb_rawResponse_DragDrop;
 }