Beispiel #1
0
        public void LogEvents(EventMonitorItem[] items)
        {
            try
            {
                if (items.Length > 0)
                {
                    listView.BeginUpdate();

                    foreach (EventMonitorItem item in items)
                    {
                        item.ImageIndex = EventImageIndex;
                    }

                    listView.Items.AddRange(items);
                    listView.AutoResizeColumns();
                    listView.FocusedItem = null;
                    listView.SelectedItems.Clear();

                    items[items.Length -1].EnsureVisible();
                    items[items.Length -1].Selected = true;

                    listView.EndUpdate();
                }
            }
            catch
            {
                GlobalExceptionHandler.HandleException();
            }
        }
Beispiel #2
0
 public void LogEvent(EventMonitorItem item)
 {
     try
     {
         LogEvents(new EventMonitorItem[] { item });
     }
     catch
     {
         GlobalExceptionHandler.HandleException();
     }
 }