private void OnIndexAdded(object sender, LogIndexAddedEventArgs e) { ItemProperties properties = null; if (Array.Exists <string>(e.AddedIndexes, x => string.CompareOrdinal(x, ItemID) == 0)) { properties = m_Database.GetItemProperties(ItemID); } if (properties != null) { string unit = properties["Unit"]; if (!string.IsNullOrEmpty(unit)) { Label.Text = string.Format("{0} ({1})", ItemID, unit); } } }