MCPcopy Create free account
hub / github.com/bwapi/bwapi / refresh

Method refresh

bwapi/BWMemoryEdit/ItemController.cs:58–71  ·  view source on GitHub ↗

Refreshes the item's listbox, updating all items whose names have changed.

()

Source from the content-addressed store, hash-verified

56 /// Refreshes the item's listbox, updating all items whose names have changed.
57 /// </summary>
58 public void refresh()
59 {
60 for (int i = 0; i < listBox.Items.Count; ++i)
61 {
62 object item = listBox.Items[i];
63 String newStr = item.ToString();
64
65 if (!itemCache.ContainsKey(item)) itemCache.Add(item, newStr);
66 if (itemCache[item].CompareTo(newStr) != 0)
67 {
68 listBox.Items[i] = item;
69 }
70 }
71 }
72 }
73}

Callers 1

refreshTimer_TickMethod · 0.80

Calls 2

AddMethod · 0.80
ToStringMethod · 0.45

Tested by

no test coverage detected