private void Button_Click(object sender, RoutedEventArgs e) { HHModel m = new HHModel(); string r = m.WEbClientGet("http://api.hh.ru/vacancies?text=Программист"); ResListBox.Items.Clear(); List <Work> work = m.JsonParseList(r); foreach (Work w in work) { // ResListBox.Items.Add(w.id + " " + w.Name); ListBoxItem item = new ListBoxItem(); // item.Name = w.Name; item.Content = w.id + " " + w.Name; item.Tag = w.info; ResListBox.Items.Add(item); } // ResListBox.ItemsSource = work; }
private void button1_Click(object sender, EventArgs e) { string r = m.WEbClientGet("http://api.hh.ru/vacancies?text=Программист"); ResBox.Text = "" + r; }