Selects a reference in the UI after checking it for validity. Reference to an item. False if the provided reference is not valid in this context. True if it is valid and has been selected.
(object reference)
| 41 | /// <param name="reference">Reference to an item.</param> |
| 42 | /// <returns>False if the provided reference is not valid in this context. True if it is valid and has been selected.</returns> |
| 43 | public bool assignReference(object reference) |
| 44 | { |
| 45 | object item = memItem.GetItem(reference); |
| 46 | if (item == null) return false; |
| 47 | |
| 48 | MainWindow.instance.offsetTabs.SelectedTab = tabPage; |
| 49 | listBox.SelectedItem = item; |
| 50 | MainWindow.instance.editorGrid.SelectedObject = item; |
| 51 | |
| 52 | return true; |
| 53 | } |
| 54 | |
| 55 | /// <summary> |
| 56 | /// Refreshes the item's listbox, updating all items whose names have changed. |
no test coverage detected