Example #1
0
        private void lvLogInfo_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
        {
            try
            {
                if (_cookie != null)
                {
                    FillCache(e.ItemIndex);

                    if (ViewCache.ContainsKey(e.ItemIndex))
                    {
                        var dto = ViewCache[e.ItemIndex];
                        e.Item = new ListViewItem(dto.getClientIP());
                        e.Item.SubItems.Add(dto.getClientPort().ToString());
                        e.Item.SubItems.Add(dto.getLoginDN());
                        e.Item.SubItems.Add(dto.getOperation());
                        e.Item.SubItems.Add(dto.getErrorCode().ToString());

                        var span = dto.getEndTime() - dto.getStartTime();
                        e.Item.SubItems.Add(string.Format("{0} ms", span));
                    }
                }
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.ToString());
            }
        }
Example #2
0
        private void lvLogInfo_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
        {
            MiscUtilsService.CheckedExec(delegate
            {
                if (_cookie != null)
                {
                    FillCache(e.ItemIndex);

                    if (ViewCache.ContainsKey(e.ItemIndex))
                    {
                        var dto = ViewCache[e.ItemIndex];
                        e.Item  = new ListViewItem(dto.getClientIP());
                        e.Item.SubItems.Add(dto.getClientPort().ToString());
                        e.Item.SubItems.Add(dto.getLoginDN());
                        e.Item.SubItems.Add(dto.getOperation());
                        e.Item.SubItems.Add(dto.getErrorCode().ToString());

                        var span = dto.getEndTime() - dto.getStartTime();
                        e.Item.SubItems.Add(string.Format("{0} ms", span));
                    }
                }
            });
        }