Exemple #1
0
        private void FormatPluginsGrid_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (this.DisplayedRequest == null)
            {
                return;
            }
            string PluginName = "";

            CurrentFormatXml         = "";
            CurrentXmlNameValueArray = new string[, ] {
            };

            bool Normal = false;

            if (e.RowIndex == 0)
            {
                Normal = true;
                this.SetBodyParameters(this.DisplayedRequest, false);
            }

            foreach (DataGridViewRow Row in FormatPluginsGrid.Rows)
            {
                if (e.RowIndex == Row.Index)
                {
                    PluginName = Row.Cells[1].Value.ToString();
                }
                if (Normal && (e.RowIndex == Row.Index))
                {
                    Row.Cells[0].Value = true;
                }
                else
                {
                    Row.Cells[0].Value = false;
                }
            }
            if (Normal)
            {
                return;
            }

            BodyParametersGrid.Rows.Clear();
            FormatXmlTBP.ClearData();
            ConvertXmlToObjectBtn.Text = "Convert this XML to Object";
            if (FormatPluginCallingThread != null)
            {
                try
                {
                    FormatPluginCallingThread.Abort();
                }
                catch { }
            }
            if (PluginName.Length == 0)
            {
                return;
            }
            ShowStatusMsg(string.Format("Parsing Request body as {0}", PluginName));
            ShowProgressBar(true);
            FormatPluginCallingThread = new Thread(DeserializeWithFormatPlugin);
            FormatPluginCallingThread.Start(PluginName);
        }
Exemple #2
0
 void ClearBodyTypeFormatPluginsUi()
 {
     BodyParametersGrid.Rows.Clear();
     ConvertXmlToObjectBtn.Text = "Convert this XML to Object";
     FormatXmlTBP.ClearData();
     foreach (DataGridViewRow Row in FormatPluginsGrid.Rows)
     {
         Row.Cells[0].Value = false;
     }
     ResetBodyFormatXmlChangedStatus();
     ResetBodyParametersChangedStatus();
 }
Exemple #3
0
        void ClearData()
        {
            if (this.BaseTabs.InvokeRequired)
            {
                ClearData_d InvokeDelegate_d = new ClearData_d(ClearData);
                this.BaseTabs.Invoke(InvokeDelegate_d, new object[] { });
            }
            else
            {
                RoundTripLbl.Text = "";
                HeadersTBP.ClearData();
                BodyTBP.ClearData();
                FormatXmlTBP.ClearData();
                ConvertXmlToObjectBtn.Text = "Convert this XML to Object";
                BodyFormatPluginsParametersGrid.Rows.Clear();
                ReflectionRTB.Text = "";
                ClearEditTab();
                foreach (DataGridViewRow Row in FormatPluginsGrid.Rows)
                {
                    Row.Cells[0].Value = false;
                }
                if (FormatPluginCallingThread != null)
                {
                    try
                    {
                        FormatPluginCallingThread.Abort();
                    }
                    catch { }
                }

                if (ReflectionCheckingThread != null)
                {
                    try
                    {
                        ReflectionCheckingThread.Abort();
                    }
                    catch { }
                }
                ShowStatusMsg("");
                ShowProgressBar(false);
            }
        }
Exemple #4
0
 void ClearData()
 {
     if (this.BaseTabs.InvokeRequired)
     {
         ClearData_d InvokeDelegate_d = new ClearData_d(ClearData);
         this.BaseTabs.Invoke(InvokeDelegate_d, new object[] { });
     }
     else
     {
         UseSSLCB.Checked = false;
         HeadersTBP.ClearData();
         BodyTBP.ClearData();
         FormatXmlTBP.ClearData();
         ConvertXmlToObjectBtn.Text = "Convert this XML to Object";
         UrlPathPartsParametersGrid.Rows.Clear();
         QueryParametersGrid.Rows.Clear();
         CookieParametersGrid.Rows.Clear();
         HeadersParametersGrid.Rows.Clear();
         BodyParametersGrid.Rows.Clear();
         ClearEditTab();
         foreach (DataGridViewRow Row in FormatPluginsGrid.Rows)
         {
             Row.Cells[0].Value = false;
         }
         if (FormatPluginCallingThread != null)
         {
             try
             {
                 FormatPluginCallingThread.Abort();
             }
             catch { }
         }
         ShowStatusMsg("");
         ShowProgressBar(false);
     }
 }