private void UpdateResultPicturesThread() { List <ListViewItem> iItems = VPThreading.GetItems(_resultListView); Service_Misc.LogText(_logTextBox, "Updating Item Pictures..."); foreach (ListViewItem listViewItem in iItems) { try { FFXIVSearchItem item = VPThreading.GetTag(listViewItem) as FFXIVSearchItem; if (!_prerequisiteImageList.Images.ContainsKey(item.ID)) { System.Net.WebRequest request = System.Net.WebRequest.Create(item.UrlImage); System.Net.WebResponse resp = request.GetResponse(); System.IO.Stream respStream = resp.GetResponseStream(); Bitmap bmp = new Bitmap(respStream); respStream.Dispose(); VPThreading.AddImage(_resultListView, _prerequisiteImageList, item.ID, bmp); } VPThreading.SetImageKey(listViewItem, item.ID); } catch (Exception) { } } }
private void _addToCraftingListButton_Click(object sender, EventArgs e) { foreach (ListViewItem listViewItem in _resultListView.SelectedItems) { try { FFXIVSearchItem item = VPThreading.GetTag(listViewItem) as FFXIVSearchItem; if (null != item) { _itemsToCraft.Add(item); } } catch { } } UpdateCraftingList(); }
private void _quantityNumericUpDown_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { ListView.SelectedListViewItemCollection iItems = _resultListView.SelectedItems; Service_Misc.LogText(_logTextBox, "Updating Item Pictures..."); foreach (ListViewItem listViewItem in iItems) { try { FFXIVSearchItem item = VPThreading.GetTag(listViewItem) as FFXIVSearchItem; //if (null != item) item.Quantity = (int)VPThreading.GetValue(_quantityNumericUpDown); DisplayItemList(_lastDisplayedItems); } catch { } } } }