private void AddPair(RequestResponsePair pair)
        {
            if (InvokeRequired)
            {
                Invoke(new Action(() => AddPair(pair)));
            }
            else
            {
                var item = new ListViewItem((lVRequestResponse.Items.Count + 1).ToString(CultureInfo.InvariantCulture));

                String status;
                String details;
                if (!pair.Request.Validated)
                {
                    status  = "PENDING";
                    details = String.Empty;
                }
                else
                {
                    status  = pair.GetStatusString();
                    details = pair.Request.GetDetails();
                }

                item.SubItems.Add(status);
                item.SubItems.Add(details);

                lVRequestResponse.Items.Add(item);
            }
        }
Exemple #2
0
        private void AddPair(RequestResponsePair pair)
        {
            this.InvokeIfRequired(() =>
            {
                var item = new ListViewItem((lVRequestResponse.Items.Count + 1).ToString(CultureInfo.InvariantCulture));

                var status  = pair.GetStatusString();
                var details = pair.Request.GetDetails();

                item.SubItems.Add(status);
                item.SubItems.Add(details);

                lVRequestResponse.Items.Add(item);
            });
        }