简体   繁体   English

Windows表单显示大量数据但也可以选择

[英]Windows form displaying large amounts of data but also select-able

I had a previous questions about how to read large blocks of data from about ~600mbs of log text file information. 我以前有一个问题,关于如何从大约600mbs的日志文本文件信息中读取大数据块。 along with searching through the file to find useful information 以及搜索文件以查找有用的信息

I'm wondering what is the best way/efficient way to display the data. 我想知道什么是显示数据的最佳方式/有效方式。 Previously for about ~1mb of log file data, I was using a listbox to display an string of 1 entry in the file. 以前,对于大约1mb的日志文件数据,我使用列表框在文件中显示1个条目的字符串。 This would populate about 7000 listboxes entries for just 1mb of data. 仅1mb的数据就可以填充大约7000个列表框条目。 Obviously I can't do this for the ~600mb log file. 显然,对于〜600mb的日志文件,我无法执行此操作。

I want the user to be able to "expand" one log entry and 'drill down' and see more details about the specific info/debug/error. 我希望用户能够“扩展”一个日志条目并“向下钻取”,并查看有关特定信息/调试/错误的更多详细信息。 I think because listbox is inherently array based by index, I need to use a different container to display info but still maintain the ability to select an entry and expand details. 我认为,因为列表框本质上是基于索引的数组,所以我需要使用其他容器来显示信息,但仍保持选择条目和扩展详细信息的能力。

Well a Tree would make sense, you could get clever and do lazy loading build up nodes/ indexes in background threads and such with selecting the node as a fallback. 一棵树很有意义,您可能会变得聪明,并且可以通过延迟加载来在后台线程中建立节点/索引,并选择节点作为后备节点。

Same sort of thing but with multiple list boxes for a filter based selection is a possibility as well 同样的事情,但有多个列表框用于基于过滤器的选择也是可能的

Node could be MonthYear, Date, Hour, Entry etc Source or type if it's in there. 节点可以是MonthYear,Date,Hour,Entry等来源或类型(如果在其中)。

Last thing you want is list box with mullions of entries to select from, no one would want to use it, and anybody who had to would loathe it. 您想要的最后一件事是列表框,其中有许多条目可供选择,没有人会愿意使用它,任何不得不讨厌它的人都将无法使用它。

for 600mb data, about 7000*600 (4.2M) rows, you will not be able to show all of them in one window. 对于600mb的数据,大约7000 * 600(4.2M)行,您将无法在一个窗口中显示所有这些数据。 had better use a way to browse different pages (say each page only has 100 rows). 最好使用一种浏览不同页面的方式(例如,每个页面只有100行)。 If I were you, I will preprocess the log file, and then insert the log into a database. 如果您是我,我将预处理日志文件,然后将日志插入数据库中。 then load the rows from the DB using pagenation. 然后使用分页从数据库加载行。 if you go this way, you can still use listview, or gridview. 如果采用这种方式,您仍然可以使用listview或gridview。

I would approach the design this way: 我将以这种方式进行设计:

  1. A set of filters on the top generated by analyzing the contents of the log file complete with 'Search Now' button or some such thing. 通过使用“立即搜索”按钮或类似的工具分析日志文件的内容,在顶部生成了一组过滤器。
  2. Among the filters I would ask for Page size (as in show 10, 50, 100 results per page) 在筛选器中,我会要求页面大小(如每页显示10、50、100个结果)
  3. A search result window on the bottom that would contain the list of summary data for each log node that matches the chosen filter criteria, then break up the results into pages if necessary. 底部的搜索结果窗口将包含与所选过滤条件匹配的每个日志节点的摘要数据列表,然后在必要时将结果分成几页。
  4. A details pane that is visible when you choose a particular log node 选择特定的日志节点时可见的详细信息窗格
  5. A footer status bar that noted the number of matching records 页脚状态栏,记录了匹配记录的数量

This would allow your users to quickly search for what they are looking for, but not be overwhelmed by the magnitude of the found results, and considering the size of the data set they're likely going to want to filter it before showing any of the nodes. 这样一来,您的用户就可以快速搜索他们要寻找的内容,但不会因发现结果的数量而感到不知所措,并且在显示任何节点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM