Example #1
0
        public void onLoadSessionDataFromString(String pSessionData)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new onLoadSessionDataFromStringDelegate(onLoadSessionDataFromString), new object[] { pSessionData });
                return;
            } // if (InvokeRequired)

            try
            {
                BindingList <HTTPRequests> lRecords = cDomain.loadSessionDataFromString(pSessionData);

                DGV_HTTPRequests.SuspendLayout();

                lock (this)
                {
                    cHTTPRequests.Clear();
                    if (lRecords != null && lRecords.Count > 0)
                    {
                        foreach (HTTPRequests lTmp in lRecords)
                        {
                            cHTTPRequests.Insert(0, lTmp);
                        }
                    }
                } // lock(thi...

                DGV_HTTPRequests.ResumeLayout();
            }
            catch (Exception lEx)
            {
                PluginParameters.HostApplication.LogMessage(String.Format("{0}: {1}", Config.PluginName, lEx.Message));
            }
        }
Example #2
0
        public void onLoadSessionDataFromFile(String pSessionName)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new onLoadSessionDataFromFileDelegate(onLoadSessionDataFromFile), new object[] { pSessionName });
                return;
            } // if (InvokeRequired)


            try
            {
                onResetPlugin();
            }
            catch (Exception lEx)
            {
                PluginParameters.HostApplication.LogMessage(String.Format("{0}: {1}", Config.PluginName, lEx.Message));
            }


            try
            {
                // Update DataGridView
                BindingList <HTTPRequests> lSessionData = cDomain.loadSessionData(pSessionName);
                DGV_HTTPRequests.SuspendLayout();

                lock (this)
                {
                    cHTTPRequests.Clear();
                    if (lSessionData != null && lSessionData.Count > 0)
                    {
                        foreach (HTTPRequests lTmp in lSessionData)
                        {
                            cHTTPRequests.Insert(0, lTmp);
                        }
                    }
                } // lock(thi...

                DGV_HTTPRequests.ResumeLayout();
            }
            catch (Exception lEx)
            {
                PluginParameters.HostApplication.LogMessage(String.Format("{0}: {1}", Config.PluginName, lEx.Message));
            }
        }