Listview - 更新网络扫描 [英] Listview - updating network scan

查看:125
本文介绍了Listview - 更新网络扫描的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我目前有一个listView1,在通过计时器扫描后清除并更新。因此每次扫描都会清除listView1。我希望listView1保留现有列表,只添加重新扫描时找到的任何新IP。此外,添加的新项目应为forecolor Color.Red。



我对此的想法是,为了进行比较,我需要第二个listView吗?或者是否有更简单的方法来执行此操作。任何输入将不胜感激。谢谢!



我尝试了什么:



刚入门这 - 寻找建议

解决方案

在列表视图项目中添加上次日期时间检查字段。





扫描IP时,添加新的(红色),并更新现有的。





每隔一段时间,删除过时的地址。





这种模式可以解释临时超时。

Hi,

I presently have a listView1 that is cleared and updated after a scan via a timer. So each scan clears the listView1. I would like to have the listView1 retain the existing list and only add any new IP's found on a re-scan. Also the new item added should be forecolor Color.Red.

My thoughts on this is that I will need to a second listView for comparison purposes? Or is there an easier way to do this.Any input would be appreciated. Thanks!

What I have tried:

Just getting started on this- looking for suggestions

解决方案

Add a "last date time checked" field to your "list view items".


When you scan IP's, add new ones ("red"), and update existing ones.


At an interval, remove "out dated" addresses.


This pattern accounts for temporary time outs.


这篇关于Listview - 更新网络扫描的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆