public void DisplayData(GptRecord gptRecord) { lstvGpt.Items.Clear(); lstvGpt.Items.Add("DartSite").SubItems.Add(gptRecord.DartSite); lstvGpt.Items.Add("Size").SubItems.Add(gptRecord.Size); lstvGpt.Items.Add("Sponsorship").SubItems.Add(gptRecord.Sponsorship); lstvGpt.Items.Add("CustParams").SubItems.Add(gptRecord.CustParams); this.Refresh(); }
private void BindGptData() { if (_sessions.Length > 0) { var session = _sessions[0]; int questionIndex = session.PathAndQuery.IndexOf("?"); if (questionIndex >= 0) { string qs = session.PathAndQuery.Substring(questionIndex + 1); var collection = Fiddler.Utilities.ParseQueryString(qs); // Extract data var gptRecord = new GptRecord(); foreach (string key in collection) { switch (key.ToLower()) { case FIELD_DARTSITE: gptRecord.DartSite = collection[key]; break; case FIELD_SIZE: gptRecord.Size = collection[key]; break; case FIELD_SPONSORSHIP: gptRecord.Sponsorship = collection[key]; break; case FIELD_CUSTPARAM: gptRecord.CustParams = collection[key]; break; } } _viewer.DisplayData(gptRecord); } } }