void corpseTracker_ItemRemoved(TrackedCorpse item) { try { RemoveCorpse(item); } catch (Exception ex) { Debug.LogException(ex); } }
void corpseTracker_ItemChanged(TrackedCorpse item) { try { if (item.Opened) { RemoveCorpse(item); } } catch (Exception ex) { Debug.LogException(ex); } }
void RemoveCorpse(TrackedCorpse item) { for (int row = 1; row <= hudList.RowCount; row++) { if (((HudStaticText)hudList[row - 1][3]).Text == item.Id.ToString(CultureInfo.InvariantCulture)) { hudList.RemoveRow(row - 1); row--; } } }
void corpseTracker_ItemAdded(TrackedCorpse item) { try { if (item.Opened) { return; } HudList.HudListRowAccessor newRow = hudList.InsertRow(1); ((HudStaticText)newRow[0]).Text = item.TimeStamp.ToString("ddd HH:mm"); ((HudStaticText)newRow[1]).Text = item.Description; CoordsObject newCords = Mag.Shared.Util.GetCoords(item.LandBlock, item.LocationX, item.LocationY); ((HudStaticText)newRow[2]).Text = newCords.ToString(); ((HudStaticText)newRow[3]).Text = item.Id.ToString(CultureInfo.InvariantCulture); } catch (Exception ex) { Debug.LogException(ex); } }