我的C#程序中的搜索功能 [英] A searchfunction in my C# program

查看:147
本文介绍了我的C#程序中的搜索功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,大约一年前我制作了一个程序来记录一个名为runescape的游戏中特定怪物的掉落..在这个程序中我有一个搜索功能,可以搜索一个项目并选择所有找到的项目..这就是它的样子:



http://gyazo.com/54442ad07abc0087ac211c4ce77afc30.gif [ ^ ]



我想在另一个正在为另一个怪物工作的程序中执行相同的搜索功能..但我记不清了怎么做,有人可以帮忙吗?

解决方案

如果是C#,你可以使用 ILSpy [ ^ ]对您的装配进行逆向工程。

干杯

Andi


来厕所p通过列表框查找文本,你可以做类似的事情:



  for  Int32  i =  0 ; i <  list.Items.Count; i ++)
{
if (list.Items [i] .ToString()== value
{

}
}


Hello guys, for about one year ago i made a program to log drops from a specific monster on a game called runescape.. In this program i had a search function that could search for an item and select all of the found items.. This is how it looks like:

http://gyazo.com/54442ad07abc0087ac211c4ce77afc30.gif[^]

I would like to do the same search function in another program that i'm working on for another monster.. But i can't remember how to do it, can anyone help please?

解决方案

If it is C#, you can use ILSpy[^] to reverse-engineer your assembly.
Cheers
Andi


To loop through a listbox and look for text you can do something similar to:

for (Int32 i = 0; i < list.Items.Count; i++)
{
  if (list.Items[i].ToString()=="value")
   {

  }
}


这篇关于我的C#程序中的搜索功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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