Exemple #1
0
 public static void ListBoxFiller(JsonDeserialize deserializer, string strResponse, ListBox listBox, TextBox textBoxLog)
 {
     try
     {
         foreach (var item in deserializer.DeserializePair(strResponse))
         {
             listBox.Items.Add(item);
         }
     }
     catch
     {
         textBoxLog.Text += strResponse + Environment.NewLine;
     }
 }
Exemple #2
0
        public static void ListBoxFiller(JsonDeserialize deserializer, string strResponse, ListBox listBox, TextBox textBoxLog, string find)
        {
            Regex regex = new Regex($@"^{find}", RegexOptions.IgnoreCase);

            try
            {
                foreach (var item in deserializer.DeserializePair(strResponse))
                {
                    if (regex.IsMatch(item))
                    {
                        listBox.Items.Add(item);
                    }
                }
            }
            catch
            {
                textBoxLog.Text += strResponse + Environment.NewLine;
            }
        }