c#在用winfrom时 怎样实现模糊搜索

问题描述

c#在用winfrom时 怎样实现模糊搜索
void LoadLrc()
{
string songPath=listSongs[listBox1.SelectedIndex];
string[] songPath1 = songPath.Split(new char []{'.'} StringSplitOptions.RemoveEmptyEntries);
string void LoadLrc()
{
string songPath=listSongs[listBox1.SelectedIndex];
string[] songPath1 = songPath.Split(new char []{'.'} StringSplitOptions.RemoveEmptyEntries);
string songPath2=;
if (File.Exists(songPath2))
{
string []lrcText = File.ReadAllLines(songPath Encoding .Default );
FormatLrc(lrcText);
}
else
{
lblLrc.Text = ""-------------歌词未找到-------------"";
}
}=;
if (File.Exists(songPath2))
{
string []lrcText = File.ReadAllLines(songPath Encoding .Default );
FormatLrc(lrcText);
}
else
{
lblLrc.Text = ""-------------歌词未找到-------------"";
}
}

            我想让   songPath2  的搜索结果为  ****songPath1【0】****.lrc      该怎么写呀     谢谢

解决方案

 string[] files = Directory.GetFiles(目录*关键字*.lrc"");if (files.Count() > 0)...
时间: 2024-08-25 11:29:36

c#在用winfrom时 怎样实现模糊搜索的相关文章

数据库模糊搜索时,关键字中有%号,怎么办?

本文转载:http://www.cnblogs.com/lmfeng/archive/2013/02/26/2932963.html     数据库模糊搜索时,关键字中有%号,怎么办?   数据库模糊搜索时,都知道应该用通配符%号来模糊匹配.如:select *from table where content like '%key%'.但当关键字key中也包含有%号时,应该怎么办?   数据库中有关键字:escape就是用来转换的.使用escape关键字定义转义符时,当转义符置于通配符之前时,该

.net 4.0 winfrom 上传文件到服务器,出现“基础链接已经关闭:发送时发生意外错误”

问题描述 一.要求:1.应以编程方式自动上传,不应该使用浏览器上传2.上传方法错误,应该使用HTTPPOST,不应该使用HTTPGET3.应先产生一个XML文本型文件,接着以"multipart/form-data"方式上传,不应以数据流(Stream)方式上传二.上传类采用梅里之巅的三.出现错误在using(StreamrequestStream=request.GetRequestStream()){requestStream.Write(formData,0,formData.L

C# Winfrom 读取word图片时 图片变小了

问题描述 在做winfrom项目的时候读取word图片,发现读取到的图片比word里的图片宽度小一点这是原始图片这是读取之后的图片这是我读取的代码Bitmapbt=null;foreach(Microsoft.Office.Interop.Word.InlineShapeishinoDoc.InlineShapes){if(ish.Type==Microsoft.Office.Interop.Word.WdInlineShapeType.wdInlineShapePicture){ish.Sel

winfrom 树形控件如何实现鼠标经过节点时光标颜色改变效果

  一.winform TreeView控件的实现方式.   /// <summary>        /// Handles the MouseMove event of the treeView1 control.        /// </summary>        /// <param name="sender">The source of the event.</param>        /// <param nam

winfrom用treeview添加删除数据时,到底怎么选中节点?

问题描述 RT这是UI界面,可以读取数据库中的数据,但是添加删除都不行.说没选中节点.privatevoidbtnAdd_Click(objectsender,EventArgse){//新建txtNewCategoryNameif(bllCategory.CategoryNameIsExists(txtNewCategoryName.Text.Trim())){MessageBox.Show("该分类名称已存在,不能重复!","提示");}else{//非空判断,

c# winfrom webBrowser在加载activex控件时一直提示“未验证发布者”。注意“在ie浏览器运行一切正常,ie该配置的都配置了”

问题描述 求各位大神帮忙解决.这个未验证的控件是fastreport 解决方案

C# Winfrom项目,如何将form窗体由矩形绘制成圆形。

问题描述 C# Winfrom项目,如何将form窗体由矩形绘制成圆形. 在C# Winfrom项目中,如何将form窗体由矩形绘制成圆形.请帮忙看看如何设置form窗体可以达到下面截图中的圆形效果.谢谢!最好能够与截图中的圆形做得十分接近(圆形的背景色.字体.线条等). 解决方案 不规则窗体代码下载:http://files.cnblogs.com/alexis/IrregularForm.rar 解决方案二: 使用protected override void OnPaint(PaintEv

一个问答特效,单机问题标题时,显示其答案

问题描述 一个问答特效,单机问题标题时,显示其答案 初识jQuery h1 { padding:5px; } #show { list-style-type:none; line-height:28px; } #ppt{ text-decoration:underline; color:#00F; } ul { line-height:28px; list-style-type:none; display:none; } $(document).ready(function(){ $("h1&q

Quartz.NET WinFrom 关闭程序后无法结束进程

 将Quartz.NET组建引入到WinFrom中时,遇到个问题,关闭程序后,进程任未结束. 解决办法:在窗体关闭时,把调度器关闭就不会存在进程了. private void FormMain_FormClosing ( object sender , FormClosingEventArgs e ) if (Scheduler.GetIntance()!= null ) {    Scheduler.GetIntance().Shutdown() }