private void CapturedEvents_ItemRemoved(int iIndex, CapturableEvents item) { if (this.lsvCapturedEvents.Items.ContainsKey(item.ToString()) == true) { this.lsvCapturedEvents.Items.Remove(this.lsvCapturedEvents.Items[item.ToString()]); } }
private void CapturedEvents_ItemAdded(int iIndex, CapturableEvents item) { ListViewItem lviNewCapture = new ListViewItem(item.ToString()); lviNewCapture.Name = item.ToString(); this.lsvCapturedEvents.Items.Add(lviNewCapture); }
public void ProcessEvent(EventType etType, CapturableEvents ceEvent, params string[] a_strMessageParams) { if (this.CapturedEvents.Contains(ceEvent) == true) { DateTime dtLoggedTime = DateTime.Now; // UtcNow.AddHours(m_prcClient.Game.UTCoffset).ToLocalTime(); string strEventText = String.Empty; if (this.m_prcClient.Language.LocalizedExists("uscEvents.lsvEvents." + ceEvent.ToString()) == true) { strEventText = this.m_prcClient.Language.GetLocalized("uscEvents.lsvEvents." + ceEvent.ToString(), a_strMessageParams); } CapturedEvent newCapture = new CapturedEvent(etType, ceEvent, strEventText, dtLoggedTime, this.m_prcClient.InstigatingAccountName); this.ProcessEvent(newCapture); } }